Failure after power outage - RESOLVED

There appears to be more to this story. Going back to Dec 6

I can see that clearly in the log for Dec 5 when the switch was made to BELL501 SSID. Initially it was using chanmnel 2 and has an RSSI of -48db, which is great. After about 14 hours, WiFi disconnected and came back on channel 10, then disconnected 10 minutes later and came back again a minute later, still on channel 10.

About 15 hours later, WiFi disconnected. After a power cycle restart an hour later, your Emoncms status indicates that the IoTaWatt had caught up 24 days of data and was current as on the disconnect.

After the power-cycle restart, WiFi went to channel 6 and started a long string of disconnect/connect cycles that went on for days from 12/8 to 12/12. Although the WiFi disconnected over 750 times during this period, there were no other problems and at the end, the IoTaWatt had managed to keep Emoncms up to date.

Eventually, the WiFi errors took their toll, and an incomplete HTTP request was detected forcing a reboot. After the reboot, there was a disconnect/connect cycle after about 15 minutes, and another after about 7 hours. An hour later it disconnected and never reconnected. An hour after that, the IoTaWatt auto restarted because it had not connected for an hour, and continued to do that for a day or so.

When WiFi resurfaces and connects, it is now on channel 1 with a just OK RSSI of -74db and falls back into a series of disconnects/reconnects with associated heap memory degradation. Again, throughout, monitoring seems to be fine and Emoncms is being updated. As of the log posting on 12/16 20:53, the WiFi was back to channel 6, Emoncms was being updated, but problems were ongoing.

So the problem is WiFi. Everything else can be related to the WiFi issues. At this point you have installed a new router and cannot seem to get past it. There is the issue of the channels switching, but the RSSI on all of them is fine at connect time. My current short list of suspects are:

  1. There is something causing interference that jams the WiFi for short periods. I have no idea what that might be, only you can guess. The fact that it was happening every 4-10 minutes for several days solid, then becam,e more intermittent, leads me to think it’s something environmental.

  2. The USB power supply may not be supplying adequate current for the WiFi radio. These are good supplies from a well known company (CUI). I’ve never had trouble, but there’s always a first time.

  3. The WiFi on the ESP8266 may be defective. This has not been a problem, although there are other users with WiFi issues that have had to rehabilitate their WiFi to get the IoTaWatt to work reliably. Maybe because it is frequently installed in a basement next to a metal box with lots of high voltage AC wires around.

So I can’t do anything about the first possibility - local interference, but I can send you a replacement unit and power supply to rule out the other two.

Hi overeasy,

I cant think of a obvious cause of interference. The IotaWatt and its router are in a laundry room about 24" apart, but will keep thinking about it.

I had the new router on automatic channel selection, but have just assigned it to channel 2. I have a Raspberry Pi 2.5A power supply which I have plugged into the IotaWatt and I’ll leave it to run over night.

Initial results are that it connects right away (dim green) but I can’t access it over it’s IP; either it times out, or loads the config menu but clicking the buttons doesn’t do anything.

I’ll update in the morning!

Hi overeasy,

Seems like there were no new messages over the last 12 hours. The LED is dim green, but I still cannot connect to Iotawatt on its IP.

SD initialized.
12/18/19 00:51:18z Real Time Clock is running. Unix time 1576630278
12/18/19 00:51:18z Power failure detected.
12/18/19 00:51:18z Reset reason: External System
12/18/19 00:51:18z ESP8266 ChipID: 6147434
12/18/19 00:51:18z IoTaWatt 5.0, Firmware version 02_04_02
12/18/19 00:51:18z SPIFFS mounted.
12/17/19 20:51:19 Local time zone: -4:00
12/17/19 20:51:19 Using Daylight Saving Time (BST) when in effect.
12/17/19 20:51:19 device name: IotaWatt
12/17/19 20:51:22 Connecting with WiFiManager.
12/17/19 20:51:25 MDNS responder started for hostname IotaWatt
12/17/19 20:51:25 LLMNR responder started for hostname IotaWatt
12/17/19 20:51:25 HTTP server started
12/17/19 20:51:25 WiFi connected. SSID=BELL501, IP=10.10.10.47, channel=2, RSSI -60db
12/17/19 20:51:25 timeSync: service started.
12/17/19 20:51:29 statService: started.
12/17/19 20:51:29 Updater: service started. Auto-update class is MINOR
12/17/19 20:51:29 dataLog: service started.
12/17/19 20:51:29 dataLog: Last log entry 12/17/19 20:50:35
12/17/19 20:51:30 EmonService: started. url=10.10.10.30:80, node=IotaWatt, interval=10
12/17/19 20:51:37 Updater: Auto-update is current for class MINOR.

I’m starting to suspect the WiFi module.

So how did you get this log display?

Good morning,

I had to pull the SD card to copy the message log.

It’s possible, but WiFi appears to be working fine to Emoncms, NTP checks, and auto-update checks. So it looks more to me like a browser issue. What browser(s) are you using and what platform are they running on? Are they connected to this BELL501 network?

Can you turn on the javascript debug in the browser (PF12) and select network, then reload (PF5) the IoTaWatt App, then post the entire screen with the app window and the network trace?

Hi overeasy,

I can’t connect to it from either directly connected to its network or my regular home network (which I used to be able to).

I’ve tried Firefox and Vivaldi on Linux, and Chrome and Firefox on Windows.

I have gotten very weird values in my emoncms (eg, today it has my consumption at 800kWh and production at 240kWh.

LED is still dull green. I can see it connected happily to the network on its fixed IP address if I SSH into the router.

I’m working on the screenshots - this is new territory for me :slight_smile:

Javascript came up blank, unless I have done this wrong. Thanks for the patience.

I have my laptop hardwired into the router during this trace.

Can you try adding HTTP:// to the IP address and ending it with /

Adding the above has the same result. Both on a Linux and widows browser.

If I open up my local Emoncms, all inputs are now ‘inactive.’

When was the last update to Emoncms? You can see by plotting one of the feeds.

Also, can you get the log including and continuing from the segment you posted above?

Is Emoncms on the BELL501 network?

Hi overeasy,

The last update on Emoncms was Monday at 20:00 about the time we started troubleshooting this unit again.

The Emoncms is connect to the same router over ethernet.

I’ve attached the log as it’s quite long today. The HEAP memory failures are back.

Also, I still have the WiFi locked on channel 2 and am still using a Raspberry Pi 2.5 power supply.

Only other item of interest is that Windows 7 doesn’t recognize the SD Card, and asked to format it. I had to use a Linux machine to grab the log file - not sure if this is relevant.
IOTAMSGS.TXT (1.5 MB)

I’m really confused now. The log shows the IoTaWatt struggling to upload data because of WiFi problems, but the last reported date was 11/21/19 - almost a month ago.

12/19/19 12:31:59 Updater: Invalid response from server. HTTPcode: -4
12/19/19 12:32:47 historyLog: service started.
12/19/19 12:32:47 historyLog: Last log entry 12/19/19 12:31:00
12/19/19 12:35:43 EmonService: get input list failing, code: -4
12/19/19 12:52:24 EmonService: Start posting at 11/21/19 19:04:20
12/19/19 12:52:44 EmonService: HTTP response -4, retrying.
12/19/19 13:11:35 Heap memory has degraded below safe minimum, restarting.

Have you deleted the Emoncms inputs lately by any chance?

Windows should be able to mount the SD card, is this something new? Have you removed or inserted the SDcard to the IoTaWatt while it was powered on?

Indeed very strange,

No I’ve always unplugged the unit before taking the SD Card out.

No, I haven’t made any changes to Emoncms since I got my Iotawatt.

Today was the first time I tried to use a windows machine.

What about formatting the SD card and just starting from scratch?

Please give me your order number or PM your name and address so I can just send you another unit.