Home Assistant: 2020.12.7
ESPHome: v.1.15.3
Sensor: NodeMcu (with MQTT)
Since a few days I recognized some strange flickering in my hassio lovelace UI.
See Video: Link (right side, “Corridor” panel)
This flickering occurs every ~2minutes.
Nearly at the same time I can see the following MQTT messages. State switch from online to offline for a frew milliseconds every ~2minutes.
good idea, thank you. As far as I can say the ESPHome and HA System logs looking ok for me.
In MQTT logs I found several timeout errors. This is confusing for me, because the signal strength from all of my sensors are good. (also ICMP-Pings are ok ~4ms)
Timeout in MQTT logs occurs also if I ping the sensor. The ping was still good at about ~4ms without any interruptions.
What can I do to reduce these timeout problems? Any ideas?
MQTT Logs:
1608201220: New connection from <IP>.165 on port 1883.
1608201220: New client connected from <IP>.165 as DVES_58F4C1 (p2, c1, k30, u'<user>').
1608201221: New connection from <IP>.161 on port 1883.
1608201221: New client connected from <IP>.161 as ff_corridor_msens_01-mac(p2, c1, k15, u'<user>').
1608201221: New connection from <IP>.157 on port 1883.
1608201221: New client connected from <IP>.157 as ff_kitchen_relay_8ch_01-mac(p2, c1, k15, u'<user>').
1608201262: Saving in-memory database to /data/mosquitto/mosquitto.db.
1608201275: Client ff_corridor_msens_01-mac has exceeded timeout, disconnecting.
1608201275: New connection from <IP>.161 on port 1883.
1608201275: New client connected from <IP>.161 as ff_corridor_msens_01-mac (p2, c1, k15, u'<user>').
1608201276: Client ff_kitchen_relay_8ch_01-mac has exceeded timeout, disconnecting.
1608201276: New connection from <IP>.157 on port 1883.
1608201276: New client connected from <IP>.157 as ff_kitchen_relay_8ch_01-mac(p2, c1, k15, u'<user>').
1608201296: Client DVES_58F4C1 has exceeded timeout, disconnecting.
1608201296: New connection from <IP>.165 on port 1883.
1608201296: New client connected from <IP>.165 as DVES_58F4C1 (p2, c1, k30, u'<user>').
thanks for pushing me in right direction.
I think that I could solve my issue.
I did the following:
The mentioned MQTT AddOn from my previous post seems to be deprecated. I uninstalled it and using now “Mosquitto broker” v.5.1 from official home assistant AddOn store.
I had a fallback network configuration. (LAN+WIFI)
I removed the WIFI connection and will handle the fallback outside of home assistant. (LoadBalancer, etc…)
One downside: I did both changes at once. So I am not sure which step has solved the problem
Thanks for your help!