Esp8266 needs reset after router reboot

Hey all,
I had to restart my router, a rare occurrence, and I lost communication with my esp8266 boards. After the reboot I had to reset all of my esp8266 boards. I'm communicating with them through Mosquito and MQTT.

Is there a way to reconnect without having to reset?


If they are not connected to wifi you don't have many options.

Powering off and back on is probably easiest, you shouldn't lose anything.

This is a node red forum so you may get better/more advice in a ESP forum. You talk about MQTT so I presume you are using some type of WIFI but you don't say what libraries you use either. There should be a couple of commands
or some form there of you should be using.


There is a ESP.restart command, you could possibly add a loop with a heartbeat count from incoming MQTT messages and issue a restart?

If you disable wifi in the router for 60 seconds and then enable it again do you see the same problem?

I use ESPHome in all my "home brewed ESP device setups", they all reconnect automatically via wifi when and if needed. The same goes for all my Shelly devices. Maybe consider other sw packages for your devices?

Looks like the software in you ESP8266 is not testing for wifi and mqtt connection on regular base.
It's way out of scope of this forum to help you with that. Have a look here to see how to solve this issue.

I didn't realise I was looking for something like this.

I hope it helps the OP too.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.