DEYE Hybrid inverters library
MIT License
A library and simple tools for interaction with DEYE hybrid inverters
The communication with the inverter requires a SOLARMAN datalogger
pysloarmanv5 <https://github.com/jmccrohan/pysolarmanv5>
_ based library
Command line tools (exposed after install):
Monkey patching:
Tested with:
.. code-block:: console
pip install deye-controller
After version 0.2.0 PySolarmanV5 can be patched for even easier reading see here <examples/README_PATCH.rst>
_
Basic usage:
.. code-block:: python
>>> from deye_controller import HoldingRegisters, WritableRegisters
>>> from pysolarmanv5 import PySolarmanV5
>>> inv = PySolarmanV5('192.168.1.100', 2712345678)
>>> register = HoldingRegisters.BMSBatteryCapacity
>>> res = inv.read_holding_registers(register.address, register.len)
>>> register.value = res[0] if register.len == 1 else res
>>> print(register.description, register.format(), register.suffix)
bms_battery_SOC 24 %
>>> inv.disconnect()
..
.. code-block:: python
>>> from deye_controller import HoldingRegisters, WritableRegisters
>>> from pysolarmanv5 import PySolarmanV5
>>> inv = PySolarmanV5('192.168.1.100', 2712345678)
>>> register = WritableRegisters.SellModeSOC3
>>> register.set(23)
>>> inv.write_multiple_holding_registers(register.address, [register.modbus_value])
1
>>> inv.disconnect()
SellMode programming:
.. code-block:: python
from deye_controller import SellProgrammer prog = SellProgrammer('192.168.1.108', 2799999999) prog.show_as_screen()
prog.update_program(3, start_t='6:30', power=2500, soc=35, grid_ch=True) Program updated prog.show_as_screen() # For visual confirmation of the settings
prog.upload_settings() # In order to upload the settings to the inverter prog.disconnect() # Needed if PySolarmanV5 >= 3.0.0