DEYE-controller
===================
* 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):
- deye-read - read everything from the inverter (use --help for filters/options)
- deye-regcheck - for quick check on specific register(s)
- deye-scan is a scanner for dataloggers in the local network (not DEYE related)
- deye-regwrite - for writing to individual registers
* Monkey patching:
- direct value assignment on read for the Register and RegistersGroup types (see the examples dir)
* Tested with:
- SUN-12K-SG04LP3 / LSW-3
INSTALL
========
.. code-block:: console
pip install deye-controller
TODO List
=============
* Support single phase inverters, eventually with auto detection.
Examples
==============
* After version 0.2.0 PySolarmanV5 can be patched for even easier reading `see here <examples/README_PATCH.rst>`_
* Basic usage:
* read a register from the inverter
.. 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()
..
* write
.. 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()
____________________________________________________
| Grid | Gen | Time | Pwr | SOC % |
| | | 00:00 | 03:00 | 3500 | 100% |
| | | 03:00 | 04:00 | 3500 | 30% |
| | | 04:00 | 05:00 | 3500 | 30% |
| | | 05:00 | 10:00 | 3500 | 30% |
| | | 10:00 | 23:00 | 3500 | 100% |
| | | 23:00 | 00:00 | 3500 | 30% |
----------------------------------------------------
>>> 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
____________________________________________________
| Grid | Gen | Time | Pwr | SOC % |
| | | 00:00 | 03:00 | 3500 | 100% |
| | | 03:00 | 04:00 | 3500 | 30% |
| | | 04:00 | 06:30 | 3500 | 30% |
| ✓ | | 06:30 | 10:00 | 2500 | 35% |
| | | 10:00 | 23:00 | 3500 | 100% |
| | | 23:00 | 00:00 | 3500 | 30% |
----------------------------------------------------
>>> prog.upload_settings() # In order to upload the settings to the inverter
>>> prog.disconnect() # Needed if PySolarmanV5 >= 3.0.0
Notes
=========
* It is possible the inverter to be completely deactivated by writing 0 to register 80
WritableRegisters.SwitchOnOff.set(False) but it will raise an alarm and will show error F19.
The normal state is restored as soon as the register is set to its default value 1.
* The WritableRegisters.GridExportLimit register can be used if the grid export is not desired
when the battery is charged and the PV generation exceeds the load.
Raw data
{
"_id": null,
"home_page": "https://github.com/githubDante/deye-controller",
"name": "deye-controller",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "deye, inverter, deye-intverter",
"author": "githubDante",
"author_email": "github@dantetk.org",
"download_url": "https://files.pythonhosted.org/packages/cc/96/d00461a3d1428413555b86b1707329c3cd44be7bcc07109ec7ae3f2b81aa/deye_controller-0.2.0.tar.gz",
"platform": null,
"description": "DEYE-controller\n===================\n\n* A library and simple tools for interaction with DEYE hybrid inverters\n* The communication with the inverter requires a SOLARMAN datalogger\n* `pysloarmanv5 <https://github.com/jmccrohan/pysolarmanv5>`_ based library\n* Command line tools (exposed after install):\n - deye-read - read everything from the inverter (use --help for filters/options)\n - deye-regcheck - for quick check on specific register(s)\n - deye-scan is a scanner for dataloggers in the local network (not DEYE related)\n - deye-regwrite - for writing to individual registers\n\n* Monkey patching:\n - direct value assignment on read for the Register and RegistersGroup types (see the examples dir)\n\n* Tested with:\n - SUN-12K-SG04LP3 / LSW-3\n\nINSTALL\n========\n\n.. code-block:: console\n\n pip install deye-controller\n\n\nTODO List\n=============\n* Support single phase inverters, eventually with auto detection.\n\nExamples\n==============\n* After version 0.2.0 PySolarmanV5 can be patched for even easier reading `see here <examples/README_PATCH.rst>`_\n* Basic usage:\n\n * read a register from the inverter\n\n .. code-block:: python\n\n >>> from deye_controller import HoldingRegisters, WritableRegisters\n >>> from pysolarmanv5 import PySolarmanV5\n >>> inv = PySolarmanV5('192.168.1.100', 2712345678)\n >>> register = HoldingRegisters.BMSBatteryCapacity\n >>> res = inv.read_holding_registers(register.address, register.len)\n >>> register.value = res[0] if register.len == 1 else res\n >>> print(register.description, register.format(), register.suffix)\n bms_battery_SOC 24 %\n >>> inv.disconnect()\n ..\n\n * write\n\n .. code-block:: python\n\n >>> from deye_controller import HoldingRegisters, WritableRegisters\n >>> from pysolarmanv5 import PySolarmanV5\n >>> inv = PySolarmanV5('192.168.1.100', 2712345678)\n >>> register = WritableRegisters.SellModeSOC3\n >>> register.set(23)\n\n >>> inv.write_multiple_holding_registers(register.address, [register.modbus_value])\n 1\n >>> inv.disconnect()\n\n\n\n* SellMode programming:\n\n .. code-block:: python\n\n >>> from deye_controller import SellProgrammer\n >>> prog = SellProgrammer('192.168.1.108', 2799999999)\n >>> prog.show_as_screen()\n ____________________________________________________\n | Grid | Gen | Time | Pwr | SOC % |\n | | | 00:00 | 03:00 | 3500 | 100% |\n | | | 03:00 | 04:00 | 3500 | 30% |\n | | | 04:00 | 05:00 | 3500 | 30% |\n | | | 05:00 | 10:00 | 3500 | 30% |\n | | | 10:00 | 23:00 | 3500 | 100% |\n | | | 23:00 | 00:00 | 3500 | 30% |\n ----------------------------------------------------\n >>> prog.update_program(3, start_t='6:30', power=2500, soc=35, grid_ch=True)\n Program updated\n >>> prog.show_as_screen() # For visual confirmation of the settings\n ____________________________________________________\n | Grid | Gen | Time | Pwr | SOC % |\n | | | 00:00 | 03:00 | 3500 | 100% |\n | | | 03:00 | 04:00 | 3500 | 30% |\n | | | 04:00 | 06:30 | 3500 | 30% |\n | \u2713 | | 06:30 | 10:00 | 2500 | 35% |\n | | | 10:00 | 23:00 | 3500 | 100% |\n | | | 23:00 | 00:00 | 3500 | 30% |\n ----------------------------------------------------\n >>> prog.upload_settings() # In order to upload the settings to the inverter\n >>> prog.disconnect() # Needed if PySolarmanV5 >= 3.0.0\n\n\nNotes\n=========\n* It is possible the inverter to be completely deactivated by writing 0 to register 80\n WritableRegisters.SwitchOnOff.set(False) but it will raise an alarm and will show error F19.\n The normal state is restored as soon as the register is set to its default value 1.\n* The WritableRegisters.GridExportLimit register can be used if the grid export is not desired\n when the battery is charged and the PV generation exceeds the load.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MODBUS Controller for DEYE inverters",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/githubDante/deye-controller",
"Repository": "https://github.com/githubDante/deye-controller"
},
"split_keywords": [
"deye",
" inverter",
" deye-intverter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5bd4b8d2b53b4c0c5705120c41409ba9e16c1a4e1b2f101dcb8a1e552e9b023d",
"md5": "bb40aa390e4f19255897fca34ecb7009",
"sha256": "473d67347e20d7f9ec459ea0e0db218e8a1a49144f2fb9babe9cee9ba4853e3c"
},
"downloads": -1,
"filename": "deye_controller-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb40aa390e4f19255897fca34ecb7009",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 22030,
"upload_time": "2024-10-11T20:11:53",
"upload_time_iso_8601": "2024-10-11T20:11:53.604774Z",
"url": "https://files.pythonhosted.org/packages/5b/d4/b8d2b53b4c0c5705120c41409ba9e16c1a4e1b2f101dcb8a1e552e9b023d/deye_controller-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cc96d00461a3d1428413555b86b1707329c3cd44be7bcc07109ec7ae3f2b81aa",
"md5": "df9b765544b892aaa93f4d0200e25a0c",
"sha256": "297bd6e80eeab151d0464a062bbe57e7945857935de9df3270ff86d20c4fd681"
},
"downloads": -1,
"filename": "deye_controller-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "df9b765544b892aaa93f4d0200e25a0c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 39871,
"upload_time": "2024-10-11T20:11:55",
"upload_time_iso_8601": "2024-10-11T20:11:55.471688Z",
"url": "https://files.pythonhosted.org/packages/cc/96/d00461a3d1428413555b86b1707329c3cd44be7bcc07109ec7ae3f2b81aa/deye_controller-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-11 20:11:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "githubDante",
"github_project": "deye-controller",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "deye-controller"
}