|
1 | | -This project aims to provide all kinds of useful features for your Home Assistant instance using a single ESP32 board. |
| 1 | +# OneESP32ToRuleThemAll - THZ504 Simplified |
| 2 | + |
| 3 | +This project is a simplified version derived from [OneESP32ToRuleThemAll](https://github.com/kr0ner/OneESP32ToRuleThemAll), specifically focused on controlling the **Tecalor THZ504** heat pump via CAN bus using an ESP32 board and Home Assistant. |
| 4 | + |
| 5 | +## About |
| 6 | + |
| 7 | +This codebase has been streamlined from the original OneESP32ToRuleThemAll project to focus exclusively on the Tecalor THZ504 model, removing support for smart meters, water meters, and other heat pump variants to provide a cleaner, more targeted solution. |
2 | 8 |
|
3 | 9 | ## Features: |
4 | 10 |
|
5 | | - - SmartMeter readings via optical sensor [https://amzn.eu/d/1a28LBy] |
6 | | - - WaterMeter readings via [https://amzn.eu/d/8Rx0UVJ] |
7 | | - - Controlling a Tecalor THZ 504 (or other Tecalor | Stiebel Eltron heat pumps) via CAN [https://amzn.eu/d/5nJJK3r] |
| 11 | + - **Tecalor THZ504 Heat Pump Control** via CAN bus using SN65HVD230 transceiver [https://www.amazon.de/dp/B00KM6XMXO] |
| 12 | + - Complete climate control (heating, cooling, hot water) |
| 13 | + - Energy monitoring (daily/total consumption, COP calculations) |
| 14 | + - Ventilation control with multiple speed levels |
| 15 | + - Temperature sensors (room, storage, flow, return temperatures) |
| 16 | + - Binary sensors for system status (compressor, pumps, filters) |
| 17 | + - Custom ESPHome climate entities with Home Assistant integration |
8 | 18 |
|
9 | 19 | ## Prerequisites: |
10 | 20 |
|
11 | 21 | - A working Home Assistant installation [https://www.home-assistant.io/] |
12 | 22 | - ESPHome AddOn installed [https://www.home-assistant.io/integrations/esphome/] |
13 | 23 |
|
14 | | -## HowTo: |
| 24 | +## Hardware Requirements: |
| 25 | + |
| 26 | + - ESP32-C6-Zero board |
| 27 | + - SN65HVD230 CAN bus transceiver module [https://www.amazon.de/dp/B00KM6XMXO] |
| 28 | + - Tecalor THZ504 heat pump with CAN bus interface |
| 29 | + |
| 30 | +## Setup Instructions: |
| 31 | + |
| 32 | +1. **Hardware Connection:** |
| 33 | + - Connect SN65HVD230 CAN transceiver to ESP32-C6-Zero: |
| 34 | + - TX: GPIO5 |
| 35 | + - RX: GPIO4 |
| 36 | + - VCC: 3.3V |
| 37 | + - GND: GND |
| 38 | + - Connect CAN H/L to your THZ504's CAN bus |
| 39 | + |
| 40 | +2. **ESPHome Configuration:** |
| 41 | + - Navigate to your ESPHome folder |
| 42 | + - Clone or copy this repository |
| 43 | + - Use `esp32-c6-thz504.yaml` as your main configuration file |
| 44 | + - Update `secrets.yaml` with your WiFi credentials and API keys |
| 45 | + - Modify Home Assistant entity IDs in `common.yaml` for room temperature and humidity sensors |
15 | 46 |
|
16 | | -1. navigate to your esphome folder |
17 | | -2. clone the repo (git clone https://github.com/kr0ner/OneESP32ToRuleThemAll.git) |
18 | | -3. copy or symlink OneESP32ToRuleThemAll/esp32-poe-technik.yaml to your esphome folder |
19 | | -4. change board type if needed |
20 | | -5. comment out packages you don't want/need |
21 | | -6. add Wifi if necessary |
22 | | -7. change pins for SPI/CAN if needed |
23 | | -8. provide HA entities for temperature and humidity |
| 47 | +3. **Home Assistant Integration:** |
| 48 | + - Install ESPHome add-on if not already installed |
| 49 | + - Add the device to ESPHome dashboard |
| 50 | + - Flash the firmware to your ESP32-C6-Zero |
| 51 | + - Configure room temperature and humidity sensors in Home Assistant |
24 | 52 |
|
25 | | -## Add new readings from heat pump / adopt to your device |
| 53 | +## Project Structure |
26 | 54 |
|
27 | | -1. Navigate through the menu of the display, mounted to your heat pump |
28 | | -2. Try to match the values (e.g. 237) to the values you see in the display (23.7°) |
29 | | -3. Use the existing templates to add new sensors |
30 | | -4. Add the newly added ids along with their types to property.h |
31 | | -5. Guard the newly added ids with e.g. #if defined(THZ_5_5_ECO) ... #endif to express that it was tested with that version once it is confirmed for the others, the guards can be removed |
32 | | -6. Add the entities to the respective yaml and use the already existing templates. For config values that can be set, use the wp_number.yaml. For sensors that are updated automatically chose the template that fits best. |
33 | | -7. profit |
| 55 | +- **`esp32-c6-thz504.yaml`** - Main ESP32-C6-Zero configuration file |
| 56 | +- **`yaml/thz504.yaml`** - THZ504-specific sensor definitions |
| 57 | +- **`yaml/common.yaml`** - Common CAN bus and core functionality (configured for SN65HVD230) |
| 58 | +- **`yaml/wp_base.yaml`** - Base heat pump sensors and climate entities |
| 59 | +- **`src/`** - C++ source files for custom components |
| 60 | +- **`components/`** - Custom ESPHome components |
| 61 | + |
| 62 | +## Available Entities |
| 63 | + |
| 64 | +The configuration provides comprehensive control and monitoring: |
| 65 | + |
| 66 | +- **Climate Controls:** Heating Day/Night, Hot Water Day/Night with temperature setpoints |
| 67 | +- **Binary Sensors:** Compressor, heating, cooling, ventilation, pumps, filter status |
| 68 | +- **Temperature Sensors:** Room, storage tank, flow/return, outdoor, evaporator |
| 69 | +- **Energy Monitoring:** Daily energy consumption, COP calculations, total energy counters |
| 70 | +- **Ventilation:** 3-speed fan control with airflow monitoring |
| 71 | +- **System Status:** Operating modes, error messages, service indicators |
| 72 | + |
| 73 | +## Customization for THZ504 |
| 74 | + |
| 75 | +This version is specifically configured for THZ504 with: |
| 76 | +- ESP32-C6-Zero with built-in CAN controller using SN65HVD230 transceiver |
| 77 | +- CAN bus IDs optimized for THZ504 communication |
| 78 | +- Temperature sensor mappings verified for THZ504 |
| 79 | +- Energy calculation formulas based on THZ504 specifications |
| 80 | +- Ventilation control adapted to THZ504 fan characteristics |
34 | 81 |
|
35 | 82 | ## Troubleshooting |
36 | | -### You are not able to control your heat pump |
37 | | - --> Increase the log level and try to find out which CAN identifiers to use. Also check the forum and communciation.h |
38 | 83 |
|
39 | | -### You get garbage values for certain sensors |
40 | | - --> There is no offical description of the IDs available. Everything is somewhat trial-and-error. |
41 | | - Also there are many differences between the different heat pumps. Play around with the display and try to find out |
42 | | - the correct IDs. |
| 84 | +### Heat Pump Control Issues |
| 85 | +- Increase log level to DEBUG in your YAML configuration |
| 86 | +- Check CAN bus wiring (CAN H/L connections) |
| 87 | +- Verify CAN bus termination resistors are properly installed |
| 88 | +- Monitor CAN traffic using the built-in logging |
| 89 | + |
| 90 | +### Sensor Value Issues |
| 91 | +- THZ504-specific sensor mappings are pre-configured in this version |
| 92 | +- If values appear incorrect, check the heat pump display to verify scaling |
| 93 | +- Some sensors may take time to populate after initial connection |
43 | 94 |
|
| 95 | +### Connection Problems |
| 96 | +- Ensure ESP32-C6-Zero is properly powered and connected to WiFi |
| 97 | +- Check that the SN65HVD230 CAN transceiver is receiving 3.3V power |
| 98 | +- Verify CAN H/L wiring connections to the THZ504 |
| 99 | +- Verify Home Assistant can communicate with the ESPHome device |
44 | 100 |
|
45 | | -Forked from https://github.com/kr0ner/OneESP32ToRuleThemAll |
| 101 | +## Credits & Acknowledgments |
46 | 102 |
|
47 | | -Heavily inspired by this post in HA community forum: |
| 103 | +This project is **derived from** [OneESP32ToRuleThemAll](https://github.com/kr0ner/OneESP32ToRuleThemAll) by [@kr0ner](https://github.com/kr0ner) and has been simplified to focus specifically on the **Tecalor THZ504** heat pump model. |
48 | 104 |
|
49 | | -https://community.home-assistant.io/t/configured-my-esphome-with-mcp2515-can-bus-for-stiebel-eltron-heating-pump/366053 |
| 105 | +**Original project inspiration:** |
| 106 | +- [OneESP32ToRuleThemAll](https://github.com/kr0ner/OneESP32ToRuleThemAll) - The comprehensive multi-device ESP32 solution |
| 107 | +- Home Assistant Community Forum: [Configured my ESPHome with MCP2515 CAN bus for Stiebel Eltron heating pump](https://community.home-assistant.io/t/configured-my-esphome-with-mcp2515-can-bus-for-stiebel-eltron-heating-pump/366053) |
| 108 | +- [ha-stiebel-control](https://github.com/bullitt186/ha-stiebel-control) by [@bullitt186](https://github.com/bullitt186) |
50 | 109 |
|
51 | | -and |
| 110 | +**Special thanks to:** |
| 111 | +- [@kr0ner](https://github.com/kr0ner) for the original comprehensive implementation |
| 112 | +- [@hovhannes85](https://github.com/hovhannes85) for contributions to the original project |
| 113 | +- The Home Assistant and ESPHome communities for their ongoing support |
52 | 114 |
|
53 | | -https://github.com/bullitt186/ha-stiebel-control |
| 115 | +## License |
54 | 116 |
|
55 | | -special thanks to [@hovhannes85](https://github.com/hovhannes85) |
| 117 | +This project maintains the same license as the original OneESP32ToRuleThemAll project. |
56 | 118 |
|
57 | 119 | ### Useful links |
58 | 120 | https://www.stiebel-eltron.de/content/dam/ste/cdbassets/historic/bedienungs-_u_installationsanleitungen/ISG_Modbus__b89c1c53-6d34-4243-a630-b42cf0633361.pdf |
0 commit comments