{"id":21541823,"url":"https://github.com/alexmohr/open-heat","last_synced_at":"2025-04-10T04:24:20.583Z","repository":{"id":38385738,"uuid":"326464631","full_name":"alexmohr/open-heat","owner":"alexmohr","description":"Eqiva valve firmware for esp8266","archived":false,"fork":false,"pushed_at":"2022-10-05T21:52:25.000Z","size":27735,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"dev","last_synced_at":"2025-04-09T17:21:20.798Z","etag":null,"topics":["eqiva","esp8266","heating","home-assistant","iot","mqtt","radiator"],"latest_commit_sha":null,"homepage":"","language":"C++","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/alexmohr.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-01-03T17:38:46.000Z","updated_at":"2025-01-05T08:08:08.000Z","dependencies_parsed_at":"2023-01-19T07:15:49.108Z","dependency_job_id":null,"html_url":"https://github.com/alexmohr/open-heat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmohr%2Fopen-heat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmohr%2Fopen-heat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmohr%2Fopen-heat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexmohr%2Fopen-heat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexmohr","download_url":"https://codeload.github.com/alexmohr/open-heat/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248155885,"owners_count":21056724,"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":["eqiva","esp8266","heating","home-assistant","iot","mqtt","radiator"],"created_at":"2024-11-24T05:07:46.119Z","updated_at":"2025-04-10T04:24:20.568Z","avatar_url":"https://github.com/alexmohr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Heat\n![BPlatformIO CI](https://github.com/alexmohr/open-heat/workflows/PlatformIO%20CI/badge.svg)\n\nThis projects provides a firmware for an ESP8266 to control radiator valves.\n\n\n## Status \nEarly beta\n\n## Hardware\n  * ESP8266\n  * [Radiator Valve](https://www.amazon.de/-/en/Eqiva-Bluetooth-Smart-Radiator-Thermostat/dp/B085LW2K1M/)\n    * The linked valve is taken apart and only the motor and temperature sensor is used.\n    Therefore the cheapest version without support or bluetooth for wifi is sufficient\n  * BME280\n    * This can be used instead the temperature sensor from the Eqiva valve.\n    Using this requires less intricate soldering.\n  * HT7333 voltage regulator\n\n### Pin configuration\nPins can be configured via the webinterface.\nThe current defaults are:\n\n| Function | Ground  | VIN     |\n|----------|---------|---------|\n| Motor    | D6 (12) | D5 (14) |\n| Window   | D8 (15) | D7 (13) |\n\n### Battery \nTo extend the battery lifetime this project is using the following batteries \n\nBattery holder:\n* https://de.aliexpress.com/item/32969695165.html\n\nBattery:\n* https://de.aliexpress.com/item/1005003394481523.html\n\nTo monitor their voltage the ADC of the ESP is used. \nThis requires to solder a voltage divider, with 100k and 33k Ohm resistance. \nFor details, see the schematics.\nPlease note that at this point it's not possible to configure the resistance\nvalues via the web interface. \nPlease note that a nodemcu already comes with a voltage divider for the ADC.\nTo use the battery management you have to de-solder these resistors\n\n## Building\nRun `init.sh` to properly initialize the project. \nTo build run \n```\nplatformio -c clion run --target release -e nodemcuv2\n```\n\n## Setup\nConnect to the WiFi OpenHeatESP... with password \"OpenHeat\".\nOpen 192.168.4.1 in your browser and start configuration. \nSave config and the ESP will reboot and connect to your Wifi.\n\n\n## Uploading\n```bash\nesptool.py --before no_reset --after hard_reset --chip esp8266 --port \"/dev/ttyUSB0\" --baud 921600 write_flash 0x0 \".pio/build/nodemcuv2/firmware.bin\"\n\n```\n\n## Updating\nDownload the latest firmware from releases and upload it on the web-ui.\nMake sure to download the correct version, otherwise your MCU has to be flashed via USB again.\n\nThe initial configuration allows the configuration of a user name and password \nfor update purposes. \nThis is to improve security a bit and not anyone in your network can flash a new firmware. \nFor security purposes this data only can be changed in the configuration mode \nand not via the webinterface. \nTo enable the configuration mode again restart your device twice in 10s. \n\n\n## MQTT \nThe heater can be controlled via mqtt and integrated into home assistant.\nIt offers the following topics, all of them are prefixed with the configured topic (`$TOPIC`):\n* Set target temp: `$TOPIC/temperature/target/set`\n* Get target temp: `$TOPIC/temperature/target/get`\n* Get measured temp: `$TOPIC/temperature/measured/get`\n* Get measured humidity: `$TOPIC/humidity/measured/get`\n* Get battery percentage: `$TOPIC/battery/percentage`\n* Get battery voltage: `$TOPIC/battery/voltage`\n* Get current mode (can be off or heating): `$TOPIC/mode/get`\n* Set current mode (can be off or heating): `$TOPIC/mode/set`\n* Get current modem sleep time: `$TOPIC/modemsleep/get` (time is milliseconds)\n* Set current modem sleep time: `$TOPIC/modemsleep/set` (time is milliseconds)\n  * Be careful when setting this. \n  * If it's set to a small value the device will consume a lot of battery\n  * If it's set to a large value you won't receive temperatures and battery \n    updates in a high frequency and you won't be able to change the operation mode\n  * This feature is intended to set the sleep time overnight to something like 1h\n    to save battery\n\nThe battery percentage assumes a voltage between 3.1 and 4.2 volts\n\nExample configuration for home assistant:\n```yaml\nclimate:\n  - platform: mqtt\n    modes:\n      - \"off\"\n      - \"heat\"\n    name: Living room\n    temperature_command_topic: \"$TOPIC/temperature/target/set\"\n    temperature_state_topic: \"$TOPIC/temperature/target/get\"\n    current_temperature_topic: \"$TOPIC/temperature/measured/get\"\n    mode_command_topic: \"$TOPIC/mode/set\"\n    mode_state_topic: \"$TOPIC/mode/get\"\n    retain: true\n```\n\noptional if you also want to monitor the battery state:\n```yaml\n  - platform: mqtt\n    state_topic: \"$TOPIC/battery/voltage\"\n    name: \"Bed Heater Voltage\"\n\n  - platform: mqtt\n    state_topic: \"$TOPIC/battery/percent\"\n    name: \"Bed Heater Percent\"\n\n```\n\n### Debugging\nAll commands must be sent with retain flag to allow the device to read the value \nas soon as it comes out of sleep\n\n* Enable debugging and web interface, WARNING this consumes a lot more power is \nnot intended to be used for battery operation:\n  ``` \n  mosquitto_pub -h hassbian -t \"$TOPIC/debug/enable\" -m \"true\" -r\n  ```\n* Set log level\n    ```\n     mosquitto_pub -h hassbian -t \"$TOPIC/debug/loglevel\" -m \"$LEVEL\" -r   \n    ```\n  Level can be a value between 0 (highest log level = all logs) and 5 (lowest log level = only fatal errors)\n\n* Receive logs\n    ```\n    mosquitto_sub -h hassbian -t \"$TOPIC/log\"\n    ```\n\n## Receiving logs \n### Serial\n``platformio -c clion device monitor -e nodemcuv2 -f esp8266_exception_decoder``\n\n### MQTT \nSubscribe to topic `$TOPIC/log`\n\n### Browser\nLogs are displayed in the web ui at the bottom of the page.\n\n## Code analysis\n````\ncmake -DCMAKE_BUILD_TYPE=nodemcuv2 --CMAKE_EXPORT_COMPILE_COMMANDS=YES ..\nscan-build-11 make\n````\n\n## Case \n\nThe case is designed to hold to valve, a dual 18650 battery holder and an 60x40mm circuit board. \nAt this moment the case has not been printed nor tested yet. \n\n## Contributions\nAs this project is still in a very early stage no contributions will be accepted at the moment.\n\n## Attributions and libraries\n* Big thanks to @Anycubic for continued bug reports, testing and several improvements and ideas\n* Special thanks to traumflug and their regulator implementation in [ISTAtrol](https://github.com/Traumflug/ISTAtrol/blob/master/firmware/main.c).\n  Although it was heavily modified and improved the I-Regulator still forms the base of the valve control.\n* WiFi Manager is inspired by https://github.com/roberttidey/WiFiManager/blob/feature_fastconnect/WiFiManager.cpp\n### Libraries\n* [ESP Async WebServer](https://github.com/me-no-dev/ESPAsyncWebServer)\n* [ESP AsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP)\n* [AsyncTCP](https://github.com/me-no-dev/AsyncTCP)\n* [ESP_DoubleResetDetector](https://github.com/khoih-prog/ESP_DoubleResetDetector)\n* [Adafruit BME280 Library](https://github.com/adafruit/Adafruit_BME280_Library/)\n* [MQTT](https://github.com/256dpi/arduino-mqtt)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmohr%2Fopen-heat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexmohr%2Fopen-heat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexmohr%2Fopen-heat/lists"}