ESP8266 hangs in Cayenne.loop when WiFi Connection is lost

Just to clarify the last point: I am not writing to EEPROM every two seconds.If you check the code, you will see, that it only writes to the EEPROM when the system hangs up and needs to be reset - which happens in my configuration about once or twice per week.

he meant to say if there is no connection for a longer time, it will keep on writing.

Yep. If connection lost for a long time.
Wil be better if will be possible to send request to mqtt broker like udp. Without confirm. Without loop function. But as is…

In this case at this moment for my application ( fan cooling the basement) cold better than warm. Because my gadget turns to on before winter manually (220 power plug).

Method with resetting i already made at last winter. But in my case reseting will be every 10 seconds and after resetting push fan pin to 0 - signal to turn on the Fan. ( push gadget to safety position without any controls) Now i decide to upgrade before next winter. Because winter is coming (c) ))

I thinking about that after half-year cayenne guys update lib and solve this problem. But… no way…

you can add your sensor and actuator control in the ISR if it something small control you are doing.

Read date from 18ds20 and control relay? I think this spent more time than cycle of watchdog timer…

Depends how deep you want to get with this, but since you mentioned sending UDP data locally I’ll assume you have a local server already. You can use node-red as a gateway for your ESP device. Here’s my post on how to do it Using Node-RED as a Local Fallback Server

1 Like