Wifi connection hangs

My browser access to the iotawatt seems to get hung up frequently. Sometimes it will eventually connect. Right now I checked the LED and it was dull green, but still not connecting. My router info showed that it was on the wifi network. After several minutes I rebooted the device and it came back. Is there any debugging info I can extract?

If you post the recent message log, I can take a look.

Here ya go. thx
1/29/20 06:00:21 WiFi connected. SSID=NETGEAR96, IP=192.168.1.6, channel=9, RSSI -59db
1/29/20 06:00:21 Updater: service started. Auto-update class is MAJOR
1/29/20 06:00:22 Updater: Auto-update is current for class MAJOR.
1/29/20 22:00:17 WiFi disconnected.
1/29/20 23:00:17 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 06:00:19z Real Time Clock is running. Unix time 1580364019 
1/30/20 06:00:19z Reset reason: Software/System restart
1/30/20 06:00:19z Trace:  1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[11], 1:2[12], 9:0[12], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[5], 5:0, 1:6, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 06:00:19z ESP8266 ChipID: 6148209
1/30/20 06:00:19z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 06:00:19z SPIFFS mounted.
1/29/20 23:00:20 Local time zone: -7:00
1/29/20 23:00:20 Using Daylight Saving Time (BST) when in effect.
1/29/20 23:00:20 device name: IotaWatt
1/29/20 23:00:20 MDNS responder started for hostname IotaWatt
1/29/20 23:00:20 LLMNR responder started for hostname IotaWatt
1/29/20 23:00:20 HTTP server started
1/29/20 23:00:20 timeSync: service started.
1/29/20 23:00:20 statService: started.
1/29/20 23:00:20 dataLog: service started.
1/29/20 23:00:20 dataLog: Last log entry 01/29/20 23:00:15
1/29/20 23:01:20 historyLog: service started.
1/29/20 23:01:20 historyLog: Last log entry 01/29/20 23:00:00
1/30/20 00:00:21 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 07:00:22z Real Time Clock is running. Unix time 1580367622 
1/30/20 07:00:22z Reset reason: Software/System restart
1/30/20 07:00:22z Trace:  1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[4], 1:2[5], 9:0[5], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 07:00:22z ESP8266 ChipID: 6148209
1/30/20 07:00:22z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 07:00:22z SPIFFS mounted.
1/30/20 00:00:23 Local time zone: -7:00
1/30/20 00:00:23 Using Daylight Saving Time (BST) when in effect.
1/30/20 00:00:23 device name: IotaWatt
1/30/20 00:00:23 MDNS responder started for hostname IotaWatt
1/30/20 00:00:23 LLMNR responder started for hostname IotaWatt
1/30/20 00:00:23 HTTP server started
1/30/20 00:00:23 timeSync: service started.
1/30/20 00:00:23 statService: started.
1/30/20 00:00:23 dataLog: service started.
1/30/20 00:00:23 dataLog: Last log entry 01/30/20 00:00:20
1/30/20 00:01:23 historyLog: service started.
1/30/20 00:01:23 historyLog: Last log entry 01/30/20 00:00:00
1/30/20 01:00:24 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 08:00:25z Real Time Clock is running. Unix time 1580371225 
1/30/20 08:00:25z Reset reason: Software/System restart
1/30/20 08:00:25z Trace:  1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[1], 1:2[2], 9:0[2], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 08:00:25z ESP8266 ChipID: 6148209
1/30/20 08:00:25z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 08:00:25z SPIFFS mounted.
1/30/20 01:00:26 Local time zone: -7:00
1/30/20 01:00:26 Using Daylight Saving Time (BST) when in effect.
1/30/20 01:00:26 device name: IotaWatt
1/30/20 01:00:26 MDNS responder started for hostname IotaWatt
1/30/20 01:00:26 LLMNR responder started for hostname IotaWatt
1/30/20 01:00:26 HTTP server started
1/30/20 01:00:26 timeSync: service started.
1/30/20 01:00:26 statService: started.
1/30/20 01:00:26 dataLog: service started.
1/30/20 01:00:26 dataLog: Last log entry 01/30/20 01:00:20
1/30/20 01:01:26 historyLog: service started.
1/30/20 01:01:26 historyLog: Last log entry 01/30/20 01:00:00
1/30/20 02:00:27 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 09:00:28z Real Time Clock is running. Unix time 1580374828 
1/30/20 09:00:28z Reset reason: Software/System restart
1/30/20 09:00:28z Trace:  1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[8], 1:2[9], 9:0[9], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 09:00:28z ESP8266 ChipID: 6148209
1/30/20 09:00:28z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 09:00:28z SPIFFS mounted.
1/30/20 02:00:29 Local time zone: -7:00
1/30/20 02:00:29 Using Daylight Saving Time (BST) when in effect.
1/30/20 02:00:29 device name: IotaWatt
1/30/20 02:00:29 MDNS responder started for hostname IotaWatt
1/30/20 02:00:29 LLMNR responder started for hostname IotaWatt
1/30/20 02:00:29 HTTP server started
1/30/20 02:00:29 timeSync: service started.
1/30/20 02:00:29 statService: started.
1/30/20 02:00:29 dataLog: service started.
1/30/20 02:00:29 dataLog: Last log entry 01/30/20 02:00:25
1/30/20 02:01:29 historyLog: service started.
1/30/20 02:01:29 historyLog: Last log entry 01/30/20 02:00:00
1/30/20 03:00:30 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 10:00:31z Real Time Clock is running. Unix time 1580378431 
1/30/20 10:00:31z Reset reason: Software/System restart
1/30/20 10:00:31z Trace:  9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[19], 1:6, 1:1[5], 1:2[6], 9:0[6], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 10:00:31z ESP8266 ChipID: 6148209
1/30/20 10:00:31z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 10:00:31z SPIFFS mounted.
1/30/20 03:00:32 Local time zone: -7:00
1/30/20 03:00:32 Using Daylight Saving Time (BST) when in effect.
1/30/20 03:00:32 device name: IotaWatt
1/30/20 03:00:32 MDNS responder started for hostname IotaWatt
1/30/20 03:00:32 LLMNR responder started for hostname IotaWatt
1/30/20 03:00:32 HTTP server started
1/30/20 03:00:32 timeSync: service started.
1/30/20 03:00:32 statService: started.
1/30/20 03:00:32 dataLog: service started.
1/30/20 03:00:32 dataLog: Last log entry 01/30/20 03:00:30
1/30/20 03:01:32 historyLog: service started.
1/30/20 03:01:32 historyLog: Last log entry 01/30/20 03:00:00
1/30/20 04:00:33 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 11:00:34z Real Time Clock is running. Unix time 1580382034 
1/30/20 11:00:34z Reset reason: Software/System restart
1/30/20 11:00:34z Trace:  1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[6], 1:2[7], 9:0[7], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 11:00:34z ESP8266 ChipID: 6148209
1/30/20 11:00:34z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 11:00:34z SPIFFS mounted.
1/30/20 04:00:35 Local time zone: -7:00
1/30/20 04:00:35 Using Daylight Saving Time (BST) when in effect.
1/30/20 04:00:35 device name: IotaWatt
1/30/20 04:00:35 MDNS responder started for hostname IotaWatt
1/30/20 04:00:35 LLMNR responder started for hostname IotaWatt
1/30/20 04:00:35 HTTP server started
1/30/20 04:00:35 timeSync: service started.
1/30/20 04:00:35 statService: started.
1/30/20 04:00:35 dataLog: service started.
1/30/20 04:00:35 dataLog: Last log entry 01/30/20 04:00:30
1/30/20 04:01:35 historyLog: service started.
1/30/20 04:01:35 historyLog: Last log entry 01/30/20 04:00:00
1/30/20 05:00:36 WiFi disconnected more than 60 minutes, restarting.

** Restart **

SD initialized.
1/30/20 12:00:37z Real Time Clock is running. Unix time 1580385637 
1/30/20 12:00:37z Reset reason: Software/System restart
1/30/20 12:00:37z Trace:  1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[6], 1:2[7], 9:0[7], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:4, 1:5[21], 21:0, 21:2
1/30/20 12:00:37z ESP8266 ChipID: 6148209
1/30/20 12:00:37z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 12:00:37z SPIFFS mounted.
1/30/20 05:00:38 Local time zone: -7:00
1/30/20 05:00:38 Using Daylight Saving Time (BST) when in effect.
1/30/20 05:00:38 device name: IotaWatt
1/30/20 05:00:38 MDNS responder started for hostname IotaWatt
1/30/20 05:00:38 LLMNR responder started for hostname IotaWatt
1/30/20 05:00:38 HTTP server started
1/30/20 05:00:38 timeSync: service started.
1/30/20 05:00:38 statService: started.
1/30/20 05:00:38 dataLog: service started.
1/30/20 05:00:38 dataLog: Last log entry 01/30/20 05:00:35
1/30/20 05:01:38 historyLog: service started.
1/30/20 05:01:38 historyLog: Last log entry 01/30/20 05:00:00
1/30/20 06:00:23 WiFi connected. SSID=NETGEAR96, IP=192.168.1.6, channel=3, RSSI -62db
1/30/20 06:00:23 Updater: service started. Auto-update class is MAJOR
1/30/20 06:00:24 Updater: Auto-update is current for class MAJOR.

** Restart **

SD initialized.
1/30/20 16:48:49z Real Time Clock is running. Unix time 1580402929 
1/30/20 16:48:49z Power failure detected.
1/30/20 16:48:49z Reset reason: Power on
1/30/20 16:48:49z ESP8266 ChipID: 6148209
1/30/20 16:48:49z IoTaWatt 5.0, Firmware version 02_05_02
1/30/20 16:48:49z SPIFFS mounted.
1/30/20 09:48:50 Local time zone: -7:00
1/30/20 09:48:50 Using Daylight Saving Time (BST) when in effect.
1/30/20 09:48:50 device name: IotaWatt
1/30/20 09:48:53 Connecting with WiFiManager.
1/30/20 09:48:56 MDNS responder started for hostname IotaWatt
1/30/20 09:48:56 LLMNR responder started for hostname IotaWatt
1/30/20 09:48:56 HTTP server started
1/30/20 09:48:57 WiFi connected. SSID=NETGEAR96, IP=192.168.1.6, channel=3, RSSI -63db
1/30/20 09:48:57 timeSync: service started.
1/30/20 09:48:57 statService: started.
1/30/20 09:48:57 Updater: service started. Auto-update class is MAJOR
1/30/20 09:48:57 dataLog: service started.
1/30/20 09:48:57 dataLog: Last log entry 01/30/20 09:48:35
1/30/20 09:48:58 Updater: Auto-update is current for class MAJOR.
1/30/20 09:49:57 historyLog: service started.
1/30/20 09:49:57 historyLog: Last log entry 01/30/20 09:48:00

I shut off my wifi for most of the night, that’s why you see the “WiFi disconnected…”

right now, I can get to the device with the IP address, but not iotawatt.local?

Shutting down the router at night probably has a lot to do with it. The LED should glow dull red when the router is off, and change back to green when it reconnects.

Sometimes it will reconnect as soon as the WiFi comes back on the air, sometimes it won’t. That’s why the IoTaWatt restarts after being disconnected for an hour. It’s not a problem that it does because restart literally takes a couple of seconds, but it does clutter the message log.

The ability to connect with a .local domain name is a luxury provided by a local protocol first developed by Apple and called Bonjour. It’s now called mDNS for “Multicast Domain Name Service”. Microsoft has their own version called LLMNR for Link-Local Multicast Name Resolution. They do essentially the same thing, but big surprise - Apple and Microsoft couldn’t get together on it.

So IoTaWatt supports both systems, essentially waiting for a host to broadcast a request on the local LAN asking for IoTaWatt to identify itself. Which of the two protocols a browser device uses is not something I control, and some devices do not support it at all. Where there is none, it is sometimes possible to install Bonjour to get mDNS. Bottom line is that there could be hundreds of reasons why iotawatt.local isn’t working, but cycling the router daily probably has something to do with it.

The IP should always work. It would make sense to assign a fixed IP to the IoTaWatt MAC address in your router, and simply bookmark that IP based URL in your browser.

I don’t see anything else out of the ordinary in your message log.

Thx. I’ll make the IP address static and use that.
I’m running ubuntu 18.04 and firefox browser.

You could try installing Bonjour if available for Ubuntu

Some routers / Wi-fi systems have settings that allow/deny one or both of the variants of mdns (the .local support) sometimes this is obvious, sometimes it is squirrelled away under privacy, security or services. Occasionally it is an aggressive firewall rule.

It might be worth checking the setup on your router and/or the wireless access point

1 Like

The name server seems to work everywhere else. I have 2 linux machines and 1 Mac, and I can use machinename.local everywhere else for ssh and nfs connections. There is no mention of LLMNR, bonjour, or mDNS in the netgear router manual.
I’m good to use the ip address, I made it static.

With a static ip allocated you can edit the hosts file on your desktop and call the iotawatt anything you like.