Transforming measurements from ioBroker into new format

Hi,
I’m used to SQL type of databases and new to influxdb. I’m using influxdb to store data from ioBroker, primarily from energy sensors.

The InfluxDB adapter of ioBroker (at least on Raspberry PI) stores data in influxdb in a predefined way which cannot be changed:

  • name: modbus.0.inputRegisters.30013_Leistung_Aktuell
  • time ack from q value

  • 1588523648283000000 true system.adapter.modbus.0 0 84.31
  • 1588523707890000000 true system.adapter.modbus.0 0 84.04

This format makes sense because the sensor data can represent differnt measurement quantities.

For the analysis of e.g. power consumption it would be useful to store e.g. power readings in a common “Power” measurement and add discrimination between sensor channels by using tags.

I’ve added a measurement for power:

  • name: P_el
    ’ time channel value

  • 1588518552498114332 P2_K1 2.34

My question is:
How can I transform the iobroker measurement data into the new “P_el” measurement and add tags?
I manage to inject data via “Select Into” but the “channel” tag will remain empty.
Optimimum solution would be to create “a job” running e.g. hourly and copying info from original format into new measurement.

I would be grateful for any advice!
Best regards
TimTom

Hello @TimTom,
Welcome! It looks like we’re in the same boat as I am new to ioBroker. What exactly are you using to write data? Are you using this? If so, can you please find and share your influxdb.conf in /etc/influxdb/influxdb.conf?

Hi there,

I’m just setting up InfluxDB (in Docker) to store some of my iobroker sensor data in there. In the guide I followed it was mentioned that the influxdb adapter does not store the values in a optimal pattern as documented. For now I found no sign that the adapter would change this pattern. So the idea from @TimTom to convert the data sound pretty reasonable.

As a newbie in InfluxDB I’d be happy to get some input here how to do that. Maybe we can even offer this to the adapter maintainers as documentation enhancement.

@Anaisdg the file /etc/influxdb/influxdb.conf does not exist in my Docker setup, may it live somewhere else?