{"id":16162823,"url":"https://github.com/arevindh/solarman-to-mqtt","last_synced_at":"2025-08-30T16:32:47.732Z","repository":{"id":44085836,"uuid":"419163121","full_name":"arevindh/solarman-to-mqtt","owner":"arevindh","description":"Read inverter data from sofar inverters using solarman wifi stick","archived":false,"fork":false,"pushed_at":"2022-02-16T15:52:02.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-13T08:30:53.844Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/arevindh.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}},"created_at":"2021-10-20T02:45:53.000Z","updated_at":"2023-01-20T13:03:28.000Z","dependencies_parsed_at":"2022-08-20T11:20:10.928Z","dependency_job_id":null,"html_url":"https://github.com/arevindh/solarman-to-mqtt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arevindh%2Fsolarman-to-mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arevindh%2Fsolarman-to-mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arevindh%2Fsolarman-to-mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arevindh%2Fsolarman-to-mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arevindh","download_url":"https://codeload.github.com/arevindh/solarman-to-mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247589836,"owners_count":20963022,"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":[],"created_at":"2024-10-10T02:33:15.818Z","updated_at":"2025-04-07T03:49:44.652Z","avatar_url":"https://github.com/arevindh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\n![ha-dash](https://user-images.githubusercontent.com/693151/138284713-34f78fee-0b73-47e0-8f42-23bc204a9e5d.JPG)\n\n\nSolarman to MQTT a small script to get data from Omnik, Hosola, Goodwe, Solax, Ginlong, Samil, Sofar or Power-One Solar inverter, equipped with a wifi module or connected to a Wi-Fi data logger and push to an mqtt server of your choice.\n\nMQTT topic optimized for Home Assistant [autodiscovery](https://www.home-assistant.io/docs/mqtt/discovery/).\n\nThis script is adapted from  [https://github.com/mcikosos/Inverter-Data-Logger](https://github.com/mcikosos/Inverter-Data-Logger)\n\nCheck the above link to know the list of supported inverters.\n\n\n## Notes\n\nThis service should be running on an always on device preferably a Raspberry Pi or a VM.\n\nWifi Logger needs a static ip inorder to work flawlessly [https://www.pcmag.com/how-to/how-to-set-up-a-static-ip-address](https://www.pcmag.com/how-to/how-to-set-up-a-static-ip-address) \n\n\u003cimg src=\"https://user-images.githubusercontent.com/693151/138283943-fdee03e0-bf31-4658-9ae8-25576b1819b9.png\" data-canonical-src=\"https://user-images.githubusercontent.com/693151/138283943-fdee03e0-bf31-4658-9ae8-25576b1819b9.png\" width=\"200\"  /\u003e\n\n## Docker \n\nCreate `docker-compose.yaml`\n\n```\nversion: '3.7'\nservices:\n  solarman-to-mqtt:\n    image: arevindh/solarman-to-mqtt\n    container_name: solarman-to-mqtt\n    volumes:\n      - ./config.cfg:/usr/src/app/config.cfg\n      - ./logs:/usr/src/app/logs\n    restart: unless-stopped\n```\n\ncreate `config.cfg` from template [config.org.cfg](config.org.cfg) in the same folder\n\n`sudo docker-compose up -d`\n\n## Solarman stick logger to mqtt\n\n`git clone https://github.com/arevindh/solarman-to-mqtt`\n\n`cd solarman-to-mqtt`\n\n`cp config.org.cfg config.cfg`\n\nEdit the contents to match your settings\n\n## Install requirements \n\n`pip3 install -r requirements.txt`\n\n## Testing\n\n`python3 SyncSolarMan.py`\n\n## Create Service \n\nChange `dietpi` to your username ( `whoami` will provide you with your username )\n\n`sudo nano /etc/systemd/system/solarman.service`\n\n```\n[Unit]\nDescription = Solarman Logger to MQTT\nAfter = network.target\n\n[Service]\nType = simple\nExecStart = python3 /home/dietpi/solarman-to-mqtt/SyncSolarMan.py\nWorkingDirectory = /home/dietpi/solarman-to-mqtt\nUser = dietpi\nGroup = dietpi\nRestart = on-failure\nRestartSec = 60\nTimeoutStartSec = infinity\n\n[Install]\nWantedBy = multi-user.target\n```\n\n`sudo systemctl daemon-reload`\n\n`sudo systemctl start solarman`\n\n`sudo systemctl status solarman`\n\n`sudo systemctl enable solarman`\n\n\n## To do\n\n- Better handling of offline device\n- Code refactor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farevindh%2Fsolarman-to-mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farevindh%2Fsolarman-to-mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farevindh%2Fsolarman-to-mqtt/lists"}