New IoTaWatt, getting error saving inputs

I had an electrician install my IoTaWatt and the CTs. I followed the guide, connected to wifi, and started setting up the inputs. When I click the save button, generally it takes 5 to 19 seconds, and the operation fails without any visual indication. When I check the browser dev tools, it shows that the POST to “edit” with the new inputs fails (no response). I’ve tried this with Firefox and chrome, using both “iotawatt.local” and the IP address, and via a phone browser. Version 4 device (new), firmware 2.04.

I did at some point get two of the inputs (the two panel legs) to be entered and saved eventually, and they show some power flow. I just can’t enter any others.

Update: I’m actually wondering how this is working for other people. I see this in webServer.cpp:
if(serverOn(authAdmin, F("/edit"), HTTP_PUT, handleCreate)) return;
While in the index.htm file it has:
var URI = “/edit”;
xmlHttp.open(“POST”, URI);

The methods don’t match.

Sorry to hear you are having trouble. Let’s start at the top.

What is the state of the LED.

Can you get the status display and does it update?

Can you post a screen shot of the status display?

Can you view the message log and if so can you post that?

Saving the config does work very reliably. Something else is going on.

Thanks for your help. The input save worked for about a minute when I came back to it, then started erroring again.

The LED is mostly a steady green (sometimes flashing a little brighter). The status screen does update.

Status page:

Message log:
ESP8266 ChipID: 2528219
IoTaWatt 4.x, Firmware version 02_04_00
SPIFFS mounted.
Local time zone: +0:00
device name: IotaWatt
Connecting with WiFiManager.

** Restart **

SD initialized.
Real Time Clock not initialized.
Reset reason: Power on
Trace: 142:225[51], 199:51[59], 73:239[116], 170:128[26], 180:141[45], 232:16[184], 5:244[232], 217:150[85], 218:5[249], 150:193[245], 67:207[58], 44:164[46], 225:188[99], 43:196[201], 196:91[250], 124:17[11], 44:215[187], 113:150[247], 64:145[249], 1:142[119], 172:146[150], 156:104[82], 158:189[68], 30:114[117], 33:108[94], 199:242[79], 194:223[60], 113:20[107], 140:83[55], 126:110[32], 3:143[176], 180:36[200]
ESP8266 ChipID: 2528219
IoTaWatt 4.x, Firmware version 02_04_00
SPIFFS mounted.
Local time zone: +0:00
device name: IotaWatt
Connecting with WiFiManager.
RTC not running, waiting for WiFi.
MDNS responder started for hostname IotaWatt
LLMNR responder started for hostname IotaWatt
HTTP server started
WiFi connected. SSID=ATT22WAX7Q, IP=192.168.1.70, channel=7, RSSI -63db
timeSync: service started.
statService: started.
Updater: service started. Auto-update class is ALPHA
6/04/19 18:32:05z timeSync: RTC initalized to NTP time
6/04/19 18:32:05z dataLog: service started.
6/04/19 18:32:05z dataLog: New current log created.
6/04/19 18:32:08z Updater: Auto-update is current for class ALPHA.
6/04/19 18:34:05z historyLog: service started.
6/04/19 18:34:05z historyLog: first entry 06/04/19 18:33:00
6/04/19 15:07:29 Updater: Auto-update class changed to MINOR
6/04/19 15:07:30 Updater: Auto-update is current for class MINOR.
6/05/19 17:10:14 Updater: Invalid response from server. HTTPcode: -11
6/05/19 19:10:17 Updater: Invalid response from server. HTTPcode: -4
6/06/19 13:12:04 Updater: Invalid response from server. HTTPcode: -11
6/06/19 14:28:05 Restart command received.

** Restart **

SD initialized.
6/06/19 18:28:07z Real Time Clock is running. Unix time 1559845687
6/06/19 18:28:07z Reset reason: Software/System restart
6/06/19 18:28:07z 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:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[1], 1:2, 9:0, 9:0, 8:4, 8:6, 8:8, 8:9, 1:2, 1:3, 10:2, 10:3
6/06/19 18:28:07z ESP8266 ChipID: 2528219
6/06/19 18:28:07z IoTaWatt 4.x, Firmware version 02_04_00
6/06/19 18:28:07z SPIFFS mounted.
6/06/19 14:28:08 Local time zone: -5:00
6/06/19 14:28:08 Using Daylight Saving Time (BST) when in effect.
6/06/19 14:28:08 device name: IotaWatt
6/06/19 14:28:08 MDNS responder started for hostname IotaWatt
6/06/19 14:28:08 LLMNR responder started for hostname IotaWatt
6/06/19 14:28:08 HTTP server started
6/06/19 14:28:08 timeSync: service started.
6/06/19 14:28:09 statService: started.
6/06/19 14:28:09 dataLog: service started.
6/06/19 14:28:09 dataLog: Last log entry 06/06/19 14:28:05
6/06/19 14:28:09 historyLog: service started.
6/06/19 14:28:09 historyLog: Last log entry 06/06/19 14:28:00
6/06/19 14:28:15 WiFi connected. SSID=ATT22WAX7Q, IP=192.168.1.70, channel=7, RSSI -59db
6/06/19 14:28:15 Updater: service started. Auto-update class is MINOR
6/06/19 14:28:16 Updater: Auto-update is current for class MINOR.

That all looks pretty normal. The IotaWatt appears to be logging away with the couple of inputs that you have defined.

I see that earlier today you changed the auto-update status to MINOR. What happened when you did that? Did it take a long time or did it come right back without incident?

It was actually two days ago when I first was trying to set it up…as I recall it took some time, but I don’t remember for sure…I think it took a couple of tries before it saved device configuration successfully, actually.

Not sure if this helps anything, but it looks like the graph.htm page initially failed to load in Chrome, then loaded. A minute ago I was getting errors for list.json, too. The Chrome error says ERR_EMPTY_RESPONSE. It’s like it’s losing the connection in mid-TCP conversation almost? But the POST for the input config is almost always failing. I wonder if there’s something screwy about my WiFi access point (since that’s in between the IotaWatt and my browser).

OK, thanks.

First, the issue that you raise with POST /edit method mismatch is a red-herring. That particular transaction is handled directly by a web-server callback established during startup in setup.cpp.

That your browser debugger shows no response to that transaction however could certainly be the problem. That transaction is an upload of the complete config.txt file. In fact, just about every change you make causes an upload of a new config.txt file.

Right after the upload, and before the successful response is returned, the new config file is processed. It’s possible there is a problem with it that is causing the IoTaWatt to hang for awhile and never complete. That would of course be a bug, and I’m curious how it could happen without being fatal, so I’d like to get a look at that config.txt file.

If you could run the file manager and right click on config.txt in file tree in the left column, then select download and download as a file. If you could then upload that file I can take a look.

We crossed in the mail on that one. Yes, it could be a WiFi issue. Just on probability alone. I’d say the overwhelming number of problems these days are WiFi related.

Given that you have tried this with multiple browsers and machines, I’d have to say it’s probably not anything in the APP or browser. The buffering in IotaWatt is small, so the file is probably uploaded in segments. If there is any issue with the flow control, that could do it, but I haven’t seen that before. Also, your WiFi RSSI is good. Any chance you can try a different router? Can you make your phone an AP?

Well, it seems to work when I tether to my phone instead of using the house WiFi. So I guess that’s the problem. I’ll probably try to take a look at how this AT&T wireless router is set up, to see if there’s anything conflicting, and maybe call in to talk to their tech at some point. But the main problem of setting up the inputs seems to be overcome now. The status page seemed to update even on the WiFi, so that’s good. Thank you for your help!!!

1 Like