I just got my iotawatt installed and the Graph+ and PVOutput uploader is working but I can’t seem to get the InfluxDB_v2 uploader working.
Admittedly, I’m new to Influx and IotaWatt but hoping for some help.
I’m running InfluxDB v2.7.10 locally on a VM on same subnet as the iotawatt.
When I start the uploader, the influxdb logs show it querying my bucket for the last values:
Oct 27 11:22:34 rocky influxd-systemd-start.sh[477726]: ts=2024-10-27T15:22:34.594658Z lvl=debug msg=Request log_id=0sVbZ68G000 service=http method=POST host=192.168.254.74:8086 path=/api/v2/query query="orgID=161dc560fa1093c3" proto=HTTP/1.1 status_code=200 response_size=2 content_length=600 referrer= remote=192.168.254.119:49805 user_agent=unknown authenticated_id=0ddf9b063a8da000 user_id=0ddc4c2bc343e000 took=17.568ms body="from(bucket: \"iotawatt\")\n |> range(start: 1730001600, stop: 1730006550)\n |> filter(fn: (r) =>\n (r._measurement == \"electric\" and r.device == \"IotaWatt\" and r.input == \"Consumption\" and r._field == \"Watts\") or\n (r._measurement == \"electric\" and r.device == \"IotaWatt\" and r.input == \"TotalAmps\" and r._field == \"Amps\") or\n (r._measurement == \"electric\" and r.device == \"IotaWatt\" and r.input == \"TotalPower\" and r._field == \"Volts\"))\n |> last()\n |> map(fn: (r) => ({_measurement: r._measurement, _time: (uint(v:r._time)) / uint(v:1000000000)}))\n |> sort (columns: [\"_time\"], desc: true)\n"
but then the write fails 5 seconds later
Oct 27 11:22:39 rocky influxd-systemd-start.sh[477726]: ts=2024-10-27T15:22:39.730897Z lvl=debug msg=Request log_id=0sVbZ68G000 service=http method=POST host=192.168.254.74:8086 path=/api/v2/write query="bucket=iotawatt&orgID=161dc560fa1093c3&precision=s" proto=HTTP/1.1 status_code=499 response_size=107 content_length=4116 referrer= remote=192.168.254.119:49805 user_agent=unknown authenticated_id=0ddf9b063a8da000 user_id=0ddc4c2bc343e000 took=4106.247ms error="internal error" error_code="internal error"
I verified the org,bucket, and user_id are correct.
Also made sure the token has write permission on the bucket.
Here the relevant config on influxdb server:
[root@rocky influxd-installation]# influx org list
ID Name
161dc560fa1093c3 alanmiller
[root@rocky influxd-installation]# influx bucket list |egrep "(^ID)|iotawatt"
ID Name Retention Shard group duration Organization ID Schema Type
05f6c2772994ca51 iotawatt 8760h0m0s 168h0m0s 161dc560fa1093c3 implicit
[root@rocky influxd-installation]# influx auth list |egrep "^(ID|0ddf9b063a8da000)"
ID Description Token User Name User ID Permissions
0ddf9b063a8da000 iotawatt gNqX4MgN-hUEVnMq4ZvLSy3Rvb3NO34au9Q2KqbrMATVPzQIsWMQQhjo9E5eVODIeQYdKIWCq7bMFU3yDjMJmA== admin 0ddc4c2bc343e000 [read:orgs/161dc560fa1093c3/buckets/05f6c2772994ca51 write:orgs/161dc560fa1093c3/buckets/05f6c2772994ca51]
Here is my config screen ( I verified the same is present in config.txt)