mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-28 17:56:21 +02:00
[rpi] Add powerfactor and event_count decoder for HM300, HM350, HM400
Without event_count program crashes immediately in __main__.py line 233.
This commit is contained in:
parent
ac207e0d37
commit
2005348f54
1 changed files with 8 additions and 0 deletions
|
@ -515,9 +515,17 @@ class Hm300Decode0B(StatusResponse):
|
|||
""" reactive power """
|
||||
return self.unpack('>H', 20)[0]/10
|
||||
@property
|
||||
def powerfactor(self):
|
||||
""" Powerfactor """
|
||||
return self.unpack('>H', 24)[0]/1000
|
||||
@property
|
||||
def temperature(self):
|
||||
""" Inverter temperature in °C """
|
||||
return self.unpack('>h', 26)[0]/10
|
||||
@property
|
||||
def event_count(self):
|
||||
""" Event counter """
|
||||
return self.unpack('>H', 28)[0]
|
||||
|
||||
class Hm300Decode0C(Hm300Decode0B):
|
||||
""" 1121-series mirco-inverters status data """
|
||||
|
|
Loading…
Add table
Reference in a new issue