Skip to content

misch2/eink-portal-calendar

Repository files navigation

"Portal" calendar for e-ink display

Examples (screenshots)

⚠️ Important notice!

If you are interested in building this, please consider using the ZivyObraz service instead. It's very reasonably priced (and first year free, IIRC), comes with a precompiled firmware for LaskaKit board and it is incredibly easy to use and set up.

Getting a copy of my project to work requires some non-trivial knowledge and I would only recommend it to people who like experimenting and who are willing to take this project as an inspiration for their own work. I can't guarantee that any of READMEs is up to date and that there are not hidden obstacles in getting the client or server part running. This repository contains almost all the source files for my calendars, but there are configuration files specific for my environment (e.g. WiFi password, server IP addresses etc.) and while I tried to put an equivalent of these filed to the "examples" folder, I can't guarantee it's directly usable without any modifications.

Summary

Inspired by https://github.com/wuspy/portal_calendar. Hardware is mostly the same but the software is different.

The software is divided into two parts:

  1. Simple ESP32 web client which only handles the e-Paper display
  2. PC/Raspberry webserver + backend process which produces the images and takes care of everything else, e.g.:
    • integration with web calendars
    • integration with weather provider
    • integration with HomeAssistant (battery & status monitor),
    • configuration UI

I've chosen this approach because it's easier and more fun for me to implement the server part in my favourite environments (Perl, NodeJS, HTML+CSS) than to try to do this directly on ESP32.

Everything is designed for a specific e-Paper size of 480x800 pixels, but I'm trying to use relative units in CSS so it should be possible to use different size just by changing the screen and font size.

Images are served as raw bitmaps and the task for ESP is only to fetch this image and display it.

All the rendering is performed on the server, using standard HTML + CSS. This allows me to use provide content without constantly re-flashing the ESP32. It's also much easier for me to debug CSS and try to pixel-perfect position everything or to integrace for example ICS calendar etc.

I also added a voltage monitorig because with ePaper it's not easily detactable when the battery goes low -- the old image just keeps being on the display. Also the server tries to keep track of when each of the ePaper display should contact it and if it doesn't happen for a while, it will display a warning in the configuration UI (TODO: send this warning via email or Telegram message).

Bill of materials

Installation

Edit the server/portal_calendar.conf and update settings there. See the server/examples/portal_calendar.conf for an example.

Install necessary modules and start the server:

$ sudo apt install perl libimlib2-dev libimlib2
$ make modules
$ server/scripts/run_minion &
$ server/scripts/run_webserver &

Once the server is running you can test it by pointing your browser at it's address (http://...:), it should produce HTML page with source calendar on the left side and (empty yet) image on the right side.

Now you can test if the image rendering works:

$ server/scripts/generate_img_from_web

it should respond with something like:

1
Job enqueued

After a short while there should be a file named current_calendar.png in the server/generated_images/ folder. If there isn't any, check the minion output (either in console, or via http://...:/admin URL).

If you refresh the page now, a grayscale PNG version of the calendar screen should be visible on the right side.

Done ✅

Sources:

Disclaimer

I don't expect anyone to use this project directly, mainly because it's written in Perl. But on the other hand the HTML, CSS or ESP32 code might serve as an inspiration for someone. See the server/templates/calendar_themes and server/public/css/calendar_themes/ folders.

TODO

  1. Support for Czech localization and characters
  2. Grayed out icons
  3. Add support for iCal.
  4. Fix the icons at the bottom, make more of them available, make them more random.
  5. Indicate possible WiFi outage or server unavailability on the display.
  6. Refresh the display only if image has changed (=check image checksum against the previous value). This should allow the portal calendar to ask server periodically more often but still sleep a lot and preserve energy.
  7. Replace the ESP8266 ePaper module with what original project uses, i.e. specific low power ESP32 board + separate e-Paper hat 1.
  8. Configurable through the UI.
  9. Offload calendar parsing to minion worker.
  10. Maybe add support for a weather forecast (but I'll probably create a different project just for this purpose).
  11. Add a config page to the server, to allow changing calendar properties (e.g. weather on/off, icon sets, etc.) easily without having to redeploy updated server.
  12. Add battery voltage measurement
  13. Add MQTT support (to see status in HomeAssistant)
  14. Add battery level indicator
  15. Add integration with Google Fit and display a weight data+chart
  16. Add support for multiple calendars (inspired by https://zivyobraz.eu/)
  17. Better battery voltage monitoring + move more things from client to the server
  18. Multiple displays support
  19. Alerts on client unavailability.
  20. On the fly image generation (instead of pre-generating all the images)

Footnotes

  1. I didn't consider the need for ESP board with very low power consumption. I therefore bought one that was available immediately (ESP8266 with integrated e-Paper driver). But while it's perfectly usable when powered through USB, it wouldn't keep working sufficiently long with AAA batteries. I therefore switched to low power ESP32 board.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published