3434/**
3535 * Implements the Janitza UMG 806 power analyzer.
3636 *
37- * <p>
3837 * https://www.janitza.de/umg-806-pro.html
3938 */
4039@ Designate (ocd = Config .class , factory = true )
4140@ Component (//
42- name = "Meter.Janitza.UMG806" , //
43- immediate = true , //
44- configurationPolicy = ConfigurationPolicy .REQUIRE //
41+ name = "Meter.Janitza.UMG806" ,
42+ immediate = true ,
43+ configurationPolicy = ConfigurationPolicy .REQUIRE
4544)
4645public class MeterJanitzaUmg806Impl extends AbstractOpenemsModbusComponent
4746 implements MeterJanitzaUmg806 , ElectricityMeter , ModbusComponent , OpenemsComponent , ModbusSlave {
@@ -56,7 +55,7 @@ protected void setModbus(BridgeModbus modbus) {
5655 }
5756
5857 private MeterType meterType = MeterType .PRODUCTION ;
59- /** Invert power values. */
58+ // Invert power values
6059 private boolean invert = false ;
6160
6261 public MeterJanitzaUmg806Impl () {
@@ -96,23 +95,23 @@ public MeterType getMeterType() {
9695 @ Override
9796 protected ModbusProtocol defineModbusProtocol () {
9897 var modbusProtocol = new ModbusProtocol (this ,
99- // Register: 19000–19010 → Spannungen
98+ // Register: 19000–19010 → Voltages
10099 new FC3ReadRegistersTask (19000 , Priority .HIGH ,
101100 m (ElectricityMeter .ChannelId .VOLTAGE_L1 , new FloatDoublewordElement (19000 ), SCALE_FACTOR_3 ),
102101 m (ElectricityMeter .ChannelId .VOLTAGE_L2 , new FloatDoublewordElement (19002 ), SCALE_FACTOR_3 ),
103102 m (ElectricityMeter .ChannelId .VOLTAGE_L3 , new FloatDoublewordElement (19004 ), SCALE_FACTOR_3 ),
104103 new DummyRegisterElement (19006 , 19010 ) //
105104 ),
106105
107- // Register: 19012–19018 → Ströme
106+ // Register: 19012–19018 → Currents
108107 new FC3ReadRegistersTask (19012 , Priority .HIGH ,
109108 m (ElectricityMeter .ChannelId .CURRENT_L1 , new FloatDoublewordElement (19012 ), SCALE_FACTOR_3 ),
110109 m (ElectricityMeter .ChannelId .CURRENT_L2 , new FloatDoublewordElement (19014 ), SCALE_FACTOR_3 ),
111110 m (ElectricityMeter .ChannelId .CURRENT_L3 , new FloatDoublewordElement (19016 ), SCALE_FACTOR_3 ),
112111 new DummyRegisterElement (19018 , 19018 ) //
113112 ),
114113
115- // Register: 19020–19026 → Wirkleistung + Summe
114+ // Register: 19020–19026 → Active power + sum
116115 new FC3ReadRegistersTask (19020 , Priority .HIGH ,
117116 m (ElectricityMeter .ChannelId .ACTIVE_POWER_L1 , new FloatDoublewordElement (19020 ), INVERT_IF_TRUE (this .invert )),
118117 m (ElectricityMeter .ChannelId .ACTIVE_POWER_L2 , new FloatDoublewordElement (19022 ), INVERT_IF_TRUE (this .invert )),
@@ -121,21 +120,21 @@ protected ModbusProtocol defineModbusProtocol() {
121120 new DummyRegisterElement (19028 , 19034 ) // Apparent Power ???
122121 ),
123122
124- // Register: 19036–19042 → Blindleistung + Summe
123+ // Register: 19036–19042 → Reactive power + sum
125124 new FC3ReadRegistersTask (19036 , Priority .LOW ,
126125 m (ElectricityMeter .ChannelId .REACTIVE_POWER_L1 , new FloatDoublewordElement (19036 ), INVERT_IF_TRUE (this .invert )),
127126 m (ElectricityMeter .ChannelId .REACTIVE_POWER_L2 , new FloatDoublewordElement (19038 ), INVERT_IF_TRUE (this .invert )),
128127 m (ElectricityMeter .ChannelId .REACTIVE_POWER_L3 , new FloatDoublewordElement (19040 ), INVERT_IF_TRUE (this .invert )),
129128 m (ElectricityMeter .ChannelId .REACTIVE_POWER , new FloatDoublewordElement (19042 ), INVERT_IF_TRUE (this .invert ))
130129 ),
131130
132- // Register: 19050 → Frequenz
131+ // Register: 19050 → Frequency
133132 new FC3ReadRegistersTask (19050 , Priority .LOW ,
134133 m (ElectricityMeter .ChannelId .FREQUENCY , new FloatDoublewordElement (19050 ), SCALE_FACTOR_3 )
135134 )
136135 );
137136
138- // Energiezähler: Verbrauch und Lieferung
137+ // Energy meters: Consumption and production
139138 if (this .invert ) {
140139 modbusProtocol .addTask (new FC3ReadRegistersTask (19062 , Priority .LOW ,
141140 m (ElectricityMeter .ChannelId .ACTIVE_CONSUMPTION_ENERGY , new FloatDoublewordElement (19062 )),
@@ -161,9 +160,9 @@ public String debugLog() {
161160
162161 @ Override
163162 public ModbusSlaveTable getModbusSlaveTable (AccessMode accessMode ) {
164- return new ModbusSlaveTable (//
165- OpenemsComponent .getModbusSlaveNatureTable (accessMode ), //
166- ElectricityMeter .getModbusSlaveNatureTable (accessMode ) //
163+ return new ModbusSlaveTable (
164+ OpenemsComponent .getModbusSlaveNatureTable (accessMode ),
165+ ElectricityMeter .getModbusSlaveNatureTable (accessMode )
167166 );
168167 }
169168}
0 commit comments