Output to InfluxDB

Hi,

I just setup 1 circuit to monitor with IotaWatt for now, haven’t put anything on the mains yet, but I’m trying to output the watt reading of that one channel to InfluxDB. I configured as follows:

When starting the Influx service up on the IotaWatt, I get the following error:

1/02/21 20:23:51 influxDB: Last entry query failed.
1/02/21 20:23:51 influxDB: HTTPcode 400, {“error”:“error parsing query: missing parameter: units”}

I feel like I’m missing something really simple, can anyone help?

Thanks!

Can you post your influx service setup?

Sure, here is my setup:

I think it is objecting to a tag key of $units. IoTaWatt does not substitute $units in the tag-key, only the tag-value. Not sure why you would want to do that anyway. Perhaps you simply want a tag-key of ‘units’?

Yeah, when I took the screenshot I realized I fat fingered that. I still don’t have any data in the database yet, going to let it go for a bit longer to see if it inputs anything.

Thanks

There is a guide on the internet that has that setup in it. It appears to be a typo. It will work if you remove the whole tag or replace it with units for name of the tag.

Adding the units tag will create more series, which could be good or bad, but probably doesn’t matter in this situation. Having the tag allows using the power of Grafana to do more templated queries. This allows easily graphing all the watt measurements on the same graph with a single query. But, you can do the same thing with a regex on the ct.