[SOLVED] InfluxDB Persistence - control of tables

persistence
temperature
influxdb
Tags: #<Tag:0x00007f01484c6558> #<Tag:0x00007f01484c6328> #<Tag:0x00007f01484c6148>

(Psyciknz) #1

I have some temperatures going into influxdb from openhab. Working fine.
But for each item they get a table each. Under influx, these temperatures would most likely make sense into one table (temperatures) with tags for the room/sensor being used.

This would allow for better math across an entire household.

If this possible in openhab, or do I need to do something externally to roll up all the distinct tables into one.


(namraccr) #2

This is not possible, afaik.


(Rich Koshak) #3

Not possible. I’m no InfluxDB expert but what math would putting them in the same table allow that querying across the multiple tables doesn’t allow?

You could always keep the separate ones separate and add a new single item that gets updated and persisted with the value for any of the sensors. That will put all your measurements in the same table.

But Persistence is designed to work with any database, as diverse as SQL types like MySQL, NoSQL types like Mongo, time series types like InfkuxDB, and more. It necessarily results in the lowest common denominator in terms of functionality.


(Psyciknz) #4

Sorry math was the wrong term, it was grouping that was easier.

I was trying to get averages per hour of mulitple sensors without having to query each directly


(Rich Koshak) #5

Another option for that is too put them into a Group:Number:AVG and persist the group without the *. I do this for my indoor temp and humidity sensors.