{"id":24307770,"url":"https://github.com/bossan/modbus-meter-emulator","last_synced_at":"2026-04-21T01:02:10.469Z","repository":{"id":271623875,"uuid":"914049906","full_name":"bossan/modbus-meter-emulator","owner":"bossan","description":"Emulates an energy meter with modbus communication","archived":false,"fork":false,"pushed_at":"2025-02-10T11:57:31.000Z","size":83,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T12:37:43.784Z","etag":null,"topics":["energy-management","home-assistant","modbus","modbus-rtu","solax","solaxpower"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bossan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"buy_me_a_coffee":"bossan"}},"created_at":"2025-01-08T21:12:51.000Z","updated_at":"2025-02-10T11:57:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a2a2b23-7fbe-426f-b1b8-40b2292bf380","html_url":"https://github.com/bossan/modbus-meter-emulator","commit_stats":null,"previous_names":["bossan/modbus-meter-emulator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossan%2Fmodbus-meter-emulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossan%2Fmodbus-meter-emulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossan%2Fmodbus-meter-emulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bossan%2Fmodbus-meter-emulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bossan","download_url":"https://codeload.github.com/bossan/modbus-meter-emulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242269117,"owners_count":20100071,"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":["energy-management","home-assistant","modbus","modbus-rtu","solax","solaxpower"],"created_at":"2025-01-17T04:19:29.183Z","updated_at":"2026-04-21T01:02:10.447Z","avatar_url":"https://github.com/bossan.png","language":"Python","funding_links":["https://buymeacoffee.com/bossan"],"categories":[],"sub_categories":[],"readme":"# Modbus Meter Emulator\n\nEmulates an energy meter with modbus communication to enable export control on your inverter.\nThe project is intended to be used with Home Assistant, but can be used with any other system that supports MQTT and Modbus.\n\n\u003e [!CAUTION]\n\u003e This project is in the early phases of development. Please use with caution.\n\u003e I am not responsible for any damage caused by using this project.\n\n## Installation\n\nThe current version uses [Poetry](https://python-poetry.org).\nInstall the project and dependencies with:\n\n```bash\npoetry install\n```\n\n## Configuration\n\nExample:\n\n```yaml\nmqtt:\n  broker:\n    host: homeassistant.local\n    port: 1883\n    username: ha-user\n    password: password\n    keepalive: 60\n\nmodbus:\n  port: \"/dev/ttyUSB0\"\n  baudrate: 9600\n  bytesize: 8\n  parity: N\n  stopbits: 1\n\nmeter:\n  type: solax\n  config:\n    current_power_state_topic: \"homeassistant/sensor/p1_meter_power/state\"\n    energy_import_state_topic: \"homeassistant/sensor/p1_meter_energy_import/state\"\n    energy_export_state_topic: \"homeassistant/sensor/p1_meter_energy_export/state\"\n```\n\n## Usage\n\nRun the project with:\n\n```bash\npoetry run meter \u003cpath-to-config-yaml\u003e\n```\nPossitional arguments:\n- `config`: Path to the configuration file.\n\nOptions:\n- `-v` or `--verbose`: Enable verbose logging.\n- `-h` or `--help`: Show help message.\n\n\u003e [!NOTE]\n\u003e If you get a weird error like `'format'` when running the command above, this is most likely because of the version of Poetry you are using.\n\u003e This project was developed with Poetry 1.8 and does not yet work with Poetry 2.0.\n\u003e Try running the tool with `poetry run python -m modbus_meter_emulator \u003cpath-to-config-yaml\u003e`.\n\n### Docker\nThis project is also available as a docker image.\n\n#### Pull\n```bash\ndocker pull ghcr.io/bossan/modbus-meter-emulator\n```\n\n#### Run\n```commandline\ndocker run -v ./config.yaml:/etc/modbus-meter/config.yaml ghcr.io/bossan/modbus-meter-emulator\n```\n\nWhere `./config.yaml` should be replaced with the location of your config file.\n\n## Supported Inverters\n\n| Brand | Model     | Tested             | Notes                                                                      |\n|-------|-----------|--------------------|----------------------------------------------------------------------------|\n| Solax | X3 MIC G2 | :white_check_mark: | Current import/export is working, still need to validate the other values. |\n\n## Credits\n\nUsed the following repo's for inspiration:\n\n- [syssi/esphome-solax-x1-mini](https://github.com/syssi/esphome-solax-x1-mini/).\n- [wills106/homeassistant-solax-modbus](https://github.com/wills106/homeassistant-solax-modbus)\n- [straga/Smart-Meter-Gateway](https://github.com/straga/Smart-Meter-Gateway)\n\nAnd huge thanks\nto [raenji-sk/Solax-X3-MIC-G2-Virtual-Smart-Meter](https://github.com/raenji-sk/Solax-X3-MIC-G2-Virtual-Smart-Meter) for\nbasically sorting out all the used addresses, so I don't have to.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbossan%2Fmodbus-meter-emulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbossan%2Fmodbus-meter-emulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbossan%2Fmodbus-meter-emulator/lists"}