I am trying to figure out the best way to store lots of values in influxdb.
The SMA energy meter can measure SUMS and phase L1 to L3
Both Import "+" and Export "-"
And the current average "power" and Energy meter reading kwh counter "energy"
So here are the values for SUMS
For the individual phases you have the above metrics plus
I am thinking something like this in linecode
Active_power+, phase=[1,2,3,SUM], value=###
energy+, phase=[1,2,3,SUM], value=###
So each metric is one serie with the phase as tag. Since I am new to the influxdb I wonder if this is that the best way to store the values or if I can do it in any more efficient way. For example is it better to have each Phase+ Sums as serie
L1,direction=[import,export],P="currentpower_value",V=volt_value,I="eletric_current_value",PF="power factor value", Q=reactivepower, S=Apparent_power
More information about the SMA energy meter is available here: http://www.sma.de/fileadmin/content/global/Partner/Documents/SMA_Labs/EMETER-Protokoll-TI-en-10.pdf
So I think I would consider a slightly different schema (provided that my understanding is correct).
Assuming that you have more than one meter that you're monitoring,
Measurement: sma_energy_meter
Tags: meter_id
phase
.
Fields: active_power+
active_power-
reactive_power+
reactive_power-
apparent_power+
apparent_power-
power_factor
current
voltage
So an example point in line protocol would look like
sma_energy_meter,meter_id=xxx,phase=[1,2,3,SUM] active_power+=2,active_power-=4,reactive_power+=2,reactive_power-=4,apparent_power+=2,apparent_power-=4,power_factor=2,current=2,voltage=23