Huan Truong

Notes from a developer

Github

Zenreader: A 4.7 inches E-Ink RSS Reader Powered by ESP32

I have been long wanting a PDA of sorts with an E-Ink screen that allows me to read stuff on the Internet without eye strains. But the Kindle really sucks as a newsreader device because the experimental browser never works correctly.

I don't know what the folks at Amazon were thinking when they make the browser suck this much. Let's say I want to read an article from Hacker News. The browser doesn't render HN correctly, sigh. When I tap on a link, it takes 10 seconds for the page to render. After 10 seconds, the browser renders the article as a desktop/tablet browser and it's zoomed out. So the resolution is to enable reader mode which requires me to tap the 3-dots menu and Article mode. With any luck, I will see the article in a somewhat presentable form. But it doesn't flip one page at a time, it works like a tablet so it scrolls pixels at a time. When I'm done with all that bullshit and want to tap back to go back to HN, it goes back to the article page without the reader mode enabled, and renders it all over again, making me wait and tap once more. That's not all: The browser doesn't go back from time to time, which makes it very frustrating.

Recently I came across the M5Paper with a big screen and a wireless chipset. I thought that could scratch my itch. So I went ahead and hacked together a firmware to make it an E-ink RSS Reader that mostly works for now. You can see it in action here:

The ESP32 is a microcontroller that has very little RAM and isn't quite suited to deal with HTML and such. So I had to use a Raspberry Pi as a rendering proxy and transforms the RSS and the text on the page so that the ESP32 can digest. The idea is to transform XML RSS to JSON and transform any article URL to plaintext by a nodejs script via an HTTP API SaaS or whatever you call it. Even so, I think I'm stretching the ability of the little controller. Anyways, it works most of the time – or at least, I hope, not worse than the Kindle. At least now I can flip one page at a time.

Screenshot

Screenshot

I have only worked on this for two days ago, so there are a lot of rough edges and my Raspberry Pi proxy server may go down any time so be careful and don't abuse it. It's literally running on a tmux session right now and when it dies, it will not come back unless I manually connect to the Pi to resurrect the script. But I thought it might be useful to put the code up early to make it easy for everyone to experiment with it. Maybe you could contribute to it too.

You can get the client code that runs on the ESP32/M5Paper at https://github.com/htruong/zenreader. I'm not making the server code available now, because it is messy and runs on duck-tape now. But basically, you have to answer two endpoints, one for the RSS feed xml-to-json proxy, and one for the article reader mode transform.

I hope that's enough of a motivation for you to get up and start hacking E-Ink with me.