@@ -14,50 +14,61 @@ func NewSDM54Producer() Producer {
1414 /**
1515 * Opcodes as defined by Eastron SDM54.
1616 * See https://www.eastrongroup.com/eastrongroup/2024/08/21/eastronsdm54seriesusermanualv1.2.pdf
17- * This is to a large extent a superset of all SDM devices, however there are
18- * subtle differences (see 220, 230). Some opcodes might not work on some devices.
1917 */
2018 ops := Opcodes {
21- VoltageL1 : 0x0000 , // 220, 230
22- VoltageL2 : 0x0002 ,
23- VoltageL3 : 0x0004 ,
24- CurrentL1 : 0x0006 , // 220, 230
25- CurrentL2 : 0x0008 ,
26- CurrentL3 : 0x000A ,
27- PowerL1 : 0x000C , // 230
28- PowerL2 : 0x000E ,
29- PowerL3 : 0x0010 ,
30- ApparentPowerL1 : 0x0012 ,
31- ApparentPowerL2 : 0x0014 ,
32- ApparentPowerL3 : 0x0016 ,
33- ReactivePowerL1 : 0x0018 ,
34- ReactivePowerL2 : 0x001A ,
35- ReactivePowerL3 : 0x001C ,
36- CosphiL1 : 0x001e , // 230
37- CosphiL2 : 0x0020 ,
38- CosphiL3 : 0x0022 ,
39- Power : 0x0034 ,
40- ApparentPower : 0x0038 ,
41- ReactivePower : 0x003C ,
42- ImportPower : 0x0054 ,
43- ImportL1 : 0x015a ,
44- ImportL2 : 0x015c ,
45- ImportL3 : 0x015e ,
46- Import : 0x0048 , // 220, 230
47- ExportL1 : 0x0160 ,
48- ExportL2 : 0x0162 ,
49- ExportL3 : 0x0164 ,
50- Export : 0x004a , // 220, 230
51- SumL1 : 0x0166 ,
52- SumL2 : 0x0168 ,
53- SumL3 : 0x016a ,
54- Sum : 0x0156 , // 220
55- Cosphi : 0x003e ,
56- THDL1 : 0x00ea , // voltage
57- THDL2 : 0x00ec , // voltage
58- THDL3 : 0x00ee , // voltage
59- THD : 0x00F8 , // voltage
60- Frequency : 0x0046 , // 230
19+ VoltageL1 : 0x0000 , // Phase 1 line to neutral volts
20+ VoltageL2 : 0x0002 , // Phase 2 line to neutral volts
21+ VoltageL3 : 0x0004 , // Phase 3 line to neutral volts
22+ CurrentL1 : 0x0006 , // Phase 1 current
23+ CurrentL2 : 0x0008 , // Phase 2 current
24+ CurrentL3 : 0x000A , // Phase 3 current
25+ PowerL1 : 0x000C , // Phase 1 active power
26+ PowerL2 : 0x000E , // Phase 2 active power
27+ PowerL3 : 0x0010 , // Phase 3 active power
28+ ApparentPowerL1 : 0x0012 , // Phase 1 apparent power
29+ ApparentPowerL2 : 0x0014 , // Phase 2 apparent power
30+ ApparentPowerL3 : 0x0016 , // Phase 3 apparent power
31+ ReactivePowerL1 : 0x0018 , // Phase 1 reactive power
32+ ReactivePowerL2 : 0x001A , // Phase 2 reactive power
33+ ReactivePowerL3 : 0x001C , // Phase 3 reactive power
34+ CosphiL1 : 0x001E , // Phase 1 power factor
35+ CosphiL2 : 0x0020 , // Phase 2 power factor
36+ CosphiL3 : 0x0022 , // Phase 3 power factor
37+ Power : 0x0034 , // Total system power
38+ ApparentPower : 0x0038 , // Total system volt amps.
39+ ReactivePower : 0x003C , // Total system VAr
40+ Cosphi : 0x003E , // Total system power factor
41+ PhaseAngle : 0x0042 , // Total system phase angle
42+ Frequency : 0x0046 , // Frequency of supply voltages
43+ Import : 0x0048 , // Total Import kWh
44+ Export : 0x004A , // Total Export kWh
45+ THDL1 : 0x00EA , // Phase 1 L/N volts THD
46+ THDL2 : 0x00EC , // Phase 2 L/N volts THD
47+ THDL3 : 0x00EE , // Phase 3 L/N volts THD
48+ THD : 0x00F8 , // Average line to neutral volts THD
49+ Sum : 0x0156 , // Total kWh
50+ ReactiveSum : 0x0158 , // Total kVArh
51+ ImportL1 : 0x015A , // L1 import kWh
52+ ImportL2 : 0x015C , // L2 import kWh
53+ ImportL3 : 0x015E , // L3 import kWh
54+ ExportL1 : 0x0160 , // L1 export kWh
55+ ExportL2 : 0x0162 , // L2 export kWh
56+ ExportL3 : 0x0164 , // L3 export kWh
57+ SumL1 : 0x0166 , // L1 total kWh
58+ SumL2 : 0x0168 , // L2 total kWh
59+ SumL3 : 0x016A , // L3 total kWh
60+ SumT1 : 0x130C , // Tariff 1 total kWh
61+ SumT2 : 0x130E , // Tariff 2 total kWh
62+ ImportT1 : 0x1314 , // Tariff 1 import kWh
63+ ImportT2 : 0x1316 , // Tariff 2 import kWh
64+ ExportT1 : 0x131C , // Tariff 1 export kWh
65+ ExportT2 : 0x131E , // Tariff 2 export kWh
66+ ReactiveSumT1 : 0x1324 , // Tariff 1 total kVArh
67+ ReactiveSumT2 : 0x1326 , // Tariff 2 total kVArh
68+ ReactiveImportT1 : 0x132C , // Tariff 1 import kVArh
69+ ReactiveImportT2 : 0x132E , // Tariff 2 import kVArh
70+ ReactiveExportT1 : 0x1334 , // Tariff 1 export kVArh
71+ ReactiveExportT2 : 0x1336 , // Tariff 2 export kVArh
6172 }
6273 return & SDM54Producer {Opcodes : ops }
6374}
0 commit comments