Skip to content

Doorsign with E-Paper-Display with ESP32. Loading images from webserver.

License

Notifications You must be signed in to change notification settings

sotho/DoorsignEPD

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Walldisplay

Based on a c't project, see https://github.com/jamct/DoorsignEPD and https://ct.de/yrzv

We use it for our family calendars (first display) and a TODO list (second display). The calendars and the TODO list are hosted at google and can be edited with our smartphones or the web frontend.

The wall display just shows the rendered version of our calendars / TODO list, no editing possible. The rendering is done on a local NAS.

Hardware

Here is what I used (for one display):

When battery is empty:

To assemble:

Software

Arduino

The arduino software is in esp32/doorsignEPD/doorsignEPD.ino, you need the arduino IDE and a few libraries to compile it and flash it on the arduino.

What I changed (compared with the original c't project):

  • I added an ID (first byte) to the raw picture served by the NAS. The ID is never 0. When the arduino first starts it initializes its ID with 0. When the ID doesn't match (on first boot it never matches), then the e-ink display is updated. The ID from the raw picture is stored and the arduino goes into deep sleep. On next wake-up the raw picture is downloaded and the ID is compared with the stored ID. Only if it has changed the display is updated. This should safe a bit of power and avoids this annoying flickering for several seconds whenever possible.
  • Align wake-up from deep sleep to full or half hour (xx:00 or xx:30).
  • Deep sleep is at most 30 minutes. I tried 60 minutes, but then my arduino never wakes up; no idea why.

Server

apache with python module is serving the pre-rendered raw picture. The picture is created by a systemd-service triggered by a systemd-timer.

These files/directories are needed:

  • /var/www/html/board: here the raw images are stored. Owned by www-data:www-data.
  • /etc/apache2/sites-available/000-default.conf: contains definition for board directory
  • /var/www/html/board/index.py: serves the raw image depending on source IP of the display (less configuration on arduino)
  • /usr/local/bin/board: The script the creates raw images.
  • /usr/local/share/board/client_secret.json: The API IDs the client software needs; you can create your own as a developer. The tutorials of the google API for calendar describes how to do that.
  • /var/www/.config/myBoard/credentials-myboard.json: The credentials for the google account that shall be used for calendar and TODO list. To create this file call /usr/local/bin/board as a normal user; then it opens an URL in your browser and you can confirm the permissions (read-only calendar and TODO-list) for your google account. Copy that file from ~/.config/myBoard/credentials-myboard.json
  • /etc/systemd/system/board.service: The systemd service to run /usr/local/bin/board
  • /etc/systemd/system/board.timer: The systemd timer to run the board.service every 30 minutes.
  • init.sls: A salt state file how to deploy these files and install dependencies, etc.

Dependencies:

  • apache2
  • libapache2-mod-python
  • python-pip
  • python3-pip
  • python3-pil
  • fonts-liberation
  • python3-tz
  • ttf-mscorefonts-installer

(some might no longer be needed)

For the google API we don't have a debian package, use: pip3 install google-api-python-client

  • Adapt /var/www/html/board/index.py to map your local arduino IP to an raw image
  • Adapt /usr/local/bin/board
  • calendarIdMap: mapping of calendar IDs to a short symbol (not rendered, because we didn't like it).
  • BLACKLIST_CAL_ID: never use calendars with these short symbols. We didn't want birthdays from contacts and the calendar week.

About

Doorsign with E-Paper-Display with ESP32. Loading images from webserver.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.1%
  • C++ 33.6%
  • SaltStack 9.3%