{"id":18737592,"url":"https://github.com/rrroyal/voltronic-mqtt","last_synced_at":"2025-04-10T12:13:14.497Z","repository":{"id":180537341,"uuid":"644143044","full_name":"rrroyal/voltronic-mqtt","owner":"rrroyal","description":"Voltronic + MQTT","archived":false,"fork":false,"pushed_at":"2024-12-06T17:19:44.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T11:07:26.743Z","etag":null,"topics":["mqtt","voltronic"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrroyal.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}},"created_at":"2023-05-22T23:05:18.000Z","updated_at":"2024-12-16T21:09:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a623215-39d4-4cdc-92ac-013347f2476c","html_url":"https://github.com/rrroyal/voltronic-mqtt","commit_stats":null,"previous_names":["rrroyal/voltronic-mqtt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrroyal%2Fvoltronic-mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrroyal%2Fvoltronic-mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrroyal%2Fvoltronic-mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrroyal%2Fvoltronic-mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrroyal","download_url":"https://codeload.github.com/rrroyal/voltronic-mqtt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248217081,"owners_count":21066633,"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":["mqtt","voltronic"],"created_at":"2024-11-07T15:25:51.249Z","updated_at":"2025-04-10T12:13:14.477Z","avatar_url":"https://github.com/rrroyal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# voltronic-mqtt\nThis container allows you to connect your Voltronic inverter (or any other inverter that works with `PI30` protocol) to [MQTT](https://mqtt.org) (and, becase of MQTT, [Home Assistant](https://www.home-assistant.io) :)).\n\n## Usage\n1. Clone this repository: `git clone https://github.com/rrroyal/voltronic-mqtt.git`\n2. Navigate to the cloned repository: `cd voltronic-mqtt`\n\n### Docker\nTo use this container, you must have [Docker](https://docker.com) and, optionally, [docker-compose](https://docs.docker.com/compose/) installed on your system.\n1. Edit the `docker-compose.yml` file to specify the correct device path, MQTT host, and MQTT password for your system.\n2. Run `docker-compose up` to start the container.\n\n**Alternatively**, use these commands (with parameters configured to your use case) to run the container without `docker-compose`:\n```sh\n# Build the image\ndocker build -t voltronic-mqtt .\n\n# Run the container\ndocker run -it -d --name voltronic-mqtt \\\n  -e VERBOSE=2 \\\n  -e DEVICE_PATH=\"/dev/ttyUSB0\" \\\n  -e POLLING_INTERVAL=60 \\\n  -e MQTT_HOST=\"127.0.0.1:1883\" \\\n  -e MQTT_PASS=\"user:pass\" \\\n  -e MQTT_CLIENT_ID=\"voltronic-mqtt\" \\\n  -e MQTT_TOPIC=\"homeassistant/sensor/voltronic\" \\\n  -e MQTT_TOPIC_SUB=\"send_cmd\" \\\n  --device \"/dev/ttyUSB0:/dev/ttyUSB0\" \\\n  --restart unless-stopped \\\n  --network host \\\n  --privileged \\\n  voltronic-mqtt\n```\n\n### Standalone\nYou can also run the app by itself:\n1. Configure `.env.example` for your use case and save it as `.env`.\n2. Initialize a new `venv` environment: `python3 -m venv venv \u0026\u0026 source venv/bin/activate`\n3. Install dependencies: `pip install -r requirements.txt`\n4. Run the program: `./standalone.sh` (if you're having errors with connecting to serial device, execute this command as root).\n\n## Configuration\n\n### `docker-compose.yml / .env`\nThis file contains the following configuration options:\n- #### `VERBOSE`\n\tLevel of logging (never: `-2`, always: `-1`, silent: `0`, error: `1`, notice: `2`, info: `3`, debug: `4`).\n- #### `DEVICE_PATH`\n\tThe path to the device that the inverter is connected to. This is typically `/dev/ttyUSB0` on UNIX systems.\n- #### `POLLING_INTERVAL`\n\tThe interval (in seconds) at which to poll the inverter for data.\n- #### `MQTT_HOST`\n\tThe hostname and port of the MQTT broker. Format: `host:port` (i.e. `127.0.0.1:1883`).\n- #### `MQTT_PASS`\n\tThe username and password to use when connecting to the MQTT broker. Format: `user:pass` (i.e. `AzureDiamond:hunter2`).\n- #### `MQTT_CLIENT_ID`\n  The ID of the MQTT client (i.e. `voltronic-mqtt`).\n- #### `MQTT_TOPIC`\n  The topic of MQTT messages (i.e. `homeassistant/sensor/voltronic`) **Note: lowercased command will be added as a suffix (i.e. `/qpigs`).**\n- #### `MQTT_TOPIC_SUB`\n  The MQTT topic suffix to subscribe to (i.e. `send_cmd`)\n\n## Devices\nThe container uses the following device:\n- #### `/dev/ttyUSB0:/dev/ttyUSB0`\n\tThis is the device that the inverter is connected to. This must be specified in the `docker-compose.yml`/`.env` file.\n\n## Home Assistant\nTo use this program with [Home Assistant](https://www.home-assistant.io) you will need to connect your Home Assistant instance to the same MQTT broker as this program - you can read more about it [here](https://www.home-assistant.io/integrations/mqtt/). You can also deploy your own broker - i.e. [eclipse-mosquitto](https://hub.docker.com/_/eclipse-mosquitto).  \n#### Please don't connect your Home Assistant instance to public brokers!\nAfter that, you will need to configure MQTT entities. Example config is located inside the `homeassistant-mqtt.yml` file.\n\n## Credits\n- [ned-kelly/docker-voltronic-homeassistant](https://github.com/ned-kelly/docker-voltronic-homeassistant)\n- [manio/skymax-demo](https://github.com/manio/skymax-demo)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrroyal%2Fvoltronic-mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrroyal%2Fvoltronic-mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrroyal%2Fvoltronic-mqtt/lists"}