Skip to content

Commit

Permalink
shelly: Implement energy readings too
Browse files Browse the repository at this point in the history
These are exposed by a separate "EMData" component so I initially missed them
  • Loading branch information
Jalle19 committed Oct 17, 2023
1 parent df201fe commit 262b365
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shelly.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@ def device_init(self):
]

self.data_regs = [
Reg_f32l(1162, '/Ac/Energy/Forward', 1000, '%.1f kWh'),
Reg_f32l(1164, '/Ac/Energy/Reverse', 1000, '%.1f kWh'),
Reg_f32l(1013, '/Ac/Power', 1, '%.1f W'),
Reg_f32l(1182, '/Ac/L1/Energy/Forward', 1000, '%.1f kWh'),
Reg_f32l(1184, '/Ac/L1/Energy/Reverse', 1000, '%.1f kWh'),
Reg_f32l(1020, '/Ac/L1/Voltage', 1, '%.1f V'),
Reg_f32l(1022, '/Ac/L1/Current', 1, '%.1f A'),
Reg_f32l(1024, '/Ac/L1/Power', 1, '%.1f W'),
Reg_f32l(1202, '/Ac/L2/Energy/Forward', 1000, '%.1f kWh'),
Reg_f32l(1204, '/Ac/L2/Energy/Reverse', 1000, '%.1f kWh'),
Reg_f32l(1040, '/Ac/L2/Voltage', 1, '%.1f V'),
Reg_f32l(1042, '/Ac/L2/Current', 1, '%.1f A'),
Reg_f32l(1044, '/Ac/L2/Power', 1, '%.1f W'),
Reg_f32l(1222, '/Ac/L3/Energy/Forward', 1000, '%.1f kWh'),
Reg_f32l(1224, '/Ac/L3/Energy/Reverse', 1000, '%.1f kWh'),
Reg_f32l(1060, '/Ac/L3/Voltage', 1, '%.1f V'),
Reg_f32l(1062, '/Ac/L3/Current', 1, '%.1f A'),
Reg_f32l(1064, '/Ac/L3/Power', 1, '%.1f W'),
Expand Down

0 comments on commit 262b365

Please sign in to comment.