allow influxdb tags in measurement records

Author: one-mbCreated Nov 1, 2025Updated Aug 8, 2026
Labelsenhancement

The Feature

allow adding tags to measurements for better data handling. having multiple devices or (intentionally) reset meter values (e.g. by required meter replacements), the values will drop to zero, eventually duplicate, etc. With the ability to have tags in the measurement lines, eventually the meter-id could be included.

Currently the resulting exported line in influxdb looks like

meters gas=9855.167 1723421584000000000
meters water=301.167 1723421584000000001
meters water=5.167 1723421584000000002
meters gardenwater=11.167 1723421584000000003

where "meters" is "measurement" and "gas" is "field". With tags it may look like this:

meters,meter_type=gas,meter_id=LE12343GR34 value=9855.167 1723421584000000000
meters,meter_type=water,meter_id=WATERID1111 value=300.167 1723421584000000001
meters,meter_type=water,meter_id=WATERID2222 value=5.167 1723421584000000002
meters,meter_type=water,meter_id=GARDENWATERID2222 value=11.167 1723421584000000003

where gas meter has been enriched with the meter id, the water meter was replaced with a new one, and the garden water meter can be distinguished from the main meter and also be accounted for the same resource.

This could be accomplished by allowing "meters,meter_type=gas,meter_id=LE12343GR34" as input in the measurement field. Currently it gets cut off at "meters,meter_type" Or by adding another string field, with default=empty, regex [A-z,0-9,_,-,=].

Source: jomjol/AI-on-the-edge-device