You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 11, 2025. It is now read-only.
<p><b>ESPAltherma</b> is a solution to monitor Daikin Altherma / ROTEX / HOVAL Belaria heat pump activity using just Arduino on an <b>ESP32</b> Microcontroller.</p>
19
+
<p><b>ESPAltherma</b> is a solution to monitor Daikin Altherma / ROTEX / HOVAL Belaria heat pump activity using just Arduino on an <b>ESP32</b> or <b>ESP8266</b> Microcontroller.</p>
20
20
21
21
_If this project has any value for you, please consider [buying me a 🍺](https://www.buymeacoffee.com/raomin) or even better [sponsoring ESPAltherma](https://github.com/sponsors/raomin/)!. I don't do this for money but it feels good to get some support! Thanks :)_
22
22
23
23
## Features
24
24
25
25
<ulstyle="list-style-position: inside;">
26
26
<li>Connects with the serial port of Altherma on port X10A.</li>
27
-
<li>Needs just an ESP32, no need for extra hardware.</li>
27
+
<li>Needs just an ESP32, no need for extra hardware. ESP8266 is also supported.</li>
28
28
<li>Queries the Altherma for selected values at defined interval.</li>
29
29
<li>Converts and formalizes all values in a JSON message sent over MQTT.</li>
30
30
<li>Easily integrates with Home Assistant's MQTT auto-discovery.</li>
@@ -42,7 +42,7 @@ _If this project has any value for you, please consider [buying me a 🍺](https
42
42
## Hardware
43
43
44
44
- A Daikin Altherma or Daikin Altherma based heat pump (ROTEX, HOVAL Belaria...)
45
-
- An ESP32 *I recommend the M5StickC, it has an integrated display, a magnet, fits well next to the board and is properly isolated. But any ESP32 should work.*
45
+
- An ESP32 or ESP8266 *I recommend an ESP32, more precisely the M5StickC, it has an integrated display, a magnet, fits well next to the board and is properly isolated. But any ESP32 should work. A support is added for esp8266.*
@@ -60,12 +60,13 @@ _If this project has any value for you, please consider [buying me a 🍺](https
60
60
2. Optional - If you are using an **M5StickC** (or M5Stack), select the corresponding environment from the status bar:
61
61
Click  and select **env:M5StickC** on the top. The status bar should display 
62
62
For **M5StickCPlus** select **env:M5StickCPlus**
63
+
If you are using an **ESP8266** select the `nodemcuv2` environement.
63
64
64
65
3. Edit the file `src/setup.h` as follows:
65
66
- enter your wifi and mqtt settings
66
-
- select your RX TX GPIO pins connected to the X10A port. *The ESP32 has 3 serial ports. The first one, Serial0 is reserved for ESP<-USB->PC communication and ESP Altherma uses the Serial0 for logging (as any other project would do). So if you open the serial monitor on your PC, you'll see some debug from ESPAltherma. ESP32 can map any GPIO to the serial ports. Do NOT use the main Serial0 GPIOs RX0/TX0.*
67
+
- select your RX TX GPIO pins connected to the X10A port. *The ESP32 has 3 serial ports. The first one, Serial0 is reserved for ESP<-USB->PC communication and ESP Altherma uses the Serial0 for logging (as any other project would do). So if you open the serial monitor on your PC, you'll see some debug from ESPAltherma. ESP32 can map any GPIO to the serial ports. Do NOT use the main Serial0 GPIOs RX0/TX0.* * The ESP8266 only has 1.5 Serial ports so it uses a software based serial driver. You can choose any pins, but some will stop you from being able to use the console*
67
68
68
-
Try to stick to the RX2/TX2 of your board (probably GPIO16/GPIO17). **For M5StickC or M5StickCPlus, 26 and 36 will automatically be used if you selected the corresponding environment**.
69
+
For ESP32 try to stick to the RX2/TX2 of your board (probably GPIO16/GPIO17). **For M5StickC or M5StickCPlus, 26 and 36 will automatically be used if you selected the corresponding environment**. For ESP8266 pins 4 & 5 (D2 & D1 on the NodeMCUv2) are known to work well.
69
70
70
71
- uncomment the `#include` line corresponding to your heat pump. E.g.
71
72
@@ -91,11 +92,11 @@ For **M5StickCPlus** select **env:M5StickCPlus**
91
92
```
92
93
93
94
4. Now open and edit the file you just uncommented, e.g. `include/def/ALTHERMA(HYBRID).h` (or the one under the language chosen) as follow:
94
-
Uncomment each line of the values you are interested in. *Try not to get everything as it will turn into a very big mqtt message*
95
+
Uncomment each line of the values you are interested in. *Try not to get everything as it will turn into a very big mqtt message*.
95
96
96
97
```c++
97
98
...
98
-
LabelDef PROGMEM labelDefs[] = {
99
+
LabelDef labelDefs[] = {
99
100
// {0x00,0,801,0,-1,"*Refrigerant type"},
100
101
{0x60,0,304,1,-1,"Data Enable/Disable"}, //<-- This value will be queried and reported
101
102
// {0x60,1,152,1,-1,"Indoor Unit Address"},
@@ -109,26 +110,22 @@ For **M5StickCPlus** select **env:M5StickCPlus**
109
110
110
111
A wiki page is available [here](https://github.com/raomin/ESPAltherma/wiki/Information-about-Values) where everyone can comment on the values and their definition.
111
112
112
-
5. You're ready to go! Connect your ESP32 and click -> Upload! Or run on the command line:
113
-
114
-
```bash
115
-
$ pio run --environment <your environment> --target upload
116
-
````
113
+
5. You're ready to go! Connect your ESP32/ESP8266 and click -> Upload! Or press `F1` and select -> `PlatformIO: Upload`
117
114
118
115
## Step 2: Connecting to the Heat pump
119
116
120
117
1. Turn OFF your heat pump at the circuit breaker.
121
118
2. Unscrew your pannel to access the main PCB of your unit.
122
-
3. Localize the X10A connector on your the PCB. This is the serial port on the main PCB.
123
-
4. Using the 5 pin connector or4 Dupont wires, connect the ESP32 as follow. Pay attention to the orientation of the socket.
119
+
3. Localize the X10A connector on your the PCB. This is the serial port on the main PCB. If your installation include a bi-zone module, the X10A port is occupied with a connector to the Bi-Zone module. You should then connect to the X12A port on the bi-zone module. Pins are identical to the X10A.
120
+
4. Using the 5 pin connector or4 Dupont wires, connect the ESP as follow. Pay attention to the orientation of the socket.
124
121
125
122
### Daikin Altherma 4 pin X10A Connection
126
123
127
124

128
125
129
126
| X10A | ESP32 |
130
127
| ---- | ----- |
131
-
| 1-5V | 5V - VIN *Can supply voltage for the ESP32 :)* |
128
+
| 1-5V | 5V - VIN *Can supply voltage for the ESP :)* |
132
129
| 2-TX | `RX_PIN` *Default GPIO 16. Prefer RX2 of your board.* |
133
130
| 3-RX | `TX_PIN` *Default GPIO 17. Prefer TX2 of your board.* |
134
131
| 4-NC | Not connected |
@@ -142,7 +139,7 @@ Some heat pumps (ROTEX) have an X10A port which connects differently:
142
139
143
140

144
141
145
-
Some users reported that the 5V from their ROTEX was not enough to power their ESP32. In this case, use an USB charger to power the ESP32. The 5V from the X10A is then not needed. Whatever you do, **make sure you keep a wire connecting the GND of the ESP32 to the GND pin of the X10A (even if you power your ESP32 with a USB charger)!!**
142
+
Some users reported that the 5V from their ROTEX was not enough to power their ESP32/ESP8266. In this case, use an USB charger to power the ESP32/ESP8266. The 5V from the X10A is then not needed. Whatever you do, **make sure you keep a wire connecting the GND of the ESP32/ESP8266 to the GND pin of the X10A (even if you power your ESP32/ESP8266 with a USB charger)!!**
146
143
147
144
148
145
5. Cross check twice the connections and turn on your heat pump. Two new entities AlthermaSensor and AlthermaSwitch should appear in Home Assistant. AlthermaSensor holds the values as attributes.
@@ -205,18 +202,33 @@ Note: Smart Grid needs to be switched ON in the heatpump configuration menu, oth
205
202
206
203
# Troubleshooting
207
204
208
-
## Specific issues
205
+
## Specific issues with M5
209
206
210
207
- If, when using an M5StickC (or M5Stack), the ESP32 is unresponsive, upload fails etc. Make sure that you change the  environment to  on the status bar. Otherwise the default serial port in setup.h conflicts with the PSRAM of M5.
211
208
212
209
## Generic issues
213
210
214
211
Possible generic issues could be: improper wifi signal, unsupported protocol, unsupported GPIOs for Serial (stick to default RX2/TX2).
215
212
216
-
ESPAltherma generates logs on the main serial port (USB). Connect to the ESP32 and open the serial monitor on Platformio.
213
+
ESPAltherma generates logs on the main serial port (USB) and on the screen of the M5. Connect to the ESP32 and open the serial monitor on Platformio.
217
214
218
215
ESPAltherma also generates logs on MQTT. If Wifi and MQTT is not the issue, look at the logs on the topic `espaltherma/log`. You can see them on Home Assistant through Configuration -> Integration -> MQTT -> Config -> Listen to a topic.
219
216
217
+
## Logs show 'Timeout on register' with value 0x15 0xea or 'Error 0x15 0xEA returned from HP'
218
+
219
+
`0x15 0xea` is the reply from the heatpump to say it does not understand the protocol.
220
+
If you have an older Altherma heat pump (around 2010 or before) it is probably using the older S protocol.
221
+
To activate it, at the end of `setup.h` change `#define PROTOCOL 'I'` to `#define PROTOCOL 'S'`
222
+
Also select the `def/PROTOCOL_S_ROTEX.h` or `def/PROTOCOL_S.h` definition file.
223
+
224
+
## Logs show 'Time out! Check connection' 'Wrong CRC on registry...'
225
+
226
+
This means that the communication is wrong. Usual suspects:
227
+
228
+
1. Un-conected GND: whatever you do, the GND of the ESP should always be connected to the GND of the Altherma. So, if you power your ESP with a USB charger (or your computer), make sure you also connect the GND from the ESP to your GND of the Altherma.
229
+
2. If not GND, then it's alway the Dupont cable. A faulty dupont cable is a VERY COMMON cause of issue. You can have a perfectly looking cable, they are not the best to do connection on the X10A connector (although much more common than an EH JST 5pin). So, change your cable. You can also use a common 2.54 female long header, plug it to the X10A connector and then your dupont cable to the long pins of the header.
230
+

231
+
220
232
## Note on voltage
221
233
222
234
The serial port of X10A is TTL 5V, where the ESP32 is 3.3V. Your ESP32 might not be 5V tolerant. If you want to play it safe, you should use a level shifter to convert Daikin TX - RX ESP line from 5V to 3.3V.
@@ -319,13 +331,13 @@ When put in terms of ESPAltherma variables, the COP can be define as a sensor li
319
331
320
332
Not directly. It might be possible to change registry values using the serial port but I'm not aware of this. If you know, comment on [the dedicated issue](/../../issues/1).
321
333
322
-
However, ESPAltherma, supports an extra GPIO to control a relay that you can plug as *external OnOff thermostat*. See [**Controling your Daikin Altherma heat pump**](#controling-your-daikin-altherma-heat-pump).
334
+
However, ESPAltherma, supports an extra GPIO to control a relay that you can plug as *external On/Off thermostat*. See [**Controling your Daikin Altherma heat pump**](#controling-your-daikin-altherma-heat-pump).
323
335
324
336
If you want to configure your heat pump using an arduino, you can interact with the P1P2 serial protocol (the one of the digital thermostats) using the [nice work on P1P2Serial](https://github.com/Arnold-n/P1P2Serial) of Arnold Niessen.
325
337
326
338
## Where can I get more info on the protocol used?
327
339
328
-
It took quite some time to reverse engineering the protocol. If you're interested, I documented my findings [here](doc/Daikin%20I%20Protocol.md).
340
+
It took quite some time to reverse engineer the protocol. If you're interested, I documented my findings [here](doc/Daikin%20I%20protocol.md).
329
341
330
342
## Is it safe? Can I break my machine?
331
343
@@ -389,8 +401,13 @@ You can also [sponsor this project](https://github.com/sponsors/raomin/) (ie reg
0 commit comments