{"id":28173907,"url":"https://github.com/blueandi/smartmeter","last_synced_at":"2026-01-24T22:02:46.663Z","repository":{"id":287460136,"uuid":"964774002","full_name":"BlueAndi/smartmeter","owner":"BlueAndi","description":"Smartmeter with S0 input","archived":false,"fork":false,"pushed_at":"2025-08-29T08:51:20.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-29T12:29:51.652Z","etag":null,"topics":["esphome","esphome-config","s0","smartmeter"],"latest_commit_sha":null,"homepage":"","language":null,"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/BlueAndi.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,"zenodo":null}},"created_at":"2025-04-11T19:04:39.000Z","updated_at":"2025-08-29T08:49:52.000Z","dependencies_parsed_at":"2025-05-15T21:14:46.859Z","dependency_job_id":"5e4f6eae-0e98-4e02-a68d-33bf5db2e88b","html_url":"https://github.com/BlueAndi/smartmeter","commit_stats":null,"previous_names":["blueandi/smartmeter"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/BlueAndi/smartmeter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fsmartmeter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fsmartmeter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fsmartmeter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fsmartmeter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlueAndi","download_url":"https://codeload.github.com/BlueAndi/smartmeter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlueAndi%2Fsmartmeter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28737834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T21:19:41.845Z","status":"ssl_error","status_checked_at":"2026-01-24T21:13:38.675Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esphome","esphome-config","s0","smartmeter"],"created_at":"2025-05-15T21:14:23.733Z","updated_at":"2026-01-24T22:02:46.658Z","avatar_url":"https://github.com/BlueAndi.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# smartmeter \u003c!-- omit in toc --\u003e\r\n\r\nA REST API server and MQTT client which provides the power and energy consumption, which uses 2 S0 interfaces.\r\nIts the successor project of [avr-net-io-smartmeter](https://github.com/BlueAndi/avr-net-io-smartmeter). Homeassistant MQTT automatic device discovery is supported as well.\r\n\r\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)\r\n[![Repo Status](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\r\n[![Release](https://img.shields.io/github/release/BlueAndi/smartmeter.svg)](https://github.com/BlueAndi/smartmeter/releases)\r\n\r\n- [Motivation](#motivation)\r\n- [Hardware](#hardware)\r\n- [Deployment](#deployment)\r\n- [Software](#software)\r\n  - [Installation](#installation)\r\n  - [Build](#build)\r\n  - [Flash to target and monitor](#flash-to-target-and-monitor)\r\n- [API Endpoints and MQTT Topics](#api-endpoints-and-mqtt-topics)\r\n- [Used Libraries](#used-libraries)\r\n- [Issues, Ideas And Bugs](#issues-ideas-and-bugs)\r\n- [License](#license)\r\n- [Contribution](#contribution)\r\n\r\n## Motivation\r\n\r\nThe idea was to have a simple way to get the power consumption of the heatpump and the rest of the house. The data shall be provided over REST-API and MQTT, as well as to Homeassistant.\r\n\r\n## Hardware\r\n\r\nThe [Olimex ESP32-POE-ISO](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware) board with the RS-232 level shifter [Olimex MOD-RS232](https://www.olimex.com/Products/Modules/Interface/MOD-RS232/open-source-hardware) is used.\r\n\r\n![Olimex ESP32-POE-ISO pinout](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/resources/ESP32-POE-ISO-GPIO.png)\r\n\r\n## Deployment\r\n\r\n![ClassDiagram](http://www.plantuml.com/plantuml/proxy?cache=no\u0026src=https://raw.githubusercontent.com/BlueAndi/smartmeter/refs/heads/main/doc/sw-architecture/deployment_diagram.puml)\r\n\r\n## Software\r\n\r\nESPHome is used as the base of the software.\r\n\r\n### Installation\r\n\r\n1. Install Python.\r\n2. Setup [virtual environment](https://docs.python.org/3/library/venv.html).\r\n\r\n    ```bash\r\n    python -m venv .venv\r\n    ```\r\n\r\n3. Activate virtual environment.\r\n   - Windows CMD: ```.venv\\Scripts\\activate.bat```\r\n   - Windows PowerShell: ```.venv\\Scripts\\activate.ps1```\r\n   - Linux: ```.venv/Scripts/activate```\r\n4. Install packages.\r\n\r\n    ```bash\r\n    pip install -r requirements.txt\r\n    ```\r\n\r\n5. Create a ```secrets.yaml``` in the project root folder. Replace **my_user** and **my_password** according to the MQTT broker credentials.\r\n\r\n    ```yaml\r\n    mqtt_user: my_user\r\n    mqtt_password: my_password\r\n    ```\r\n\r\n### Build\r\n\r\n```bash\r\nesphome compile smartmeter.yaml\r\n```\r\n\r\n### Flash to target and monitor\r\n\r\n```bash\r\nesphome run smartmeter.yaml\r\n```\r\n\r\n## API Endpoints and MQTT Topics\r\n\r\n| **Name**   | **Description** | **REST API**                          | **MQTT Topic**                           |\r\n|------------|-----------------|---------------------------------------|------------------------------------------|\r\n| **s0-1**   | S0-interface    | `http://\u003cIP-ADDRESS\u003e/sensor/s0_1`     | `heatpumpctrl/sensor/s0_1/state`         |\r\n| **s0-2**   | S0-interface    | `http://\u003cIP-ADDRESS\u003e/sensor/s0_2`     | `heatpumpctrl/sensor/s0_2/state`         |\r\n\r\n## Used Libraries\r\n\r\n| Library | Description | License |\r\n| - | - | - |\r\n| [ESPHome](https://github.com/esphome/esphome) | ESPHome | MIT and GPLv3 |\r\n\r\n## Issues, Ideas And Bugs\r\n\r\nIf you have further ideas or you found some bugs, great! Create a [issue](https://github.com/BlueAndi/smartmeter/issues) or if you are able and willing to fix it by yourself, clone the repository and create a pull request.\r\n\r\n## License\r\n\r\nThe whole source code is published under the [MIT license](http://choosealicense.com/licenses/mit/).\r\nConsider the different licenses of the used third party libraries too!\r\n\r\n## Contribution\r\n\r\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueandi%2Fsmartmeter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblueandi%2Fsmartmeter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblueandi%2Fsmartmeter/lists"}