mblackstock / node-red-contrib-influxdb

Node-RED nodes to save and query data from an influxdb time series database
Other
64 stars 46 forks source link

unsupported input type for mean aggregate: string #87

Closed kaciker closed 3 years ago

kaciker commented 3 years ago

I'm trying to insert string in Influxdb v2 (2.0.3) When I send a msg, like:

msg.payload = [{ intValue: '10i', numValue: 12, randomValue: Math.random()*10, strValue: "message2" }, { tag1:"sensor1", tag2:"device2" }]; return msg;

And when I check the "strValue" the result in the CLI InfluxDB is: unsupported input type for mean aggregate: string 2021-01-25_13h00_06

mblackstock commented 3 years ago

I can't see the query in the query in the Data Explorer screenshot you provided nor a CLI command. I suspect that in your query you're trying to get the mean/average of a string value somehow, which will not work of course. You can only average numeric values.

I don't think this is an issue with the node.

kaciker commented 3 years ago

You're right... only changing to "last" is working, I'm sorry

mblackstock commented 3 years ago

no worries. Glad you sorted it