{"id":14985320,"url":"https://github.com/jedie/inverter-connect","last_synced_at":"2025-04-10T23:51:14.405Z","repository":{"id":154062738,"uuid":"630620974","full_name":"jedie/inverter-connect","owner":"jedie","description":"Get information from Deye Microinverter","archived":false,"fork":false,"pushed_at":"2024-08-08T09:23:46.000Z","size":593,"stargazers_count":31,"open_issues_count":26,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-07T03:02:27.949Z","etag":null,"topics":["cli","deye","homeassistant","inverter","python","raspberry-pi","solar-energy","solar-system"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/inverter-connect/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jedie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-20T19:22:05.000Z","updated_at":"2025-03-24T13:31:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"b12b68b7-254b-4c70-bb17-2c7affb1fe05","html_url":"https://github.com/jedie/inverter-connect","commit_stats":{"total_commits":83,"total_committers":5,"mean_commits":16.6,"dds":"0.048192771084337394","last_synced_commit":"ab0cfcc2653d238cad453fee2b2b2953b50b82b4"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedie%2Finverter-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedie%2Finverter-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedie%2Finverter-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jedie%2Finverter-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jedie","download_url":"https://codeload.github.com/jedie/inverter-connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317707,"owners_count":21083528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","deye","homeassistant","inverter","python","raspberry-pi","solar-energy","solar-system"],"created_at":"2024-09-24T14:10:42.344Z","updated_at":"2025-04-10T23:51:14.388Z","avatar_url":"https://github.com/jedie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inverter-connect\n\n\n**New maintainer wanted!**\nI will no longer use Deye devices. Partly because of the #RelaisGate.\n\n\n[![tests](https://github.com/jedie/inverter-connect/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/jedie/inverter-connect/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/github/jedie/inverter-connect/branch/main/graph/badge.svg)](https://app.codecov.io/github/jedie/inverter-connect)\n[![inverter-connect @ PyPi](https://img.shields.io/pypi/v/inverter-connect?label=inverter-connect%20%40%20PyPi)](https://pypi.org/project/inverter-connect/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/inverter-connect)](https://github.com/jedie/inverter-connect/blob/main/pyproject.toml)\n[![License GPL-3.0-or-later](https://img.shields.io/pypi/l/inverter-connect)](https://github.com/jedie/inverter-connect/blob/main/LICENSE)\n\nGet information from Deye Microinverter\n\nThe whole thing is just a learning exercise for now. We will see.\n\n\n# quickstart\n\n## overview\n\n* clone the sources\n* Bootstrap and create default user settings by just call `./cli.py edit-settings`\n* Change the settings for your needs\n* ...use the commands... ;)\n* Setup systemd service to publish the inventer values to a Home Assistant instance via MQTT\n\nCurrently just clone the project and just start the cli (that will create a virtualenv and installs every dependencies)\n\nNote: Please enable https://www.piwheels.org/ if you are on a Raspberry Pi !\n\ne.g.:\n```bash\n~$ git clone https://github.com/jedie/inverter-connect.git\n~$ cd inverter-connect\n~/inverter-connect$ ./cli.py --help\n```\n\nThe output of `./cli.py --help` looks like:\n\n[comment]: \u003c\u003e (✂✂✂ auto generated main help start ✂✂✂)\n```\nUsage: ./cli.py [OPTIONS] COMMAND [ARGS]...\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮\n│ --help      Show this message and exit.                                                          │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮\n│ debug-settings        Display (anonymized) MQTT server username and password                     │\n│ edit-settings         Edit the settings file. On first call: Create the default one.             │\n│ inverter-version      Print all version information of the inverter                              │\n│ print-at-commands     Print one or more AT command values from Inverter.                         │\n│ print-values          Print all known register values from Inverter, e.g.:                       │\n│ publish-loop          Publish current data via MQTT for Home Assistant (endless loop)            │\n│ read-register         Read register(s) from the inverter                                         │\n│ set-time              Set current date time in the inverter device.                              │\n│ systemd-debug         Print Systemd service template + context + rendered file content.          │\n│ systemd-remove        Write Systemd service file, enable it and (re-)start the service. (May     │\n│                       need sudo)                                                                 │\n│ systemd-setup         Write Systemd service file, enable it and (re-)start the service. (May     │\n│                       need sudo)                                                                 │\n│ systemd-status        Display status of systemd service. (May need sudo)                         │\n│ systemd-stop          Stops the systemd service. (May need sudo)                                 │\n│ test-mqtt-connection  Test connection to MQTT Server                                             │\n│ version               Print version and exit                                                     │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n[comment]: \u003c\u003e (✂✂✂ auto generated main help end ✂✂✂)\n\n\n# Setup systemd services for Home Assistant\n\nUpdate your settings via: `./cli.py edit-settings` and insert MQTT credentials in section `[mqtt]`\n\nCheck also the config section `[systemd]` and `[systemd.template_context]`\nbut normally they must not be changed ;)\n\nTo verify your settings, call: `./cli.py debug-settings`\n\nTo see the systemd service file content, just call: `./cli.py systemd-debug`\n\n**Note:** Some of the systemd commands, needs `sudo` because a normal user can't change systemd services!\nYou will see permission errors with a hint to call the cli with sudo ;)\n\nIf everything looks okay, setup and start the systemd service with: `sudo ./cli.py systemd-setup`\n\nCheck the services with: `sudo ./cli.py systemd-status`\n\n\n# most important commands\n\n\n## publish-loop\n\nHelp from `./cli.py print-values --help` Looks like:\n\n[comment]: \u003c\u003e (✂✂✂ auto generated publish-loop help start ✂✂✂)\n```\nUsage: ./cli.py publish-loop [OPTIONS]\n\n Publish current data via MQTT for Home Assistant (endless loop)\n The \"Daily Production\" count will be cleared in the night, by set the current date time via\n AT-command.\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮\n│ *  --ip             TEXT                                  IP address of your inverter [required] │\n│ *  --port           INTEGER                               Port of inverter services              │\n│                                                           [default: 48899]                       │\n│                                                           [required]                             │\n│ *  --inverter       [deye_2mppt|deye_4mppt|deye_sg04lp3]  Prefix of yaml config files in         │\n│                                                           inverter/definitions/                  │\n│                                                           [default: deye_2mppt]                  │\n│                                                           [required]                             │\n│    --verbosity  -v  INTEGER RANGE [0\u003c=x\u003c=3]               Verbosity level; Accepts integer value │\n│                                                           e.g.: \"--verbose 2\" or can be count    │\n│                                                           e.g.: \"-vv\"                            │\n│                                                           [default: 0; 0\u003c=x\u003c=3]                  │\n│    --help                                                 Show this message and exit.            │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n[comment]: \u003c\u003e (✂✂✂ auto generated publish-loop help end ✂✂✂)\n\n\n----\n\n\n## print-values\n\nHelp from `./cli.py print-values --help` Looks like:\n\n[comment]: \u003c\u003e (✂✂✂ auto generated print-values help start ✂✂✂)\n```\nUsage: ./cli.py print-values [OPTIONS]\n\n Print all known register values from Inverter, e.g.:\n .../inverter-connect$ ./cli.py print-values\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮\n│ *  --ip             TEXT                                  IP address of your inverter [required] │\n│ *  --port           INTEGER                               Port of inverter services              │\n│                                                           [default: 48899]                       │\n│                                                           [required]                             │\n│ *  --inverter       [deye_2mppt|deye_4mppt|deye_sg04lp3]  Prefix of yaml config files in         │\n│                                                           inverter/definitions/                  │\n│                                                           [default: deye_2mppt]                  │\n│                                                           [required]                             │\n│    --verbosity  -v  INTEGER RANGE [0\u003c=x\u003c=3]               Verbosity level; Accepts integer value │\n│                                                           e.g.: \"--verbose 2\" or can be count    │\n│                                                           e.g.: \"-vv\"                            │\n│                                                           [default: 0; 0\u003c=x\u003c=3]                  │\n│    --compact    -c                                        Only show the values concerning power  │\n│                                                           generation                             │\n│    --help                                                 Show this message and exit.            │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n[comment]: \u003c\u003e (✂✂✂ auto generated print-values help end ✂✂✂)\n\nExample output of `print-values` call:\n\n![print-values](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/inverter-connect/2023-05-20_13-48.png \"2023-05-20_13-48.png\")\n\n\n----\n\n\n## print-at-commands\n\nHelp from `./cli.py print-at-commands --help` Looks like:\n\n[comment]: \u003c\u003e (✂✂✂ auto generated print-at-commands help start ✂✂✂)\n```\nUsage: ./cli.py print-at-commands [OPTIONS] [COMMANDS]...\n\n Print one or more AT command values from Inverter.\n Use all known AT commands, if no one is given, e.g.:\n .../inverter-connect$ ./cli.py print-at-commands\n Or specify one or more AT-commands, e.g.:\n .../inverter-connect$ ./cli.py print-at-commands WEBVER .../inverter-connect$ ./cli.py\n print-at-commands WEBVER WEBU\n e.g.: Set NTP server, enable NTP and check the values:\n .../inverter-connect$ ./cli.py print-at-commands NTPSER=192.168.1.1 NTPEN=on NTPSER NTPEN\n wait a while and request the current date time:\n .../inverter-connect$ ./cli.py print-at-commands NTPTM\n (Note: The prefix \"AT+\" will be added to every command)\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮\n│ *  --ip             TEXT                     IP address of your inverter [required]              │\n│ *  --port           INTEGER                  Port of inverter services [default: 48899]          │\n│                                              [required]                                          │\n│    --verbosity  -v  INTEGER RANGE [0\u003c=x\u003c=3]  Verbosity level; Accepts integer value e.g.:        │\n│                                              \"--verbose 2\" or can be count e.g.: \"-vv\"           │\n│                                              [default: 0; 0\u003c=x\u003c=3]                               │\n│    --help                                    Show this message and exit.                         │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n[comment]: \u003c\u003e (✂✂✂ auto generated print-at-commands help end ✂✂✂)\n\nExample output of `print-at-commands` call:\n\n![print-at-commands](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/inverter-connect/2023-04-28_08-57.png \"2023-04-28_08-57.png\")\n\n----\n\n\n## read-register\n\nHelp from `./cli.py read-register --help` Looks like:\n\n[comment]: \u003c\u003e (✂✂✂ auto generated read-register help start ✂✂✂)\n```\nUsage: ./cli.py read-register [OPTIONS] REGISTER LENGTH\n\n Read register(s) from the inverter\n e.g.: read 3 registers starting from 0x16:\n .../inverter-connect$ ./cli.py read-register 0x16 3\n e.g.: read the first 32 registers:\n .../inverter-connect$ ./cli.py read-register 0 32\n The start address can be pass as decimal number or as hex string, e.g.: 0x123\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮\n│ *  --ip             TEXT                     IP address of your inverter [required]              │\n│ *  --port           INTEGER                  Port of inverter services [default: 48899]          │\n│                                              [required]                                          │\n│    --verbosity  -v  INTEGER RANGE [0\u003c=x\u003c=3]  Verbosity level; Accepts integer value e.g.:        │\n│                                              \"--verbose 2\" or can be count e.g.: \"-vv\"           │\n│                                              [default: 0; 0\u003c=x\u003c=3]                               │\n│    --help                                    Show this message and exit.                         │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n[comment]: \u003c\u003e (✂✂✂ auto generated read-register help end ✂✂✂)\n\nExample output of `read-register` call:\n\n![read-register](https://raw.githubusercontent.com/jedie/jedie.github.io/master/screenshots/inverter-connect/2023-04-28_08-53.png \"2023-04-28_08-53.png\")\n\n----\n\n\n# start development\n\nFor development, we have a separate CLI, just call it:\n```bash\n~/inverter-connect$ ./dev-cli.py --help\n```\n\nThe output of `./dev-cli.py --help` looks like:\n\n[comment]: \u003c\u003e (✂✂✂ auto generated dev help start ✂✂✂)\n```\nUsage: ./dev-cli.py [OPTIONS] COMMAND [ARGS]...\n\n╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮\n│ --help      Show this message and exit.                                                          │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮\n│ check-code-style            Check code style by calling darker + flake8                          │\n│ coverage                    Run and show coverage.                                               │\n│ create-default-settings     Create a default user settings file. (Used by CI pipeline ;)         │\n│ fix-code-style              Fix code style of all inverter source code files via darker          │\n│ install                     Run pip-sync and install 'inverter' via pip as editable.             │\n│ mypy                        Run Mypy (configured in pyproject.toml)                              │\n│ publish                     Build and upload this project to PyPi                                │\n│ safety                      Run safety check against current requirements files                  │\n│ test                        Run unittests                                                        │\n│ tox                         Run tox                                                              │\n│ update                      Update \"requirements*.txt\" dependencies files                        │\n│ update-test-snapshot-files  Update all test snapshot files (by remove and recreate all snapshot  │\n│                             files)                                                               │\n│ version                     Print version and exit                                               │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n[comment]: \u003c\u003e (✂✂✂ auto generated dev help end ✂✂✂)\n\n----\n\n\n# credits\n\nOthers before me have done good work. In particular, I have learned a lot from the following projects:\n\n* https://github.com/s10l/deye-logger-at-cmd\n* https://github.com/kbialek/deye-inverter-mqtt\n* https://github.com/StephanJoubert/home_assistant_solarman\n\nThe included definitions yaml files are from:\n\nhttps://github.com/StephanJoubert/home_assistant_solarman/tree/main/custom_components/solarman/inverter_definitions\n\n\n# various links\n\n* Discussion: https://www.photovoltaikforum.com/thread/201065-inverter-connect-daten-vom-deye-wechselrichter-per-python-abrufen/ (de)\n* Screenshots: https://github.com/jedie/jedie.github.io/tree/master/screenshots/inverter-connect\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedie%2Finverter-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedie%2Finverter-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedie%2Finverter-connect/lists"}