ESPHome with 6 TM1637 crashing every 2-4 minutes

Hi, I used code from this forum to make world clock. It’s kind of working… Problem is that it crashes every 2-4 minutes. I’m using 6 TM1637 displays and 6 addressable LEDs. Clock is same for all displays (I tried separating and using two clocks 3x2 but same result). Power supply is first thing I thought of and it’s now connected to 5V 2A PSU and it also crashes constantly. In log I only get this every 30sec or so and in the moment of crash there is no specific info except of reconnection.

{'Corrupt packet received while decoding name': (<class 'zeroconf._exceptions.IncomingDecodeError'>,
                                                 IncomingDecodeError('Corrupt packet received while decoding name'),
                                                 <traceback object at 0x7fea3d31ff80>)}

Here is complete yaml, photo of clock and wiring

If anyone has any ideas it would be much appreciated.

Is that your esphome log or home assistant.

Log from esphome dashboard

Googling that error seems to show it is a zeroconf error, perhaps related to conflicting names.

I am unsure if it is causing your malfunction though.

Try starting with three clocks, and see if that works. Then keep adding until it fails.

I tried changing hostname but same message occurs. With 3 LCDs it’s also rebooting but every ~7 minutes.

Ok start with one, and build up. Also bump logging up.

I tried enabling very verbose but there is nothing related to crash. With one module it’s working ok (left it for 15hours and it didn’t crash) but as soon as I added one more it crashed after 7-8 minutes. I guess Ill make it from scratch without ESPHome.

Or try an esp32, far more capable.

1 Like

I wrote simple code from beginning that connects to wifi gets time from ntp sets zones and disaplys time on 6 LCD’s. It worked OK without resetting. Then because I liked how it looks with control from Home Assistant used initial ESPHome yaml, commented tm1637 and ntp code (left number switch and neopixel conf) compiled it (manual download) and downloaded folder from ESPHome which I opened in vscode, merged with my code and now everything works ok without crashes. There is definitely something wrong with ESPHome’s TM1637 implementation when multiple LCD’s are used. Im not that good at programming so that I can debug it but…

Post an issue in the esphome github. It may then get fixed.

Hi

If the error is due to zeroconf. That uses udp I guess.
You are using sntp as time source. That also uses udp I think.
You are changing the timezone everytime you update the time on each clock.
My thinking is maybe that trigger the situation that it kill the zeroconf parsing.
Normally you only set the timezone in the beginning and then the leave it. So changing it often is probably not tested that much. So when you have more clocks the more chance is that the issue happen.

So my suggestion is to try to use anther time source like homeassistant maybe that stop this from happening. The home assistant timesource is not using udp is my guess. Ntp uses udp too (I think).
So if it the udp handling that is the issue maybe maybe this could help.
This is very long shot guess.

/Mattias

I first tried with home assistant time and then switched to NTP because it was crashing. Zeroconf messages are probably from some other esp8266 on my network because they are showing up in log even when this device is offline.

Ok. It was a long shoot idea.
I hope you find the solution in the end.
/Mattias

It’s working now for me with my own code for tm1637 and I opened issue on GitHub so someone can look at it.

2 Likes