dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
463 stars 112 forks source link

Devices become unavailable every 15 minutes #201

Closed erdeidominik99 closed 6 months ago

erdeidominik99 commented 9 months ago

Hello! My devices become unavailable in HA every 15 mins, and after some seconds it reconnects.

erkr commented 8 months ago

I have the same, but not a fixed period. varies for a few minutes to 20 minutes. My manual MQTT implementation doesn't have this issue

erdeidominik99 commented 8 months ago

I solved it, it was caused by my firewall, becsause the device was in a separate lan, and the tcp connection disconnected because of nat.

erkr commented 8 months ago

Hmm, I think fixed it as well by just adding a small delay of 5 msec in the loop(). It is running stable now for over an hour 🤞

Update: 9 hours stable, seems really fixed