Influxdb2 adds decimal place

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:


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:

        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.

Hi @alllak,
Could you show me the query you are running on your data in InfluxDB?


I just use the table view with the data explorer on the web-ui

Hi @alllak,
In that case, the mean aggregate is directly applied by default. You will need to switch over to script view and remove the aggregate window.


Thanks, now the correct values are shown … and I feel dumb :smile: