02_07_03: iotawatt stops uploading data in influxdbv2 after power reset ( Last sent query failed. HTTPcode 400 )

I restarted power in my house today and Iotawatt stopped uploading data to by influxdbv2 database with an error “Last sent query failed. HTTPcode 400”.

Restarting the uploader did not help.

Message log:
** Restart **

SD initialized.
11/17/21 07:35:17z Real Time Clock is running. Unix time 1637134517
11/17/21 07:35:17z Reset Reason: Power-fail restart.
11/17/21 07:35:17z ESP8266 ID: 12704151, RTC PCF8523
11/17/21 07:35:17z IoTaWatt 5.0, Firmware version 02_07_03
11/17/21 07:35:17z SPIFFS mounted.
11/17/21 14:35:17 Local time zone: +7:00
11/17/21 14:35:17 device name: IotaWatt
11/17/21 14:35:20 Connecting with WiFiManager.
11/17/21 14:35:25 HTTP server started
11/17/21 14:35:25 influxDB_v2: Starting, interval:10, url:http://domain.com:18086
11/17/21 14:35:25 WiFi connected. SSID=BDSM Villa, IP=, channel=11, RSSI -85db
11/17/21 14:35:25 MDNS responder started for hostname IotaWatt
11/17/21 14:35:25 LLMNR responder started for hostname IotaWatt
11/17/21 14:35:25 timeSync: service started.
11/17/21 14:35:26 statService: started.
11/17/21 14:35:26 Updater: service started. Auto-update class is NONE
11/17/21 14:35:26 dataLog: service started.
11/17/21 14:35:26 dataLog: Last log entry 11/17/21 14:26:45
11/17/21 14:35:31 historyLog: service started.
11/17/21 14:35:31 historyLog: Last log entry 11/17/21 14:26:00
11/17/21 16:02:30 influxDB_v2: stopped, Last post 01/01/70 07:00:00

Uploader config:
post interval(sec):
bulk send:
server URL:
Organization ID:
Authorization token:
upload history from:
default is $name
default is ‘value’

Switching server name from domain to IP did not help. tcpdump on the server side shows 0 packets coming from the iotawatt device. Oh, and I am using an unusual port (18086 instead of 8086).

There have been issues with the influxDB2 flux query. 02_07_04 is pretty much dedicated to resolving those issues. I see that your auto-update is NONE. That’s fine, but at some point I think you will need to upgrade to 02_07_04 to resolve this issue.

There are some workarounds for some of the problems fixed in 02_07_04, but without seeing your actual influx config display, I can’t say if any are applicable.

Today I posted instructions for manual version update should you decide to try that.


Thank you. Updating to 02_07_04 fixed the problem.

Thank you. It works for my InfluxDB 2.0.7. But with InfluxDB 2.1.1 I am getting an 404. Any ideas?

Nevermind: I saw that i need to add ‘/api/v2’ to the server URL

I’ve noticed a lot of people miss the “/api/v2” (me included). Perhaps it might be a good idea to add an example under the form? Will save everyone at least a few minutes.

That should be a non-issue with the latest release. It should work either way.

1 Like