My smart home is based on ioBroker, InfluxDB, Grafana 7.1 and lots of sensors and switches communicating using Zigbee and MQTT. InfluxDB is the memory of all this, currently at 1.8.9.
To prepare for switching up to Influx 2, I would like to convert all my queries to Flux using this setup, and this works already for simple graph queries.
One issue I have is this: I have a lot of temperature / humitity sensors which fill the database via ioBroker. In the old setup I created an InfluxQL query for each sensor seperately, styled the graph manually and this was a LOT of manual work.
I would now like to store aliases for my measurements somewhere central where I can access them from anywhere using Flux to label my measurements better in any visualization. For example, “deconz.0.Sensors.13.temperature” might be “Living Room Temperature”, and “deconz.0.Sensors.8.temperature” might be “Basement Temperature”.
Then I need to integrate these aliases into the Flux query so the labels are correctly set, and also consistent across dashboards.
If possible, I would like to put even line color into Influx so I don’t have to do this everywhere where I use this measurement.
How could I do this best?