influxDB_v2 Uploader 400 error

I’m trying to get my data uploaded to a local instance of influxdb.
I have the local instance installed at:
I can login and it seems to be working fine.

Status shows a 400 error.

Any ideas to troubleshoot this further?


Yeah, there’s an outstanding issue with using $device as a tag value. Try substituting the actual device name.

I updated it, but am still getting the http 400 error.
I have verified that other devices on wifi can connect to influx as well.

What IoTaWatt release are you?

Also, I am a new setup. So I am sure something is not conferred right on my side?
Does something have to be configured in Influx to expose the api endpoints?


Don’t know. There are some influx OSS users out there that may have advice.

I’d double check the bucket, IF and Token. Then strip it down to the basics. With no keys and one measurement and see if that works. Then build it up and see where it breaks.

I’ve stripped down to the basics just one measurement.
I created a new token and used that as well.
Same issue 400 error.
Is there not a way to access the logs?
The message logs show nothing for the uploader.
What did you mean by IF?

Hi @we7313. Would it be possible for you to run tshark on your Influx instance monitoring port 8086 and see whats in the pcap file. I was having the same issue till I realized I forgot to associate the Auth Token with the bucket I wanted to use. But the pcap file would help.

I meant to write ID.

I believe I have the token associated to the bucket correctly (Bucket name is main)

I guess I can install Tsharkl later.
Is there no way to see the logs of Iotawats uploader calls?
I’m sure the answer would be there.

Below is the wireshark output.
Any ideas?

Can you post the payloads for the request and response?

.POST /api/v2/query?orgID=schreiner1234567 HTTP/1.1
Authorization:Token ***************

from(bucket: “main”)
|> range(start: 1632946890, stop: 1632950490)
|> filter(fn: (r) => r[“device”] == “Iotamain” and (r["_measurement"] == “Furnace”))
|> last()
|> map(fn: (r) => ({_measurement: r._measurement, _time: (uint(v:r._time)) / uint(v:1000000000)}))
|> sort (columns: ["_time"], desc: true)
HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
Vary: Accept-Encoding
X-Platform-Error-Code: invalid
Date: Wed, 29 Sep 2021 21:21:30 GMT
Content-Length: 72

{“code”:“invalid”,“message”:“failed to decode request body: invalid ID”}

It’s saying your ID is invalid. Are you sure it’s “schreiner1234567”? I think it’s supposed to be 16 Hex digits. I’m using cloud, but I think OSS is the same. Here’s where I get my ID:

That was it. I was using the organization name, not the ID that you can find in the influxdb organization Commin ID’s area.