Terminanzeige mit e-Paper am ESP32, MQTT, Node-Red und ESPHome - Teil 1
  • The following post was sent to us by our reader Eberhard Werminghoff. Have fun reading and postponing.
  • introduction

In housing communities, it has already happened that certain tasks - e.g. Put garbage cans in front of the door - forgot. There are also tasks in many families that are done in a rolling process of different family members. The discussions: "I'm not tuned - I was in yesterday!". Answer: "That's not true You are you today turn! "Are not new. We all who have become big with siblings or several children know this discussion.

When an ad specifies, who should do or must do something when, then from today with this discussion is concluded. Or how about an electronic birthday calendar? This article explains the procedure to build a display for waste dates on the basis of an ESP32 and an e-paper display, configure, compile, and finally into operation with esphoms.

This project should make you want more to deal with esciphome.

  • Why this project?

I live in an ownership community in which three owners take care of different services alternately. The current paper plan on DIN A4 is very confusing. For this reason, I have introduced an ad that, on the one hand, daily or a weekly basis for a weekly work (tail, make various garbage vessels in front of the door) and on the other hand indicates the responsible housing unit. This should hang at a later time in the house corridor. It displays the following data:

In the header: Display of current date, weekday, calendar week and day of the current year

In the heading line: Date of the first and last day of the current week and in the second line, which residential unit is currently responsible for the corridor

In the table area: The next four pick-up appointments with the four columns weekday, date, which is picked up and who is responsible for this.

In the footer: Operating parameters (reception field strength, version number and time, when the displayed data has been picked up).

To anticipate it, the ad looks later. It can easily be adapted to your own needs and modified to a birthday calendar.

  • Selection of the components

So far, I have only had experiences with the small 1.54inch e-paper ads of Waveshare and wanted to realize a reasonable font size this time. The choice fell on the 4.2inch display of Waveshare. This is available in two versions: first as a RAW version and as a board version.

  • The RAW display

The RAW version consists of the naked e-paper display, where only the ribbon lines are led out. The flexible ribbon cable fits into a special bushing. This socket is on the associated E-Paper ESP32 Driver Board available. There is no additional wiring required.

Notice: The E-Paper Driver Board is also available in one ESP8266 variant.

  • The module variant

The second - known version - is the display, which already matches the ESP32 on a carrier board (module version).

The picture shows the RAW variant on the left and the module variant right. I had chosen the board variant because the driver's board of the RAW variant does not fit into the housing anyway - it's too flat. Whether the Driver Board would fit into the housing after the reconstruction of the contact pins, I can not say.

To mention is also the different contrast of the two ads. The contrastic representation of the RAW display does not depend on the glass of the housing. One reason for me to use the variant "Board" (right).

  • The wiring of the displays with the ESP32

The pins of the SPI interface used by the Driver Board of the ESP32 variant can be removed from the following image. There is the wiring between ESP32 and the e-paper module displayed:

The wiring between RAW display and the E-Paper ESP32 Driverboard The other variant is specified by the wiring with the ribbon. Therefore, I have chosen the GPIOs used here as well with the variant described above.

Notice: This makes the later presented software without changes on both boards.

With this RAW variant, only the mouse lavier (bottom right) must be set: the switch 1 (a / b) must be in position "b" for our display. With switch 2 (ON / OFF), the installed USB interface is deactivated. Who she needs: Position "ON", who is not: position "off". I have turned USB when I tested the update over Wi-Fi. Now she is always "on".

The wiring between the E-Paper module and the ESP32 I have made course with a breadboard in the first step in the first step. The wired egg went to me after a short time on the cheek and I have therefore thought about a piggyback board and also implemented.

For this I have an 8-pin in the solder eyes of the module. Pin strip (see Fig. Yellow box) and in a hole grid plate an 8-pin. Socket strip soldered. Thereafter, the distance of the bolt was measured and drilled. That was not optimal because pen and socket strip did not match exactly. I had to enlarge the holes for it to fit. Because of the U-discs do not fall on the larger holes.

That's why the procedure recommended by me:

  1. 8-pin. Sorbide pin header in module.
  2. In a hole grid board, which is larger than the module board, to solder an 8-pin female strip (see ABB).
  3. Remove the bolts from the module board
  4. Together module board and future piggybacking board and holes holes through the module holes Show on the piggybacking board and drill the holes there.
  5. Only then should you customize the hole grid board to the dimension of the display module.

Notice: The distance between the pin strip and the bolt holes on the right and left is not Fitted in the 2.5mm grid. I do not know why. The height between the boards I have adapted with two washers. The bolt length is 10 mm.

The ESP was soldered directly into the hole grid board, because there was no version necessary. The reason: the height should be as low as possible. Only the pins that have also been really used were soldered.

But fit the position when choosing the position! The position you choose allows to insert the USB plug and press the RESET button with a wooden spatula (handle of the ice). Since I will retrofit an external reset button.

The connections between the socket strip and ESP are shown in accordance with the table above.

Screw everything up and finish is the assembly.

Now the "package" looks exactly as shown in - compact and almost handy. Now you can set the ad. They need them later later.

  • The auxiliary computer

In this project there is software that runs on a Raspberry Pi. These are the software Node-Red and MQTT software. I used a Raspi 3 and no problems. Anyone who has determined to use a Raspi at this point that was said that Node-Red is already included in the newer versions of the Raspberry Pi OS operating system (formerly Raspbian).

  • The software for the ESP32

Here we enter the part that was the hardest for me in this project. I started with the Arduino IDE. After several failures, because infinite "include" chains made the operation of a possible pattern program for me unreadable. Since a program that seems unreadable for me can not be modified, I was about to give up the project. Although the Arduino IDE I had already used more often, but not in the context of such complexity.

Which software take? The same problem was probably Otto Winter, which created the platform Esphome in 2019. He too was not a friend of sketches, which were several hundred lines long. He knew the well-known alternative firmwares, e.g. Espeasy or Espuma. These were unflastible to him and no longer user-friendly to use more than 10 devices connected. So he created Esphome. I recommend you that Video from Otto Winter, explaining Esphome.

At EsPhome, the user writes configuration files that are converted from Esphome to C ++ code. The system is 100% open source and free. The user does not program - it configures! In addition, it is possible to insert your own code in C ++. The configuration is written in YAML format

(Tyred from a foil of the video from Otto Winter removed).

By chance I came across Esphome. Although I have heard from Yaml in another context before this project, but write in YAML configuration files - absolute new territory.

What I Key, should also apply to the interested reader. Just courage, on go! I have Windows 10 as operating system. Then on the website:


individual steps I agree follow and is relatively fast then both the required python as well as whey and esphome Installed. Unfortunately, the statement is only available in English, but it is available for more platforms such as Mac and Linux.

We will come back to Esphome at a later date

  • functionality

Again, the description sounds more complicated than it is in reality. I will describe all elements on the following graphic step by step: starting with the database via the signal paths to (partial) description of the software.

The terms "Publish" and "Subscribe" are briefly explained in chapter 6.1.

  • The waste calendar

  • The ICS file of the disposer

The local disposal companies annually give their waste calendar to their customers. Previously, the "garbage man" wished a "Happy New Year" and was happy about a small Obolus. Today, the waste calendar is published on the Internet without wishes, very factual.

In addition, customer-friendly disposal companies know the wishes of their technical enthusiasts and provide an ICS file (ICAL calendar format) with the discharge dates on the Internet. As an example, I'm leading this link to the ICS file of my disposer. It opens the input page of the online discharge calendar. Enter once "at BorussiaPark 15" and choose "Show appointments" afterwards. You come to one side, from which the current annual calendar can be downloaded either as a PDF or as an ICS file. Please select the ICS format. Files in ICS format can be easily imported into a Google calendar. This file consists of scarce 900 lines and these are confusing in the first moment. By adding some blank lines, the whole thing becomes understandable. Here is an excerpt of two discharge dates:

If there is a file header, a file booter is available. That can be found in the last line and not listed here. The header and the individual datasets can ever deviate from the difference shown here; It is important that it is an ICS file. Ask your disposer if and if so, where you will find the ICS file.

Are the contents of the Summary field: too long for an indication in the display, you will not help you to edit the ICS file via an editor on this point.

If the file is edited, it must be inserted in the Google calendar. Since I had to add the competent apartments as a remark, I added behind the line "DTTSTASMP: ..." the line "Description: WHG (N)". The "N" stands for the respective apartment number. But I had to do that manually.

As an ISC file is inserted into a Google calendar, several good tutorials show in video or text format. Simply search for "Import ICS file in Google Calendar".

At the moment we have a calendar that contains all relevant appointments. Thus, the preparatory work is already done.

  • Manual input

If no appropriate file is made available by the relevant disposal, only the possibility remains the data from the discharge calendar manually directly to the Google calendar. A little job - but I already have behind me. I can assure: it works!

Notice: Entries in the Google Calendar Field "Add Description" later in the last column on the right on the display. So you must not be too long. Unless the size of the table fields is changed. For temporally bound appointments (such as visits, appointments, etc.) I would use the time in this field.

Now in Google is a calendar from which we can retrieve and reuse data. For this we need Node-Red.

  • The fields of the table in the display

The actual waste calendar consists of a 4-line table. The designation of the individual table fields is done according to the example of an Excel spreadsheet: The lines are numbered and the columns receive letters.

Column "A" contains the short form of the day of the week of pickup. This is from the data line

 DTEND; TZID = Europe / Berlin: 20220327T180000 

the ICS file provided to the overall system. Column "B" is formed from the same data line. Column "C" is from the data line

 Summary: residual waste

educated. The column "D" can be chosen by your own information (as with me) as desired. The content has its origin in the data line

 Description: WHG 2

For all data fields, it should be remembered that the length of the content is limited by the column width. By changing the font size, the length of the content can be enlarged. How and where we see later.

  • The data fields in the Google Calendar

    The Google Calendar later serves as a stopover station to provide the data for node-red. 
  • Node-Red and MQTT

There are many tutorials in which the installation and action are described. I can only recommend anyone who wants to install Node-Red and MQTT, which described here on AZ-Delivery Blog to follow by Jürgen Grzesina. I predict the installation and basic knowledge of Node-Red and MQTT.

  • Data collection and distribution station MQTT

For me, MQTT is the swivel and pivot between a wide variety of systems. Thus, the Hue light can work together with home automation, the Sonos box obeys a 433MHz switch when the washing machine is ready, an email will be sent; (almost) everything is possible - even here with us.

It would be idle now to follow an introduction to MQTT. Also in this project MQTT is the data center of the overall project.

We send the required data via a node red node to the broker to pass it on to those who have subscribed to this data. I'll go there later.

The sending to the broker we call "Publish", so publish. Any "publication" goes hand in hand with the mention of a "subject" where the value should be saved. The address of the "Fold is called" topic ". First of all, the one who needs a certain value of the broker must know the topic of the value and secondly inform the broker that he would like to have this value from the topic "xy" - he subscribes to a topic at broker. This process is called "Subscribe". Deeper I do not want to get in here, there are whole books that deal with the MQTT protocol. I use the software "Mosquitto" on a Rasperry Pi.

As a technology enthusiast, I will be noisy if I do not understand something. So too when I saw a "flow" for the first time. The flow is more than a graphical representation; It is also the description of a desired functionality. This has been new, but has conquered my heart in the storm through the clarity and traceability. At the same time, Node-Red provides a very appealing user interface. In addition, forums and tutorials, the beginner is best supported.

  • Outlook

In the second part, we import the flow in Node-Red and design the output on the display. Then we set up esphoms and program the ESP32.

Eberhard Werminghoff

DisplaysEsp-32Projects for beginnersSmart home

1 comment

Martin Richer

Martin Richer

Super Beitrag, vielen Dank! Bin schon auf Teil 2 gespannt!

Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN