Live data from Hacker News

Show HN: Low-power Kindle-based dashboard

github.com

51–60 of 74 posts

Re: Show HN: Low-power Kindle-based dashboard

#51
post #26

Since updating an eInk screen is relatively expensive, I suspect this system could be made more efficient by issuing conditional HTTP requests (last-modified or eTag) and only refreshing the screen when the dashboard image changes. This assumes both the ht client and dashboard server support conditional requests. The system consists of a set of shell scripts that run on a jailbroken Kindle. It includes ht, an HTTPie…

The ht program doesn't appear to support conditional downloads. It also doesn't support a HEAD request, which is odd, as it supports GET, POST, PUT, PATH, DELETE. With a HEAD request, you could do the Etag or Last-Modified comparison yourself.

I suppose you could just download the image and do a "diff -q" or compare an MD5 checksum, or even just file size.

Or use a different tool maybe? I see that rural supports head requests. https://crates.io/crates/rural

Edit: Appears that ht may be able to get response headers. It's sort of a documentation bug. It has a -p/--print option, but the README doesn't document what the arguments are.

Found it.. "ht -p h https://google.com" returns the headers, so you could extract the Etag or Last-Modified header.

Re: Show HN: Low-power Kindle-based dashboard

#52
post #51
post #26

Since updating an eInk screen is relatively expensive, I suspect this system could be made more efficient by issuing conditional HTTP requests (last-modified or eTag) and only refreshing the screen when the dashboard image changes. This assumes both the ht client and dashboard server support conditional requests. The system consists of a set of shell scripts that run on a jailbroken Kindle. It includes ht, an HTTPie…

The ht program doesn't appear to support conditional downloads. It also doesn't support a HEAD request, which is odd, as it supports GET, POST, PUT, PATH, DELETE. With a HEAD request, you could do the Etag or Last-Modified comparison yourself. I suppose you could just download the image and do a "diff -q" or compare an MD5 checksum, or even just file size. Or use a different tool maybe? I see that rural supports head…

HTTPie supports headers using header-name:value CLI parameters; I didn't check whether ht supports these. You would have to save the proper response header between requests. The question then turns to how the 304 Not Modified response is handled.

Re: Show HN: Low-power Kindle-based dashboard

#53
post #52
post #51

Earlier quoted context omitted.

The ht program doesn't appear to support conditional downloads. It also doesn't support a HEAD request, which is odd, as it supports GET, POST, PUT, PATH, DELETE. With a HEAD request, you could do the Etag or Last-Modified comparison yourself. I suppose you could just download the image and do a "diff -q" or compare an MD5 checksum, or even just file size. Or use a different tool maybe? I see that rural supports head…

HTTPie supports headers using header-name:value CLI parameters; I didn't check whether ht supports these. You would have to save the proper response header between requests. The question then turns to how the 304 Not Modified response is handled.

[deleted]

Re: Show HN: Low-power Kindle-based dashboard

#55
post #51
post #26

Since updating an eInk screen is relatively expensive, I suspect this system could be made more efficient by issuing conditional HTTP requests (last-modified or eTag) and only refreshing the screen when the dashboard image changes. This assumes both the ht client and dashboard server support conditional requests. The system consists of a set of shell scripts that run on a jailbroken Kindle. It includes ht, an HTTPie…

The ht program doesn't appear to support conditional downloads. It also doesn't support a HEAD request, which is odd, as it supports GET, POST, PUT, PATH, DELETE. With a HEAD request, you could do the Etag or Last-Modified comparison yourself. I suppose you could just download the image and do a "diff -q" or compare an MD5 checksum, or even just file size. Or use a different tool maybe? I see that rural supports head…

I could replace ht with another HTTP client. I just picked it because it was the easiest way I knew to compile an HTTP client with statically linking openssl.

If anyone knows an easy way to compile curl with statically linked openssl, let me know!

It would also not be difficult to build a small custom client based on Hyper or Reqwest.

Though I'm not sure if it would actually make a large difference with only 20 screen refreshes per day.

Re: Show HN: Low-power Kindle-based dashboard

#56

Earlier quoted context omitted.

The price definitely seems great for the size of the display, but it might be worth looking at the Waveshare e-paper displays if you want to do something a bit more DIY.

Yeah those look great. I'm hoping they have a built in driver or whatever and you just send the display data as serial/i2c or something.

Yes they have a peripheral mode with its own commands

https://inkplate.readthedocs.io/en/latest/peripheral-mode.ht...

Re: Show HN: Low-power Kindle-based dashboard

#57
post #18

This code does not render the dashboard itself. It's expected that what to display on the screen is rendered elsewhere and can be fetchd via HTTP(s). This is both more power efficient and allows you to use any tool you like to produce the dashboard image. I love these “under engineered” solutions. I’d be tempted to do everything in the Kindle itself, but he achieved what he needed with much less effort and higher fle…

The only real downsize is that text rendering engines like to know the display pixel layout. However for the display on the kindle it probably isn't a major concern.

On the other hand HTML is nice because you could use the same code on two differently sized devices (to an extent).

Re: Show HN: Low-power Kindle-based dashboard

#58
post #55
post #51

Earlier quoted context omitted.

The ht program doesn't appear to support conditional downloads. It also doesn't support a HEAD request, which is odd, as it supports GET, POST, PUT, PATH, DELETE. With a HEAD request, you could do the Etag or Last-Modified comparison yourself. I suppose you could just download the image and do a "diff -q" or compare an MD5 checksum, or even just file size. Or use a different tool maybe? I see that rural supports head…

I could replace ht with another HTTP client. I just picked it because it was the easiest way I knew to compile an HTTP client with statically linking openssl. If anyone knows an easy way to compile curl with statically linked openssl, let me know! It would also not be difficult to build a small custom client based on Hyper or Reqwest. Though I'm not sure if it would actually make a large difference with only 20 scree…

[deleted]

Re: Show HN: Low-power Kindle-based dashboard

#59
I made an eink clock / status display a while back. The thing ran on a tiny lithium-ion battery for weeks, which was nifty. But the flash when the screen refreshes every minute is super distracting if it's anywhere in your field of view. That to me was a dealbreaker. (If it helps, the datasheet says that it damages the display to refresh it every minute, and it did indeed die mysteriously after a year or so!)

I think I like normal LCDs for status displays. It is possible to redraw the screen without inverting it and drawing a lot of attention, so it is more "ambient".

Re: Show HN: Low-power Kindle-based dashboard

#60
post #30

Earlier quoted context omitted.

In terms of a Kindle-like laptop for writing, I’ve seen people enjoy the Freewrite Traveler (though it’s not for me): [1] https://getfreewrite.com/products/freewrite-traveler

Would love this jailbroken, a text dedicated device would be wonderful for coding, terminal emulation, even e-mail.

This? https://www.clockworkpi.com
Post reply on HN