Smart Home Display for displaying data from Home Assistant.
about the project
Smart home systems such as the Home Assistant offer very convenient options for displaying sensor readings in the browser or via the smartphone app. However, there are situations when you want to keep an eye on a sensor value without having to click too much. For example, the temperature of the bedroom so that the baby always sleeps in a pleasantly warm room. Our Smart Home Display on an LCD basis, which can display any data from the Home Assistant, is ideal for this purpose.
In this tutorial we show examples of temperature and humidity from the tutorial "Thermometer and hygrometer with smart home connection" at.
The following components are required for assembly:
- WeMos D1 mini NodeMCU
- LCD1604 16x4 character LCD display module
- IIC / I2C interface adapter
- Breadboard, 400 pin
- 40 x jumper cable 10 cm, female to male
In addition, an executable Home Assistant system with installed ESPHome is required. See details later in the tutorial.
Solder the D1 Mini NodeMCU
So that the "D1 Mini NodeMCU" can be plugged into the breadboard, it must first be soldered to the pin strips.
Please make sure that the pin strips are soldered on at right angles so that they later also fit the breadboard. To do this, you can first solder a pin to each pin strip and after it has cooled down, put everything on the breadboard (do not plug it in yet) to check whether it fits. If OK, the other pins can then simply be soldered. If it is not yet OK (wrong angle), the angle of the pin bar can be easily corrected by heating the already soldered pin.
Solder the LCD1604
Now the IIC / I2C interface adapter is soldered to the underside of the LCD display. See the following figure.
In the next step, all components are placed on the breadboard. The LCD display is connected to the breadboard using female-male jumper cables. The following Fritzing diagram gives a good overview.
PREPARE THE SMART HOME SYSTEM
For the basic setup of Home Assistant see: https://www.home-assistant.io/getting-started/.
For the basic setup of ESPHome see: https://esphome.io/guides/getting_started_hassio.html
CONNECTION TO HOME ASSISTANT VIA ESPHOME
Create node in ESPHome
In Home Assistant we navigate as follows: Supervisor -> ESPHome -> Open user interface.
With the "+ symbol" we create a new node.
We store "smart_home_lcd_display" as the node name.
We select “Wemos D1 and Wemos D1 mini” as the device type.
Next we enter “WiFi SSID”, “WiFi Password” and “OTA Access Password”. The "OTA Access Password" is optional and provides additional security if we are going to transfer updates directly to the D1 Mini via WLAN in the future.
Finally we click on “Submit” under “Finish”.
Next we add the YAML configuration required for the display. To do this, we click on "Edit":
We can determine the entities required for the YAML configuration described below in Home Assistant in the following two figures.
Determination of entity ID for "bedroom temperature":
Determination of entity ID for "bedroom humidity":
Then we add the following lines at the end of the YAML configuration:# Display configuration entry
- platform: homeassistant
- platform: homeassistant
- platform: lcd_pcf8574
lambda: | -
it.printf (0, 0, "Temp.% .1f", id (temperature) .state);
it.print (12, 0, "C");
it.printf (0, 1, "Luftf.% .1f", id (humidity) .state);
it.print (12, 1, "%");
Upload the ESPHome configuration
Next, we connect the D1 Mini to the computer on which Home Assistant is running via a USB cable in order to be able to upload the configuration. In our case a Raspberry Pi.
Now we receive the notification “Discoved new serial port” from ESP Home. We can select the port in ESPHome. In our case / dev / ttyUSB0 (USB2.0-Serial).
Now we select the USB port in ESPHome at the top right. In our case / dev / ttyUSB0 (USB2.0-Serial).
And click on "upload" to upload the files required for ESPHome to our D1 Mini.
Now we can take a coffee break first, because the first upload takes a few minutes.
At the end of the upload, our display connects to the Home Assistant via WiFi. We can now disconnect the USB cable of the D1 Mini from the Raspberry Pi and plug it into a normal USB power supply unit or a power bank.
Add ESPHome Node to Home Assistant
Since Home Assistant does not automatically recognize our display, we proceed as described in this section.
First we click on "Settings" in Home Assistant.
There we click on "Integrations".
Then we click on "Add integration".
We select "ESPHome".
As the host, we enter the name of our previously set up ESPHome node, supplemented by ".local".
Now we assign the integration to the desired room.
Our display now has access to the sensor data and, if we have configured everything correctly, it should immediately show the sensor values.
Disclaimer - all information without guarantee:
The information contained in this tutorial (contribution) has been researched and compiled to the best of our knowledge and belief. However, mistakes can happen to us too. And something can also go wrong during the implementation of the tutorial or the content can be misunderstood. We cannot therefore accept any liability for any damage caused by following this tutorial. We are continuing to develop our tutorials. If something is inconsistent or unclear, please let us know so that we can correct or add to the point concerned. Thanks very much.