Daikin Altherma heat pump monitoring

Hello,

I recently bought a Daikin Altherma 3 and was quite eager to integrate it in Home Assistant.
Until now, the only option for my heat pump was the LAN adapter, but it’s rather expensive and I don’t have LAN there.
So I developed ESPAltherma: a DIY solution to monitor (and control) a Daikin Altherma heat pump with an ESP32 and integrated with Home Assistant over MQTT.

Have a look!

9 Likes

Nice project! I have Altherma 3 also. I tried to connect it, but don’t get any communcation with def/DEFAULT.h option. Which one I should uncomment for EHBX08DA9W?

edit: did another reboot and here comes the data with default.h option :slight_smile: Do you know where I can find the water pressure, water flow rate and leaving water temperature data? I’m interested in powerful heating mode switch for DHW also, can it be done?

Hi! Glad you find ESPAltherma useful!

Use this one ALTHERMA(LT_DA_04-08KW).h
You’ll sfind all the values you want in there. Leaving water temperature is LWT.

Tell me if you have any problem. You can also open an issue on Github.

Take care.
Raomin

1 Like

Thanks! All sensors working great now! How’s your ESP32 wifi signal inside the heat pump? It seems like a Faraday cage to me. :slight_smile:

To be honest, I still haven’t closed the front panel… When I do, I’ll probably only close with the black panel and not the metallic plate. I have the wifi AP very close, so I have some hope…
Your connection seems very unstable on you screenshot, was it because of the Faraday effect or just you tweaking the values?
BTW, I just merged a PR that fixed some potential communication issues. Remember to update your firmware often (OTA is supported).

Also, remember to show your setup here :slight_smile: https://github.com/raomin/ESPAltherma/issues/17

I got it to work few hours ago. My OTA gives Error 1 with ESPAltherma.local. Tried ip addres also with same result.

[platformio]
default_envs = espwroom32

[env:espwroom32]
platform = espressif32
board = esp32dev
framework = arduino
; monitor_speed = 115200
; upload_speed = 215200
; Uncomment this line to allow for remote upgrade. If name resolution does not work for you, replace with the IP of ESPAltherma
upload_port = 192.168.10.192 ;ESPAltherma.local

Will show when ready, my esp32 just hanging on 4 wires. :slight_smile:

Is it answering to pings?
Can you show the upload logs?

Yes, it pings fine.

This looks like you have a local firewall blocking the inbound connection from esp.
Try disabling your FW for inbound connections.

Yep, thanks! FW was already disabled but when I opened host port the OTA update was successful.

All working great now! I think we can route the wires out from the cage and put the ESP32 behind the screen/black plastic cover. Couple of pictures also:

2 Likes

WOW!! This is just the integration I was looking for a while ago…almost forgot about it when I stumbled on this topic. Sadly I’m not a wizard in this area, some help is needed. (I used only NodeMCU before icm with HA ESPHome)

I’m at the step that I altered the configuration and want to upload to the first time via USB.
The thing is that I only have a NodeMCU laying around. I believe this could be an issue as the platform is ESP8266. Is this correct? Will it not work with a NodeMCU?

I tried to change the platformio.ini

[env:esp32]
platform = espressif8266
board = nodemcuv2
framework = arduino
monitor_speed = 115200
upload_speed = 215200
upload_port = COM1
; Uncomment this line to allow for remote upgrade. If name resolution does not work for you, replace with the IP of ESPAltherma
; upload_port = ESPAltherma.local

Sadly, it fails:

Processing esp32 (platform: espressif8266; board: nodemcuv2; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Tool Manager: Installing platformio/framework-arduinoespressif8266 @ ~3.20704.0
Unpacking  [####################################]  100%
Tool Manager: framework-arduinoespressif8266 @ 3.20704.0 has been installed!
Tool Manager: Installing platformio/tool-mkspiffs @ ~1.200.0
Tool Manager: tool-mkspiffs @ 1.200.0 has been installed!
Tool Manager: Installing platformio/tool-mklittlefs @ ~1.203.0
Tool Manager: tool-mklittlefs @ 1.203.210203 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (2.6.3) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.20704.0 (2.7.4)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - tool-mklittlefs 1.203.210203 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.40802.200502 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 30 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <PubSubClient> 2.8.0
|-- <ArduinoOTA> 1.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266mDNS> 1.2
|   |   |-- <ESP8266WiFi> 1.0
|-- <EEPROM> 1.0
Building in release mode
Compiling .pio\build\esp32\src\main.cpp.o
Generating LD script .pio\build\esp32\ld\local.eagle.app.v6.common.ld
Compiling .pio\build\esp32\lib1e8\PubSubClient\PubSubClient.cpp.o
Compiling .pio\build\esp32\libf61\ESP8266WiFi\BearSSLHelpers.cpp.o
Compiling .pio\build\esp32\libf61\ESP8266WiFi\CertStoreBearSSL.cpp.o
src\main.cpp:10:18: fatal error: WiFi.h: No such file or directory

**************************************************************
* Looking for WiFi.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:WiFi.h"
* Web  > https://platformio.org/lib/search?query=header:WiFi.h
*
**************************************************************

 #include <WiFi.h>
                  ^
compilation terminated.
*** [.pio\build\esp32\src\main.cpp.o] Error 1
.pio\libdeps\esp32\PubSubClient\src\PubSubClient.cpp: In member function 'boolean PubSubClient::publish_P(const char*, const uint8_t*, unsigned int, boolean)':
.pio\libdeps\esp32\PubSubClient\src\PubSubClient.cpp:523:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     return (rc == expectedLength);
                   ^
=================================================================================================== [FAILED] Took 76.65 seconds ===================================================================================================

Environment    Status    Duration
-------------  --------  ------------
esp32          FAILED    00:01:16.650
============================================================================================== 1 failed, 0 succeeded in 00:01:16.650 ==============================================================================================

Is there anything that I can solve here, or is this a dead end?
Do I really need to purchase another (real ESP32) module?

Hi @Frank_R!
ESPAltherma requires an Esp32 because it takes advantage of the dual serial port. So yes, you’ll need to order an Esp32 to run ESPAltherma.
You can read a bit more about this here https://github.com/raomin/ESPAltherma/issues/14
You can get any esp32, but know that m5stickc’s screen is natively supported.

Thank a lot for your prompt reply, that save me a lot of troubleshooting time :slight_smile: trying to push this into my NodeMCU.

I will order something with ESP32 and try again!
Again, a lot of thanks for creating and support this!

Awesome! I have been thinking for some time how I could control the heat pump, until now I can only control the thermostats in each room that only open and close water valves (several Shellys 2.5). I have a Daikin Altherma R-410, I guess it will work, am I right? I will try soon and I will tell you the results here.

Thanks a lot.

I borrowed an ESP32 from a friend and managed to upload the ESPAltherma to it.
Upload was successful.

It’s also detected by MQTT
1614543585: New client connected from 192.168.2.82 as ESPAltherma-dev (p2, c1, k15, u’mqtt-username’).
Sadly the althermasensors remain unknown, no attributes are present.

After listening to the MQTT topics is see this behavior for every value polled.

Message 1479 received on espaltherma/log at 9:48 PM:
Querying register 0x10...
- 
Message 1480 received on espaltherma/log at 9:48 PM:
ERR: Time out on register 0x10! got 4/16 bytes
-
Message 1481 received on espaltherma/log at 9:48 PM:
0x03 0x40 0x10 0xac
-
Message 1482 received on espaltherma/log at 9:48 PM:
Retrying...
- 
Message 1483 received on espaltherma/log at 9:48 PM:
<empty message>
-

and so on with next register…

Has this something to do with model selection?
#include "def/ALTHERMA(LT_CA_CB_11-16KW).h"

Any idea what can go wrong here?

Additional info, I could not power my ESP directly form the X10 port (device would not start) so I use separate USB power now. Only pin16/17 are connected to X10

Hi @Frank_R. You should connect the grounds: the one of the ESP with the one of your heatpump.

Now it also weird that you get the right first 4 bytes.
Try to first connect the grounds and if it still does not work you can also try to double the timeout in include/comm.h

#define SER_TIMEOUT 600

Quickly connected the ground wire and now it’s seem to be working :slight_smile: :slight_smile:
This evening I have some more time to verify/select all usable values and follow-up on the HA config.

Incredible how you figured this out :slight_smile:

Is it normal the status of the sensor remains “unknown”?
Values are updated.

Nice, nice, nice :slight_smile:
More values are coming in!!

For the voltage(n) phase I needed the “special” address of:
1 0x21,2,101,2 Voltage (N-phase) (V)
That retrieves 60 (the normal address is always 0)

I’m trying to calculate the COP using your example and all values are live now, but the result is 45?
That doesn’t seem right? Or is it?
I expect a value between 2 or 3.

Hey @Frank_R, glad you got it working!

Common grounds are needed when you interconnect 2 different devices. Only if they have same 0 volts can they get proper HIGH value.

Your Voltage is clearly wrong, it should not be 60. There might simply not be a voltage sensor in yours.

Just replace it in the formula with the voltage in your country, something like 230 and you should get a more reasonable Cop!

For the main AlthermaSensors status it is normal to return “Unknown” when everything is OK. I’ll probably update the code to report something like “Connected”

Anyway, glad your got it working! Put some picts of your setup in the community post!


If this project brings value to you, please consider supporting it. I don’t do this for money but it feels good to get some support! Thanks :slight_smile: