Iotawatt not retrying to connect to Wi-Fi following a power failure


Typically after a power failure, the iotawatt is the first thing to be back online thanks to very fast boot time.

However, as the Wi-Fi router takes longer to boot, the iotawatt led will just blink red and stay that way; until you restart it after the Wi-Fi router.

Is there a way to set the iotawatt to retry connecting to the Wi-Fi network?

It will restart after one-hour if not connected. What release are you on?


Any chances to make this interval smaller?

There are users in Europe that turn off their routers at night. I don’t know why they do that, but restarting every 10 minutes all night would seem excessive. One hour has been a good compromise.

But the reason that I asked about your release is that a later release has a fix for a reconnect issue that might solve your problem. 02_05_05 has been in ALPHA for three weeks, and BETA for two weeks. No significant problems. So I anticipate it going MINOR in one to two weeks, then MAJOR probably a month after that.

Then what about a compromise where it only retry often right after booting? Like first 1 minute (which I guess would be good enough for the case I’m talking about), then 5, 10

If it lost Wi-Fi after being connected at least once, it can use longer intervals.

Having said that, I can’ttthink of any device taking so long to try connecting to Wi-Fi. Even battery powered devices.

Exactly, and that’s why I’m saying that the changes in the next release may resolve your problem without resorting to the heroics of restarting.

You misunderstood my earlier post.
I have no issue with how long it takes to connect to an available wifi, but the times it take to connect to wifi that becomes newly available.

That it effectively takes 1h after a power outage for wifi to connect.
I don’t use the built-in Graphing capabilities of the iotawatt but use it as a data logger where it gets queries by my existing system.
This leads to 1h gap in my records.

I understood the problem. It takes an hour to get to the restart when it doesn’t connect initially.

This is not an easy fix. It would require developing code to replace the failing package that I use (WiFiManager) which works OK in all other respects. I can see myself trading one problem for several others. Better the devil that you know.

This is not a data integrity issue for virtually all users that push their data to one or more of the supported servers. If you are pulling with query, the data is there, and it’s there because after three minutes we quit fooling around with the WiFi and get back to monitoring. They are mutually exclusive.

When I get some time, I’ll revisit and try a few random things to see if I can make it connect, but I have to avoid the laws of unintended consequences and it takes a long time to test this area of the code because we are inherently working with delays of several minutes every time.

I see.

What about an option to choose between “regularly retry to connect on Wi-Fi like any normal device would”
And “don’t retry to connect to please irrational European behaviour that make them feel safer at night” :slight_smile:

What about a ups for your router?

1 Like