File tree Expand file tree Collapse file tree
packages/modules/devices/alpha_ess/alpha_ess Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,15 +45,26 @@ def update(self):
4545 val * 10 for val in self .__tcp_client .read_holding_registers (
4646 0x0010 , [ModbusDataType .INT_32 ] * 2 , unit = self .__modbus_id
4747 )]
48- currents = [val / 1000 for val in self .__tcp_client .read_holding_registers (
48+ currents = [val / 10 for val in self .__tcp_client .read_holding_registers (
4949 0x0017 , [ModbusDataType .INT_16 ]* 3 , unit = self .__modbus_id )]
50-
50+ powers = self .__tcp_client .read_holding_registers (
51+ 0x001b , [ModbusDataType .INT_32 ]* 3 , unit = self .__modbus_id )
52+ voltages = self .__tcp_client .read_holding_registers (
53+ 0x0014 , [ModbusDataType .UINT_16 ]* 3 , unit = self .__modbus_id )
54+ frequency = self .__tcp_client .read_holding_registers (
55+ 0x001A , ModbusDataType .UINT_16 , unit = self .__modbus_id ) / 100
5156 counter_state = CounterState (
5257 currents = currents ,
5358 imported = imported ,
5459 exported = exported ,
5560 power = power
5661 )
62+ if 'powers' in locals ():
63+ counter_state .powers = powers
64+ if 'voltages' in locals ():
65+ counter_state .voltages = voltages
66+ if 'frequency' in locals ():
67+ counter_state .frequency = frequency
5768 self .store .set (counter_state )
5869
5970
You can’t perform that action at this time.
0 commit comments