Closed axwell closed 6 months ago
Thanks from your comment. The script has also the possibility to auto restart after an interval to prevent such situations but please let me know what did you changed and confirm also the running time without any stop in order to decide the update of the main.py
yeah the auto-restart it's ok, but if it stops after 2-3 h then you loose important data in HA.
I just changed
from umqtt.simple import MQTTClient
to
from umqtt.robust import MQTTClient
For me it's now stable and runs fine over 2 days.
Thanks for testing. I will release a new version soon.
It looks like esp32 fails to send data to mqtt server within 24h of running. replacing umqtt.simple with umqtt.robust fixes the issue.
https://github.com/micropython/micropython-lib/tree/master/micropython/umqtt.robust
" It consists of two submodules: umqtt.simple and umqtt.robust. umqtt.robust is built on top of umqtt.simple and adds auto-reconnect facilities for some of networking errors."