@overeasy, Just want to see if I have got your original proposal right:
- sample period is batched into a single influxdb write transaction
- each measurement has the same custom name e.g. “measurement”
- each measurement has a tag based on the associated Output (CT/VT) name
- each measurement contains fields that correspond to the “units” selected for that Output
So in influxdb line protocol for a particular 5 second period would be something like:
measurement,output=hallway_lights power=100,volts=240,kwh=1.23,pf=1.0 14222900257 measurement,output=bedroom_lights power=80,volts=240,kwh=1.01,pf=1.0 14222900257 measurement,output=main_ring power=150,volts=240,kwh=2.75,pf=0.8 14222900257 measurement,output=house_feed power=330,volts=240,kwh=4.99,pf=0.8 14222900257
Which would allow for influxdb tag filtering/aliasing/regex in the query, e.g. select mean("power") where output=/light/
to include all of my light CTs or something like where output!=/house/
to exclude the CT on the main feed. But will repeat the VT information across each of the CT measurements if selected by the user.
Does this simplify the IotaWatt UI to allow you to select multiple “unit” checkboxes for each output e.g. power, kwh, volts… rather than having to create a multitude of outputs to get all of the desired fields. That would be sweet.