One day I accidentally stumbled upon a devkit that is using ESP32 as a base with integrated 4.7″ e-ink display. What’s good in e-ink is that the display is only drawing power when the data is fetched and screen is refreshed, so it can easily be battery powered! And when doing battery powered, the placement of it is much much easier.
This time I didn’t think of writing a full guide since the same code would fit in no ones Home Assistant directly, but this is rather just an inspirational work report to get things on going.
In this project I’m using LILYGO TTGO T5-4.7 Inch E-paper ESP32 devkit with 18650 Battery holder. It’s a ready made devkit with ESP32 running 4.7″ e-ink display and a 18650 battery holder. What’s good in this devkit is that it’s already 100% supported by ESPHome third party library, so the integration to home assistant is much simpler without the need to implement the core display functionality.
This devkit includes the battery protection and charger circuits, so when choosing the proper 18650 battery it needs to be unprotected in order to fit it in the slot. That’s 65mm total length when the protected batteries are 70mm.
4.7″ e-ink display has a resolution of 960×540 pixels. It’s quite much for a display of this size so no single pixels can be seen easily and everything looks very sharp.
3D Printed case
This hardware seems to be quite popular among the hobbyists so there’s tons of different 3D prints available at the thingiverse! Eventually I ended printing up this because it’s on landscape and has a built-in support for table stands.
And now the most interesting and most time consuming part: the software!
Since the devkit is already supported by ESPHome, I decided to go with that. Another way would have been to actually implement a native application using e.g. Arduino, but then accessing Home Assistant devices would have been quite much of work. With ESPHome we have direct communication channel with the HA instance. Just remember to actually adopt the device in the Home Assistant ESPHome integrations for the communication to work. The device will be auto discover through ESPHome as soon as first version of ESPHome library is flashed into the device and started up.
Choosing the entities displayed
Because the devkit in my use is going to be battery powered, the ESP should be put to deep sleep as long as possible (20min in my case). It leads to a ‘problem’ that there should not be any entities in the display that requires constant updates (e.g. clock).
There’s a few items that I would like to see while going past the display: next calendar even, current weather and weather prediction for the next three days.
After the key items selected I decided to add some fillers for the rest of the space: temperature + humidity items, name days, moon phase and a current date.
Oh, and of course I need to see the battery status in order to check when recharge is needed!
Without going through the whole code step by step, the current implementation is pretty much standard ESPHome stuff and drawing is done by just X and Y coordinates along with baseline and font.
All of the code can be found from my GitHub page.
I’ve been using the display in a desk stand on an entrance for few weeks now and I’m very happy about it! Now I can easily check the next family calendar event and weather forecast every time I pass by. I’m even thinking of ordering another of the hardware and use it for something else as well!
The battery has drained about 10% in the last few weeks so I’m predicting that the battery will actually last many months without needing to recharge. There’s also some optimisation that can be done with my code to decrease the battery usage as well.