7-Segment Display TM1637 via ESP01 and MQTT on Home Assistant for newbees #21231
karefor
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
The old display stopped working. This only worked with GPIO 0 for DIO. So I used this settings on the ESP01: At Configure Template: Good Luck :-) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To display the values via MQTT and 7-Segment Display I used gitpod and tasmota master to compile and added the lines
#ifndef USE_DISPLAY
#define USE_DISPLAY
#endif
#ifndef USE_DISPLAY_TM1637
#define USE_DISPLAY_TM1637
#endif
(from https://tasmota.github.io/docs/TM163x/) click ">"
and if you need "MQTT Subscribe" also add:
#ifndef SUPPORT_MQTT_EVENT
#define SUPPORT_MQTT_EVENT
#endif
(from https://tasmota.github.io/docs/MQTT/#clearing-retained-messages)
both in user_config_override.h before the last "endif".
There is a nice video on youtube from vccground where he explains how to compile: (from minute 2:20):
https://www.youtube.com/watch?v=WashxTcHiDc
To get shown something on the Display write in Tasmota console e.g.:
DisplayNumber 1234
(from https://tasmota.github.io/docs/TM163x/#tm1638-leds-and-buttons)
How to send the values from Home Assistant to your display-ESP:
Via Einstellungen/Automatisierungen & Szenen Automatisierung erstellen neue Automatisierung erstellen
choose "when entity changes state or any attributes"
Dann mache / Aktion hinzufügen / (here search for "mqtt") choose "MQTT: Veröffentlichen"
at Topic I used:
cmnd/tasmota_200D02/Displaynumber
(tasmota_200D02 has to be replaced with the topic name of y o u r ESP. You will find it at Configuration/Configure MQTT. It is the name after %topic% (tasmota_200D02) in the brackets.)
at Nutzlast-Vorlage I used:
{{ float(states('sensor.tasmota_lk13be_current')) | round(0) }}, 0, 0, 4
(, 0, 0, 4 makes the ciphers right-aligned)
Instead of "sensor.tasmota_lk13be_current" you have to use your own sensors name.
(from #19596)
In the beginning I also had some difficulties with the soldering of the connection-pins of the TM1637 because there was not enough tin solder at the data and clock pins...
Enjoy!
Beta Was this translation helpful? Give feedback.
All reactions