start of abstraction layer added
This commit is contained in:
parent
fbb2a58198
commit
55fa7c6a9d
1 changed files with 32 additions and 0 deletions
32
src/pyfronius/gen24.py
Normal file
32
src/pyfronius/gen24.py
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# This attempts to be a simpler interface to a Fronius Gen24 Primo/Symo
|
||||||
|
# Inverter. With some functions to poll status and set various parameters
|
||||||
|
# easily without needing to know the underlyin modbus registers.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
class Gen24:
|
||||||
|
def __init__(self, modbus_client):
|
||||||
|
self._modbus_client = modbus_client
|
||||||
|
|
||||||
|
def status(self):
|
||||||
|
pass
|
||||||
|
# return dict with:
|
||||||
|
# solar power
|
||||||
|
# AC power
|
||||||
|
# inverter status
|
||||||
|
|
||||||
|
|
||||||
|
class Gen24Storage(Gen24):
|
||||||
|
def __init__(self, modbus_client):
|
||||||
|
super().__init__(modbus_client)
|
||||||
|
|
||||||
|
def status(self) -> {}:
|
||||||
|
base_stats = super().stats(self)
|
||||||
|
extra_stats = self._getStorageStats()
|
||||||
|
return base_stats.append(extra_stats)
|
||||||
|
|
||||||
|
def forceStorageCharge(self, watts=2500, time="1 hour"):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _getStorageStats():
|
||||||
|
pass
|
Loading…
Reference in a new issue