Unit periodically disconnects from wifi

Hello all. I have a new IoTaWatt device and I see issues with it periodically disconnecting from wifi and not reconnecting unless I power cycle. It does not appear to be a signal strength issue as RSSI is about -51. Non ESP8266 devices do not have this issue.

The wifi is an ASUS Zen Wifi XT8 2 node system. I have it configured for separate 2.4 and 5GHz bands. The 2.4GHz band has various things turned off (Wifi Agile Multiband, Target Wake Time, Protected Management Frames, etc) to try and avoid issues. Turning them off doesn’t seem to help any.

Does anybody have suggestions or information on known issues? Log below. Thanks!

** Restart **

SD initialized.

10/19/21 05:51:54z Real Time Clock is running. Unix time 1634622714

10/19/21 05:51:54z Power failure detected.

10/19/21 05:51:54z Reset reason: External System

10/19/21 05:51:54z ESP8266 ChipID: 4305228

10/19/21 05:51:54z IoTaWatt 5.0, Firmware version 02_06_05

10/19/21 05:51:54z SPIFFS mounted.

10/18/21 22:51:54 Local time zone: -8:00

10/18/21 22:51:54 Using Daylight Saving Time (BST) when in effect.

10/18/21 22:51:54 device name: IotaWatt

10/18/21 22:51:57 Connecting with WiFiManager.

10/18/21 22:52:00 HTTP server started

10/18/21 22:52:00 emoncms: Starting, interval:10, url:http://10.0.0.181:8888

10/18/21 22:52:00 WiFi connected. SSID=RadioOrion24, IP=10.0.0.106, channel=3, RSSI -50db

10/18/21 22:52:00 MDNS responder started for hostname IotaWatt

10/18/21 22:52:00 LLMNR responder started for hostname IotaWatt

10/18/21 22:52:00 timeSync: service started.

10/18/21 22:52:00 statService: started.

10/18/21 22:52:00 Updater: service started. Auto-update class is MINOR

10/18/21 22:52:00 dataLog: service started.

10/18/21 22:52:00 dataLog: Last log entry 10/18/21 22:51:45

10/18/21 22:52:01 historyLog: service started.

10/18/21 22:52:01 historyLog: Last log entry 10/18/21 22:51:00

10/18/21 22:52:01 emoncms: No existing inputs found for node IotaWatt.

10/18/21 22:52:01 emoncms: Start posting at 10/18/21 22:52:10

10/18/21 22:52:03 Updater: Auto-update is current for class MINOR.

10/19/21 04:00:26 WiFi disconnected.

10/19/21 04:01:26 WiFi connected. SSID=RadioOrion24, IP=10.0.0.106, channel=9, RSSI -51db

10/19/21 18:11:57 WiFi disconnected.

10/19/21 18:12:13 WiFi connected. SSID=RadioOrion24, IP=10.0.0.106, channel=2, RSSI -52db

10/19/21 21:59:27 WiFi disconnected.

** Restart **

SD initialized.

10/20/21 05:03:08z Real Time Clock is running. Unix time 1634706188

10/20/21 05:03:08z Power failure detected.

10/20/21 05:03:08z Reset reason: Power On

10/20/21 05:03:08z ESP8266 ChipID: 4305228

10/20/21 05:03:08z IoTaWatt 5.0, Firmware version 02_06_05

10/20/21 05:03:08z SPIFFS mounted.

10/19/21 22:03:08 Local time zone: -8:00

10/19/21 22:03:08 Using Daylight Saving Time (BST) when in effect.

10/19/21 22:03:08 device name: IotaWatt

10/19/21 22:03:11 Connecting with WiFiManager.

10/19/21 22:05:23 Did not connect after power-fail. Restarting to reset WiFi.

** Restart **

SD initialized.

10/20/21 05:05:24z Real Time Clock is running. Unix time 1634706324

10/20/21 05:05:24z Reset reason: Software/System restart

10/20/21 05:05:24z Trace: 11:20[2], 11:20[3], 11:21, 11:22, 11:21, 11:22, 11:20[4], 11:20[5], 11:20[6], 11:20[7], 11:25, 11:30, 11:30, 11:31, 11:32, 11:31, 31:100, 31:100, 31:100, 31:100, 31:101, 31:102, 3:100, 3:101, 3:102, 31:105, 31:105, 31:106, 11:35, 11:40, 11:45, 11:70

10/20/21 05:05:24z ESP8266 ChipID: 4305228

10/20/21 05:05:24z IoTaWatt 5.0, Firmware version 02_06_05

10/20/21 05:05:24z SPIFFS mounted.

10/19/21 22:05:24 Local time zone: -8:00

10/19/21 22:05:24 Using Daylight Saving Time (BST) when in effect.

10/19/21 22:05:24 device name: IotaWatt

10/19/21 22:05:24 HTTP server started

10/19/21 22:05:24 emoncms: Starting, interval:10, url:http://10.0.0.181:8888

10/19/21 22:05:24 timeSync: service started.

10/19/21 22:05:24 statService: started.

10/19/21 22:05:24 dataLog: service started.

10/19/21 22:05:24 dataLog: Last log entry 10/19/21 22:03:00

10/19/21 22:05:24 historyLog: service started.

10/19/21 22:05:24 historyLog: Last log entry 10/19/21 22:03:00

10/19/21 22:21:07 WiFi connected. SSID=RadioOrion24, IP=10.0.0.106, channel=8, RSSI -57db

10/19/21 22:21:07 MDNS responder started for hostname IotaWatt

10/19/21 22:21:07 LLMNR responder started for hostname IotaWatt

10/19/21 22:21:07 Updater: service started. Auto-update class is MINOR

10/19/21 22:21:07 emoncms: Start posting at 10/19/21 21:58:10

10/19/21 22:21:07 Updater: Auto-update is current for class MINOR.

10/20/21 04:00:27 WiFi disconnected.

10/20/21 04:01:20 WiFi connected. SSID=RadioOrion24, IP=10.0.0.106, channel=8, RSSI -52db

10/20/21 06:22:21 Updater: Invalid response from server. HTTPcode: -4

** Restart **

SD initialized.

10/20/21 18:01:12z Real Time Clock is running. Unix time 1634752872

10/20/21 18:01:12z Power failure detected.

10/20/21 18:01:12z Reset reason: Power On

10/20/21 18:01:12z ESP8266 ChipID: 4305228

10/20/21 18:01:12z IoTaWatt 5.0, Firmware version 02_06_05

10/20/21 18:01:12z SPIFFS mounted.

10/20/21 11:01:12 Local time zone: -8:00

10/20/21 11:01:12 Using Daylight Saving Time (BST) when in effect.

10/20/21 11:01:12 device name: IotaWatt

10/20/21 11:01:16 Connecting with WiFiManager.

10/20/21 11:01:18 HTTP server started

10/20/21 11:01:18 emoncms: Starting, interval:10, url:http://10.0.0.181:8888

10/20/21 11:01:18 WiFi connected. SSID=RadioOrion24, IP=10.0.0.106, channel=8, RSSI -54db

10/20/21 11:01:19 MDNS responder started for hostname IotaWatt

10/20/21 11:01:19 LLMNR responder started for hostname IotaWatt

10/20/21 11:01:19 timeSync: service started.

10/20/21 11:01:19 statService: started.

10/20/21 11:01:19 Updater: service started. Auto-update class is MINOR

10/20/21 11:01:19 dataLog: service started.

10/20/21 11:01:19 dataLog: Last log entry 10/20/21 11:01:05

10/20/21 11:01:19 historyLog: service started.

10/20/21 11:01:20 historyLog: Last log entry 10/20/21 11:01:00

10/20/21 11:01:20 emoncms: Start posting at 10/20/21 10:13:20

10/20/21 11:01:21 Updater: Auto-update is current for class MINOR.

The firmware that controls WiFi is provided by the MCU manufacturer, so no control over how that works. That’s complicated by the hundreds of different router and AP products out there. It’s impossible to understand and test all of the combinations. That said, these kinds of problems are almost always resolved from the router side.

Looking at the log, I see that the first two disconnects, at 04:00:26 and 18:11:57 were reconnected automatically within a minute or less. What’s interesting about these disconnects is that they reconnect on a different channel. The initial connection was on 3, then it disconnected and reconnected on 9, then again on 2. I could be wrong, but most routers operate on a single channel. So I think the disconnect is caused by the router deciding to switch to a different channel, and the reconnect is what you would expect. You say other devices don’t have this problem. I suggest that they also disconnected and reconnected, but don’t log the events.

So when it disconnected at 21:59:27, it possibly switched to a channel that was, for some reason, problematic for the IoTaWatt. Restarts had no effect, then out of the blue at 22:21:07, it connects on channel 8.and has been working ever since, even through a disconnect/reconnect cycle at 04:01:20.

The popular and recommended 2.4 GHz channels are 1, 6 and 11. This avoids overlap between adjascent channels (not just you but your neighbors), and seems to work best with resoect to other 2.4GHz devices.

If you can fix your router to one of thos channels, you might have fewer disconnects and better recovery.

Thanks for the quick response. I will do some scanning to see if I can identify a quiet channel and try setting the router to use that fixed channel.