Hi,
I’m inserting data from mqtt into influxdb2. Usually I do it via telegraf, but my problem also occurs if I use node-red.
The ouput from the the mqtt device is as following:
{"Time":"2022-11-23T09:05:13","LK13BE":{"current":254.0000}}
But if I check the data in influxdb I see some decimals places added, e. g. 254,20
But this does not happen every time.
The values which are coming from mqtt can also be negative. Then e. g. -320 becomes -320,17
In Node-Red I format the data via a change node with jsonata with the follwing expression:
{
"Zaehler1": $number(payload.LK13BE.current)
}
A debug-node show me the correct data (e. g. -320)
In telegraf I only to mqtt topic parsing and do not alter the data:
[[inputs.mqtt_consumer.topic_parsing]]
topic = "tele/counter/+/SENSOR"
tags = "_/device/counter/_"
As it happends with node-red as well as telegraf, I suspect there is something with influxdb2 what am I doing wrong.
Any help is appreciated.