Page 1 of 1

Push Data to InfluxDB - problem with merging "Temperature" values from different sensors

Posted: Thursday 17 December 2020 18:13
by marivesel
My Domoticz setup is working perfectly fine on its own for several months now, but I want to push the data from it to InfluxDB.
I have created the new database and communication works, pushing/receiving, but the problem is as follow:

I have several temperature sensors, connected to Domoticz.
When I add two (or more) of these temperature sensors in the InfluxDB Push Data menu, both sensors push their data on the same influx measurement, called "Temperature". This cannot be renamed or changed in Domoticz, so I can't push different measurement.

In the following example I have "Boiler temp" and "Outside temp", respectively lets say 56C and 5C
If I add them both to push to InfluxDB via Domoticz menu, the values of the two sensors is sent to one "Temperature" measurement in influx database, and the data looks like garbage.

How can I separate the temperature sensors, so each of them sents on it's own differently named measurement?
4564.jpg
4564.jpg (78.83 KiB) Viewed 335 times

Re: Push Data to InfluxDB - problem with merging "Temperature" values from different sensors

Posted: Saturday 19 December 2020 17:24
by Stratos
This should work without bothering about the name.
Influxdb stores more than the names i.e. "Temperature", it comes with "idx" etc.
To visualize the time series of a specific sensor you have to expand the statement in i.e. Grafana
with the index of your sensor.
i.e. SELECT mean("value") FROM "Temperature" WHERE ("idx" = '388') AND $timeFilter GROUP BY time($__interval) fill(null)

Re: Push Data to InfluxDB - problem with merging "Temperature" values from different sensors

Posted: Sunday 20 December 2020 20:37
by marivesel
Thank you very much @Stratos, that worked!
I am very new with influxDB and didn't know that it stores the idx also.
Happy Chrismass :)