Configured my ESPHome with MCP2515 CAN-Bus for Stiebel Eltron heating pump

I dont checked the Code you use but If you are not only read the communifation of other Bus devices you request some values.
So reduce that poll rate. Or reduce the amount of values you request.
I get similar Problems if I read to much in too short time frame.

Hi Oggy512,

I had a similar issue. In my case, the WPC04 heat pump stopped running the compressor and heating the domestic water and floor.

I thought there was a problem with the ESP32 and the code itself, so I bought an ISG Gateway (however, the cost is ridiculous considering most appliances of this type have this interface built-in). To my surprise, the ISG behavior was the same as the ESP32 and generated the same problem.

Luckily, together with a guy from service (a clever guy), we figured it out. The service guy sent me another ISG to eliminate a hardware problem with the first device. In the end, it was a problem with the control board in the heat pump. The board was replaced, and after that, there have been no issues.

I didn’t check the ESP32 after the board replacement as I have the ISG (which I assume has the same functionality), but I can run the ESP32 for testing purposes. Who knows, maybe the ESP32 reads more device parameters.

Thanks for the Update. In the meantime I got the THZ controller working. I forked the project and adapted some config, here is my (working) version:

Hi!
I have a LWZ 8 CS - will this also work? I purchased an ESP with integrated can bus (ESP32-S3-RS485-CAN) …
I found an old library but the signals won’t match wit the new heatpump (most of it). I only get the current warmwater temp and some other temperatures but other than that only errors …

In general if you already got valid values it looks good.
Now you have to find the right can IDs for your heat pumpnof all parameters you are interested in.

1 Like

Hi!
Thanks for the fast reply!
I am happy to invest my time and i already tried for a few hours but i have no clue at all on how to log it. Do i need to log the whole bus and change one thing at a time to hopefully get a value change i can characterize? I have no idea hot to find the can id’s as well. i have the heatpump (maybe multiple id’s) for now still the ISG and a room controller that also has a unique id. For now i use this: GitHub - bullitt186/ha-stiebel-control: An ESPhome / Home Assistant configuration to monitor & configure Stiebel Eltron Heating Pumps via a CAN Interface
I think your project supports newer heat pumps so I think i will give it a shot.

Changing values and listening on the bus for that changes is a way you can go.
But you have to understand how the packages are encoded.
In ealier posts in this thread you will find projects/exaples that help here.

It looks like the project you use bruteforce the bus with all know ids like the isg.
ā€œFeatures automatic MQTT discovery for 3800+ signalsā€
So in theorie it could run out of the box for you.
But its not my project.
And it uses the same ID the ISG use 0x680.
So maybe you start disconnecting the ISG while using this project or try other IDs. For me 0x6a2 is working for exaple.
Than you could have the ISG connected too.
But be warned to much traffic on the bus can get you errors like non funtional Display.

You may also have a look at this project

his heat pump looks like beeing closer to yours like the one in bullits project.
Maybe if you need more infos or you not getting his project running.
If I remember right he also got the emulation of the room controller running.

1 Like

Goddamned.
Everything was running decently for 1,5 years and then I just had to update ESPHome stuff and after that pretty much nothing works. I get only compressor starts and COP values, nothing else.

I gave the yaml, that is roberreiter’s base translated + some additions and cleaning a glance and noticed I’ve forgot everything about how this mess was supposed to work.
Compiler gave few errors and not sure how those parts ever worked, as they were so clear syntax errors, like in compressor starts there were id() method call issues like (id(VD_starts_t>0). Fixed those but that didn’t help.

I am getting some CAN error, yet those COP and start vales seem to work, but like said nothing else is.
E: Ok those values that I cat might be calculated from some buffered values and maybe the whole CAN is now broken. I noticed a mention not to use GPIO15 so I switched my CS to GPIO17 but didn’t help. Also tried setting SPI speed to match my CAN module (8Mhz) but no go. Any ideas what else has changed in ESPHome CAN interface since 2024?
Could it just be that something in FW ruined the combo of my specific ESP32 model and MCP25215? I tried playing with different bit rates too (20, 50, 125, 500 kbps).

Did someone go through this already and could point me what to search for as apparently something in ESPHome or its CAN implementation has changed.

[20:34:45.913][C][template.sensor:456]:   Update Interval: 60.0s
[20:34:45.925][C][template.sensor:016]: Template Sensor 'Aux heater for heating total"'
[20:34:45.925][C][template.sensor:016]:   State Class: 'total_increasing'
[20:34:45.925][C][template.sensor:016]:   Unit of Measurement: 'kWh'
[20:34:45.925][C][template.sensor:016]:   Accuracy Decimals: 3
[20:34:45.925][C][template.sensor:026]:   Device Class: 'energy'
[20:34:45.949][C][template.sensor:030]:   Icon: 'mdi:water-boiler'
[20:34:45.949][C][template.sensor:456]:   Update Interval: 60.0s
[20:34:45.949][C][canbus:020]: config standard id=0x680
[20:34:45.995][E][component:226]:   canbus is marked FAILED: unspecified
[20:34:46.470][C][template.binary_sensor:016]: Template Binary Sensor 'update_sensor'
[20:34:46.480][C][restart.button:014]: Restart Button 'Stiebel ESP restart'
[20:34:46.485][C][restart.button:017]:   Icon: 'mdi:restart'
[20:34:46.519][C][captive_portal:128]: Captive Portal:
[20:34:46.582][C][wifi:1304]: WiFi:

set the data_rate under canbus:

canbus:
  - id: ...
    platform: mcp2515
...
    data_rate: 2MHZ

you can try 1MHZ, 2MHZ, 4MHZ. With 8MHZ it will probably not work.

1 Like

Thanks. I don’t think I tried below 8MHz which is what my module crystal says and while I didn’t have data_rate specified earlier, I thought also earlier ESPhome versions defaulted to 8MHz but maybe you know better? Couldn’t find default rate from docs.

Anyway I only started playing with this value due to it not working so maybe the default value got changed.

I cannot thank you enough! It was just plug and play! :slight_smile:

Right, I was mixing clock and data_rate. Lib docs says clock defaults to 8Mhz but no default value mentioned for data_rate, neither in online manual.

Anyway works fine setting data_rate to 2MHz at least.

Many thanks you little red thing!

Hello everyone,

First of all, a big thank you to everyone who contributes to this thread and to the creators for their excellent groundwork.

I have a WPF10 from 2009 with a WPMiw (WPMii).

Since 2017, I have successfully read the WPF data using a PiCAN2 and a Raspberry Pi and integrated it into FHEM.

Unfortunately, a recent power outage destroyed the PiCAN.

In 2017, a ā€œcomplete CANscanā€ and Jürg’s help helped me find my correct Elster-table.

I’m currently working on integrating the heat pump into Home Assistant using a ā€œWaveshare ESP32-S3-RS485-CANā€.

I’m currently testing the following ESPhome repository:
https://github.com/bullitt186/ha-stiebel-control

My WPF 10 supports the following CAN IDs:
180 = Kessel
301 = Heizkreis 1
302 = Heizkreis 2
480 = Manager
601 = Mischermodul 1
602 = Mischermodul 2

I don’t have HEIZMODUL` (0x500): Heat pump module.

I started with the WPL13 template form the Repo.
After starting the ESP32, I receive some usable and correct values.

It seems that the CAN bus enters an error state (Error 2) after a short time.

Presumably, this is because I’m still querying CAN members via the WPL13 template that don’t even exist in my WPF10. (ā€œHEIZMODULā€(0x500): Heat pump module)

Now I’d like to avoid all unnecessary queries and then gradually integrate the necessary signals.

I have a few questions about this:

1.) Are only the signals that are defined in the ā€œheatingpump.yamlā€ under

sensors: !include ha-stiebel-control/wpl13eOrWhatever.yaml

are queried?

2.) Or are the signals from ā€œha-stiebel-control/signal_requests_wpl13e.hā€ are queried?

Right now, I think the WPL13.yaml file is only responsible for the HA sensors, and the signals_request.h file defines the queries. Is that correct?

I would be grateful for any advice.

Hi,

I am at moment searching my solution:

i cleaned the ā€œha-stiebel-control/signal_requests_wpl13e.hā€ to avoid all unnecessary queries, as in point 2.) from previous post descript.

I added REC and TEC sensor in common.yaml:

  - platform: template
    name: "CAN Bus TEC"
    id: can_tec
    icon: mdi:upload-network
    unit_of_measurement: "Errors"
    accuracy_decimals: 0
    update_interval: 1s
    lambda: |-
      // Holt den Status des TWAI Controllers
      twai_status_info_t status;
      twai_get_status_info(&status);
      return (float)status.tx_error_counter;

  - platform: template
    name: "CAN Bus REC"
    id: can_rec
    icon: mdi:download-network
    unit_of_measurement: "Errors"
    accuracy_decimals: 0
    update_interval: 1s
    lambda: |-
      // Holt den Status des TWAI Controllers
      twai_status_info_t status;
      twai_get_status_info(&status);
      return (float)status.rx_error_counter;

Everything works good, until the follwowing (BUSKONFIGURATION) messages arriving:

[23:41:32.500][I][readSignal():452]: READ "RUECKLAUFISTTEMP" (0x0016) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 16, 00, 00, 00, 00
[23:41:32.536][I][processCanMessage():415]: KESSEL (0x180):	RUECKLAUFISTTEMP:	38.6	(et_dec_val)
[23:41:47.535][I][readSignal():452]: READ "SPEICHERSOLLTEMP" (0x0003) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 03, 00, 00, 00, 00
[23:41:48.539][I][readSignal():452]: READ "AUSSENTEMP" (0x000c) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 0c, 00, 00, 00, 00
[23:41:51.604][I][processCanMessage():415]: MANAGER (0x480):	BUSKONFIGURATION:	2304	(et_default)
[23:41:51.646][I][processCanMessage():415]: KESSEL (0x180):	BUSKONFIGURATION:	2304	(et_default)
[23:41:51.646][I][processCanMessage():415]: MISCHERMODUL_2 (0x601):	BUSKONFIGURATION:	2304	(et_default)
[23:41:51.654][I][processCanMessage():415]: BEDIENMODUL_2 (0x301):	BUSKONFIGURATION:	2048	(et_default)
[23:41:51.700][I][processCanMessage():415]: PC (0x680):	BUSKONFIGURATION:	2048	(et_default)
[23:41:51.700][I][processCanMessage():415]: MISCHERMODUL_3 (0x602):	BUSKONFIGURATION:	2304	(et_default)
[23:41:51.723][I][processCanMessage():415]: BEDIENMODUL_3 (0x302):	BUSKONFIGURATION:	2048	(et_default)
[23:41:55.228][I][processCanMessage():415]: MANAGER (0x480):	BUSKONFIGURATION:	2304	(et_default)
[23:41:55.251][I][processCanMessage():415]: KESSEL (0x180):	BUSKONFIGURATION:	2304	(et_default)
[23:41:55.275][I][processCanMessage():415]: MISCHERMODUL_2 (0x601):	BUSKONFIGURATION:	2304	(et_default)
[23:41:55.299][I][processCanMessage():415]: BEDIENMODUL_2 (0x301):	BUSKONFIGURATION:	2048	(et_default)
[23:41:55.323][I][processCanMessage():415]: PC (0x680):	BUSKONFIGURATION:	2048	(et_default)
[23:41:55.347][I][processCanMessage():415]: MISCHERMODUL_3 (0x602):	BUSKONFIGURATION:	2304	(et_default)
[23:41:55.394][I][processCanMessage():415]: BEDIENMODUL_3 (0x302):	BUSKONFIGURATION:	2048	(et_default)
[23:41:58.560][I][readSignal():452]: READ "MINUTE" (0x0126) FROM MANAGER (0x480 {0x91, 0x00}): 91, 00, fa, 01, 26, 00, 00
[23:42:02.574][I][readSignal():452]: READ "SPEICHERISTTEMP" (0x000e) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 0e, 00, 00, 00, 00
[23:42:04.578][I][readSignal():452]: READ "RUECKLAUFISTTEMP" (0x0016) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 16, 00, 00, 00, 00
[23:42:04.606][I][processCanMessage():415]: KESSEL (0x180):	RUECKLAUFISTTEMP:	38.5	(et_dec_val)
[23:42:05.151][I][processCanMessage():415]: MISCHERMODUL_3 (0x602):	INITIALISIERUNG:	1	(et_little_endian)
[23:42:05.176][I][processCanMessage():415]: KESSEL (0x180):	INITIALISIERUNG:	1	(et_little_endian)
[23:42:05.200][I][processCanMessage():415]: MANAGER (0x480):	INITIALISIERUNG:	1	(et_little_endian)

When this BUSKONFIGURATION arrives, the REC and TEC errors rising:

So it seems i have to look after the Blacklist…
Anyboby having or had similar problems?

I am receiving these messages even though the ā€œisBlacklistedā€ flag is set to true in Elster.h.:

[00:23:38.473][I][readSignal():452]: READ "AUSSENTEMP" (0x000c) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 0c, 00, 00, 00, 00
[00:23:41.624][I][processCanMessage():415]: MANAGER (0x480):	BUSKONFIGURATION:	2304	(et_default)
[00:23:41.633][I][processCanMessage():415]: KESSEL (0x180):	BUSKONFIGURATION:	2304	(et_default)
[00:23:41.665][I][processCanMessage():415]: MISCHERMODUL_2 (0x601):	BUSKONFIGURATION:	2304	(et_default)
[00:23:41.680][I][processCanMessage():415]: BEDIENMODUL_2 (0x301):	BUSKONFIGURATION:	2048	(et_default)
[00:23:41.709][I][processCanMessage():415]: PC (0x680):	BUSKONFIGURATION:	2048	(et_default)
[00:23:41.732][I][processCanMessage():415]: MISCHERMODUL_3 (0x602):	BUSKONFIGURATION:	2304	(et_default)
[00:23:41.755][I][processCanMessage():415]: BEDIENMODUL_3 (0x302):	BUSKONFIGURATION:	2048	(et_default)
[00:23:45.214][I][processCanMessage():415]: MANAGER (0x480):	BUSKONFIGURATION:	2304	(et_default)
[00:23:45.237][I][processCanMessage():415]: KESSEL (0x180):	BUSKONFIGURATION:	2304	(et_default)
[00:23:45.260][I][processCanMessage():415]: MISCHERMODUL_2 (0x601):	BUSKONFIGURATION:	2304	(et_default)
[00:23:45.283][I][processCanMessage():415]: BEDIENMODUL_2 (0x301):	BUSKONFIGURATION:	2048	(et_default)
[00:23:45.306][I][processCanMessage():415]: PC (0x680):	BUSKONFIGURATION:	2048	(et_default)
[00:23:45.329][I][processCanMessage():415]: MISCHERMODUL_3 (0x602):	BUSKONFIGURATION:	2304	(et_default)
[00:23:45.351][I][processCanMessage():415]: BEDIENMODUL_3 (0x302):	BUSKONFIGURATION:	2048	(et_default)

the Elster.h:

  { "BUSKONFIGURATION"                            , 0x00fd, 0               ,                                                             NULL,            NULL,          NULL,  NULL,               NULL,                    NULL, NULL, NULL,  true, false },
  { "INITIALISIERUNG"                             , 0x00fe, et_little_endian,                                                             NULL,            NULL,          NULL,  NULL,               NULL,                    NULL, NULL, NULL,  true, false },

Ahoi :slight_smile:

There have been significant updates to the codebase, not only fixing critical bugs, but also introducing the community dashboard that allows anyone, who is willing to share their data anonymously, to compare their values against the community:

Additionally support for THZ 304 has been added and we are close to merging the PRs that add WPL 17 and WPL 23

1 Like

I moved on ESP32-S3 and now I’m getting:

[07:19:38.544][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:39.547][I][readSignal():452]: READ "RUECKLAUFISTTEMP" (0x0016) FROM MANAGER (0x480 {0x91, 0x00}): 91, 00, 16, 00, 00, 00, 00
[07:19:39.547][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:42.549][I][readSignal():452]: READ "EINSTELL_SPEICHERSOLLTEMP" (0x0013) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 13, 00, 00, 00, 00
[07:19:42.551][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:43.550][I][readSignal():452]: READ "EINSTELL_SPEICHERSOLLTEMP2" (0x0a06) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, fa, 0a, 06, 00, 00
[07:19:43.555][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:45.166][I][safe_mode:071]: Boot seems successful; resetting boot loop counter
[07:19:45.560][I][readSignal():452]: READ "KESSELSOLLTEMP" (0x0002) FROM KESSEL (0x180 {0x31, 0x00}): 31, 00, 02, 00, 00, 00, 00
[07:19:45.563][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:46.495][I][readSignal():452]: READ "WW_ECO" (0x027e) FROM MANAGER (0x480 {0x91, 0x00}): 91, 00, fa, 02, 7e, 00, 00
[07:19:46.497][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:46.564][I][readSignal():452]: READ "MONAT" (0x0123) FROM MANAGER (0x480 {0x91, 0x00}): 91, 00, fa, 01, 23, 00, 00
[07:19:46.567][W][canbus:053]: send to standard id=0x680 failed with error 2!
[07:19:46.620][I][readSignal():452]: READ "SOMMERBETRIEB" (0xfdb4) FROM MANAGER (0x480 {0x91, 0x00}): 91, 00, fa, fd, b4, 00, 00
[07:19:46.625][W][canbus:053]: send to standard id=0x680 failed with error 2!

Do you have the resistors in place? I can see with my scope that there is messaging, but error 2!

Who else has struggled with the fact that communication stops working after a while or after about a day?

in this post roberreiter told 2022 from similar problems:

das Problem, dass nach einigen Tagen die Daten nicht aktualisiert werden. dH es sind immer die letztgültigen Temperaturen, Verbrauchswerte etc. gültig und ändern sich nicht mehr in Homeassistant. Es werden zwar lt. Log-Screen im ESP-Device CAN-Pakete abgesetzt, aber es fehlt der Hinweistext dass eine Antwort zurück kommt. Ich spiele dann die Firmware neu ein, danach gehts wieder. Obs auch ein simpler Reset tut weiß ich noch nicht - schätze aber ja.

Stiebel-Eltron mit CAN-Bus unter Verwendung eines C+±Wrappers - Seite 11

@roberreiter how does you resolved this problem?

Hi Daniel, i am owning a WPF10.
Could you help my to run your project? I have all possible Elster adresses.

@Korre I had previously random disconnects without a reason. Now I can’t get my connection working at all. See the post above your message.