Help setting up iotawatt on Emoncms.org

I set up my Iotawatt a few weeks ago but have not been able to get the link to Emoncms to work. Followed the directions in the Iotawatt Docs, but don’t see the input.

Do I have to have an open port thru my firewall to transmitt data to Emoncms? Any help would be appreciated…

Dave C

More Info… The following is from my message log…
9/06/19 22:50:26 EmonService: started. url:80=emoncms.org, node=IotaWatt, interval=10, encrypted
9/06/19 22:50:45 EmonService: get input list failing, code: 302

What is causing Code 302?

302 is a redirect. Along the way, a proxy or server is saying to retry the request with a different URL. If you are trying to use Emoncms.org, then you need to specify:

http://emoncms.org

for the server URL. If you are using your own local instance, then you specify the local IP address.

I’m using the URL exactly as you stated it. The default in the setup dialog box of the Iotawat… No Joy…

Make sure you specify HTTP and not HTTPS as the IoTaWatt will only communicate using HTTP. As @overeasy said, a 302 error message from the Web is a redirect and often from an HTTPS to and HTTP, etc.

Still no Joy… I checked and I’m using HTTP: not HTTPS.

Is there a way to get a log from emoncms or something else to give me more insight. I freely admit, I’m not familiar with this at all, and although I’d like to learn to create these programs myself, I’m a complete neophite at this right now.

Appreciate you guys help.

Dave

Can restart then post

  • setup screen for emoncms (sans write key).
  • message log for entire startup to present subsequent to that restart
    Thanks

SUCCESS! I don’t know what I did since I tried several things. In any case, I have inputs now on Enomcms.org and I’m learning how to create fees, etc.

Thanks for your help.

Dave C

Probably the restart. Had you restarted it before?

In setting up the feeds, be aware that you pay per feed, so you can have as many inputs as you like (they don’t consume disk storage) but only commit to feeds data that you may want to see.

DaveinFL here… still having a problem with the message “get input list failing, code 302” when attempting to get data to emoncms.org from the Iotawatt. A week or so ago I had the same message, but it suddenly cleared up and I enjoyed using emoncms for a week before suddenly, my data stopped uploading.

Attached is the restart message log from Iotawatt. Any help would be greatly appreciated.

Dave
** Restart **

SD initialized.
9/22/19 04:44:25z Real Time Clock is running. Unix time 1569127465
9/22/19 04:44:25z Reset reason: Software/System restart
9/22/19 04:44: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:3, 1:4, 1:1[12], 1:2[13], 9:0[13], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 10:2, 10:3
9/22/19 04:44:25z ESP8266 ChipID: 2528612
9/22/19 04:44:25z IoTaWatt 5.0, Firmware version 02_04_00
9/22/19 04:44:25z SPIFFS mounted.
9/22/19 00:44:26 Local time zone: -4:00
9/22/19 00:44:26 device name: IotaWatt
9/22/19 00:44:26 MDNS responder started for hostname IotaWatt
9/22/19 00:44:26 LLMNR responder started for hostname IotaWatt
9/22/19 00:44:26 HTTP server started
9/22/19 00:44:26 timeSync: service started.
9/22/19 00:44:27 statService: started.
9/22/19 00:44:27 dataLog: service started.
9/22/19 00:44:27 dataLog: Last log entry 09/22/19 00:44:20
9/22/19 00:44:27 historyLog: service started.
9/22/19 00:44:28 historyLog: Last log entry 09/22/19 00:44:00
9/22/19 00:44:32 EmonService: started. url:80=emoncms.org/, node=IotaWatt, interval=10, encrypted
9/22/19 00:44:32 WiFi connected. SSID=Colston Asus_2.4G, IP=192.168.2.201, channel=10, RSSI -67db
9/22/19 00:44:32 Updater: service started. Auto-update class is MAJOR
9/22/19 00:44:33 Updater: Auto-update is current for class MAJOR.
9/22/19 00:44:52 EmonService: get input list failing, code: 302

Could you upload your config.txt file in a private message so I can try to recreate this please? Do you need instructions about how to do that?

Hi Bob,

I’ve been working alot over the last month so no time to play with the Iotawatt until tonight. It’s been unplugged for about a month as I made some changes in my garage.

I fired it up tonight and I still have the problem uploading to Emoncms. I sent you a log about a month ago but never saw a reply. Still seeing the message Code 302 when attempting to upload.

Could you assit me to get this thing up and logging data to Emoncms? I’d appreciate it.

PS will upload today’s log shortly.

Dave

Here is the current message log…

Restart **

SD initialized.
11/04/19 01:44:29z Real Time Clock is running. Unix time 1572831869
11/04/19 01:44:29z Power failure detected.
11/04/19 01:44:29z Reset reason: External System
11/04/19 01:44:29z ESP8266 ChipID: 2528612
11/04/19 01:44:29z IoTaWatt 5.0, Firmware version 02_04_00
11/04/19 01:44:29z SPIFFS mounted.
11/03/19 21:44:30 Local time zone: -4:00
11/03/19 21:44:30 device name: IotaWatt
11/03/19 21:44:33 Connecting with WiFiManager.
11/03/19 21:44:36 MDNS responder started for hostname IotaWatt
11/03/19 21:44:36 LLMNR responder started for hostname IotaWatt
11/03/19 21:44:36 HTTP server started
11/03/19 21:44:36 WiFi connected. SSID=Colston Asus_2.4G, IP=192.168.2.201, channel=9, RSSI -61db
11/03/19 21:44:36 timeSync: service started.
11/03/19 21:44:36 statService: started.
11/03/19 21:44:36 Updater: service started. Auto-update class is MAJOR
11/03/19 21:44:36 dataLog: service started.
11/03/19 21:44:37 dataLog: Last log entry 11/03/19 21:43:30
11/03/19 21:44:37 historyLog: service started.
11/03/19 21:44:37 historyLog: Last log entry 10/21/19 22:25:00
11/03/19 21:44:40 Updater: Auto-update is current for class MAJOR.
11/03/19 21:44:41 EmonService: started. url:80=emoncms.org/, node=IotaWatt, interval=10, encrypted
11/03/19 21:45:00 EmonService: get input list failing, code: 302

Hello Dave,

I’m interested in your config.txt file or a screenshot of the Emoncms server configuration screen. In particular, it looks as if there might be a problem with how you specified the URL. It should look like this for Emoncms.org:

image

Thanks for the response Bob…

I’ve checked the URL a couple of times now… I AM using the “http://emoncms.org”. The funny thing is it worked well for about a week, then problems.

Could it be related to stoping and restarting?

Doesn’t look like it. Here’s what the startup message should look like:

EmonService: started. url=emoncms.org:80, node....

So your message shows a different url. Can you download your config.txt file and post it in a PM?

Bob… I’m sending you the config.txt file in a pm.

Meanwhile, here is the latest message log…

Looks exactly like you said it shoud above…

1/07/19 18:22:45 statService: started.
11/07/19 18:22:45 dataLog: service started.
11/07/19 18:22:46 dataLog: Last log entry 11/07/19 18:22:40
11/07/19 18:22:46 historyLog: service started.
11/07/19 18:22:46 historyLog: Last log entry 11/07/19 18:22:00
11/07/19 18:22:49 EmonService: started. url:80=emoncms.org/, node=IotaWatt, interval=10, encrypted
11/07/19 18:22:49 WiFi connected. SSID=Colston Asus_2.4G, IP=192.168.2.201, channel=9, RSSI -61db
11/07/19 18:22:49 Updater: service started. Auto-update class is MAJOR
11/07/19 18:22:52 Updater: Auto-update is current for class MAJOR.
11/07/19 18:23:10 EmonService: get input list failing, code: 302

It doesn’t quite match.

The URL in the config looks right, and I have no idea how the URL in the startup message became 80=emoncms.org.

The other thing that is odd is the message

302 is a redirect. It says the server to which you connected wants you to try again using a different URL. I don’t see how that could change the message in the log, since it’s written before any attempt is made to connect to Emoncms.org, but it seems to me that with the bad URL, you should get a not-found or something else besides a 302. So the question is whether the 302 is the cause or an effect of the bad URL.

Couple of things. Could I get you to change your auto-update to MINOR, which will upgrade your unbit to 02_04_02? Not that there is anything changed in this area between 02_04_00 and _02, but just to get a new firmware loaded.

Second thing is that you mentioned a firewall. Is there anything in there that might be, for instance, changing the HTTP to HTTPS or in any other way modifying the URL?

I would agree with @overeasy that a 302 redirect message is often what one gets when attempting to connect to a HTTPS (secure HTTP) site using a non-secure request such as HTTP. Often the 302 tells the browser to direct itself to the secure connection method. I would look at the firewall or other tools that may be forcing https when able, like the “HTTPS Everywhere” extension you can install in a browser. Disable or exclude anything that may be forcing this redirect.