As I have mentioned a couple of times the canbus tranciever you got is the wrong component. You need one RS232/TTL module (e.g. https://de.aliexpress.com/item/1005003782115714.html), and then a second one if you want to also connect the confosense panel eventually.
The final structure is like this:
ComfoAir (Green Plug) <—> RS232/TTL <—> ESP32 ↔ TTL/RS232 ↔ (GreenCable) ComfoSense
I’m using a Zehnder WHR960 Basic unit and I’m wondering if I can use this integration to control my unit. I read some older messages that the basic versions can’t be controlled via the RJ45/RS232 interface? Please find below some pictures of my PCB with the RJ45 / RS232 interface.
I am more or less completly new to the HA topic but got most of my desired things up and running. The integration of my ComfoAir 350 is also already running via RS232 and MQTT. Therefore thanks to @adorobis for this integration.
But sadly I have an issue with your lovelace card. After copying the files to my HA installation I could select the card from the costum ones. But I am not able to configure it. If I try I do not have the dropdown fields to select the correct entities, nor do I see the background image:
Im I open the “Code-Editor” view and enter entity: climate.ca350_climate as an additonal line I am at least able to see the background image and the set comfort temperature but not more.
Do you have any hint what I am doing wrong or what the root cause might be?
The editor does not look good in my system neither. Probably something has changed in one of the HA releases that would require some code update. Try to switch to yaml editor, here is my code example:
Hello, just got all the equipment from Aliexpress.
Can you please let me know if the wiring is ok and how to proxy the esp32 to use also the Comfosense at the same time like @julianpas said?
Many many thanks, I hope this image makes it more clear also for newbies like me
This diagram looks roughtly ok as long as you disconnect the ComfoSense completely it should work (modulo potentially swapped TX/RX).
To get the ComfoSense also working you will need to connect the comfosense to a second RS232-TTL board and wire it’s TX/RX to a separate pair of pins on the ESP board. You only need to pass-through the GND/12Vs to the Comfosense to power it (that is only connect pins 1/4 on the black half-circle of the original diagram you drew over). Then connect the TX/RX pair on the ComfoSense to another RS232 board and it connects to two pins on the ESP32. You could use pretty much any pair of pins that has no special use like 25/26 or 32/33 etc just make sure you put them in the yaml file in the second UART definition too. The communication will be happening through the ESP32.
I hope this is somewhat clearer. If you are not getting commands through even though the ComfoSense is powered then check for swapped RX/TX or wrong pins in the YAML file. Also check the EspHome logs they can show you if comms are not working well. There are a lot of very poor quality RS232 boards out there.
Alright me here again. All the components have arrived and are now assembled as per instructions.
Can you point out to the how to to program the esp now?
I’ve read a lot in the past weeks but now I’m a little confused as there are several alternatives out there. Thank you for your help!
The easiest for the first time with a new ESP board is to plug it to a USB port on your computer and use the ESPHome plugin or a standalone ESPHome docker container to write the firmware to it. There are only two files you need to have comfoair.yaml and comfoair.h and they need to be in the same location. The file editor of the plugin will not let you edit or store the h file so you need to put it there in some other way ssh, the file editor plugin etc. Once you got the files you should be able to install the firmware from the ESPHome ui.
@julianpas programmed and linked to the COMFOAIR by exluding the Comfo conncet physical interface. I see the sensors but looks like tehy are not connected although they are correctly connected to the wifi:
Sorry I am not familiar with the MQTT version of the firmware. If you take a look at my GitHub repo you can find a version that integrates directly with Home Assistant without going through a MQTT broker.
Either way you should be able to see the logs from the ESPHome interface for that device there is the “logs” button the that as long as the device is on the wifi network should work.
@julianpas thanks for answering, I went through your repo and programmed my esp32.
Discovered vie esphome in HA but always getting “not available status” (wifi is connected) or “off” status for the several entities when swapping tx with rx which is my doubt.
The connection I made are: from the Comfoair TX to rs232 RX to ttl TX and to esp32 RX and viceversa.
Am I doing it correctly?
I’ve put apart the proxy part of the code just to test the esp32 alone without the comfosense just to understand why it is not working.
Sure thing, sorry for being late but many thanks for trying to figure it out!
Here you go:
[13:09:02][I][app:100]: ESPHome version 2024.6.6 compiled on Jul 14 2024, 12:22:39
[13:09:02][C][wifi:599]: WiFi:
[13:09:02][C][wifi:427]: Local MAC: 08:B6:1F:B8:17:60
[13:09:02][C][wifi:432]: SSID: ‘Charlie’
[13:09:02][C][wifi:435]: IP Address: 192.168.10.224
[13:09:02][C][wifi:439]: BSSID: BA:F0:3C:F8:A9:9E
[13:09:02][C][wifi:440]: Hostname: ‘comfoair180’
[13:09:02][C][wifi:442]: Signal strength: -43 dB ▂▄▆█
[13:09:02][C][wifi:446]: Channel: 9
[13:09:02][C][wifi:447]: Subnet: 255.255.255.0
[13:09:02][C][wifi:448]: Gateway: 192.168.10.1
[13:09:02][C][wifi:449]: DNS1: 192.168.10.1
[13:09:02][C][wifi:450]: DNS2: 0.0.0.0
[13:09:02][C][logger:185]: Logger:
[13:09:02][C][logger:186]: Level: DEBUG
[13:09:02][C][logger:188]: Log Baud Rate: 0
[13:09:02][C][logger:189]: Hardware UART: UART0
[13:09:02][C][uart.arduino_esp32:137]: UART Bus 0:
[13:09:02][C][uart.arduino_esp32:138]: TX Pin: GPIO1
[13:09:02][C][uart.arduino_esp32:139]: RX Pin: GPIO3
[13:09:02][C][uart.arduino_esp32:141]: RX Buffer Size: 256
[13:09:02][C][uart.arduino_esp32:143]: Baud Rate: 9600 baud
[13:09:02][C][uart.arduino_esp32:144]: Data Bits: 8
[13:09:02][C][uart.arduino_esp32:145]: Parity: NONE
[13:09:02][C][uart.arduino_esp32:146]: Stop bits: 1
[13:09:02][C][template.switch:068]: Template Switch ‘ComfoAir Bypass’
[13:09:02][C][template.switch:091]: Restore Mode: always OFF
[13:09:02][C][template.switch:057]: Optimistic: NO
[13:09:02][C][template.switch:068]: Template Switch ‘ComfoAir Preheater’
[13:09:02][C][template.switch:091]: Restore Mode: always OFF
[13:09:02][C][template.switch:057]: Optimistic: NO
[13:09:02][C][template.switch:068]: Template Switch ‘ComfoAir Ventilation Level 1’
[13:09:02][C][template.switch:091]: Restore Mode: always OFF
[13:09:02][C][template.switch:057]: Optimistic: NO
[13:09:02][C][template.switch:068]: Template Switch ‘ComfoAir Ventilation Level 2’
[13:09:02][C][template.switch:091]: Restore Mode: always OFF
[13:09:02][C][template.switch:057]: Optimistic: NO
[13:09:02][C][template.switch:068]: Template Switch ‘ComfoAir Ventilation Level 3’
[13:09:02][C][template.switch:091]: Restore Mode: always OFF
[13:09:02][C][template.switch:057]: Optimistic: NO
[13:09:02][C][template.switch:068]: Template Switch ‘ComfoAir Ventilation Level 4’
[13:09:02][C][template.switch:091]: Restore Mode: always OFF
[13:09:02][C][template.switch:057]: Optimistic: NO
[13:09:02][C][captive_portal:088]: Captive Portal:
[13:09:02][C][mdns:115]: mDNS:
[13:09:02][C][mdns:116]: Hostname: comfoair180
[13:09:02][C][esphome.ota:073]: Over-The-Air updates:
[13:09:02][C][esphome.ota:074]: Address: comfoair180.local:3232
[13:09:02][C][esphome.ota:075]: Version: 2
[13:09:02][C][esphome.ota:078]: Password configured
[13:09:02][C][safe_mode:018]: Safe Mode:
[13:09:02][C][safe_mode:020]: Boot considered successful after 60 seconds
[13:09:02][C][safe_mode:021]: Invoke after 10 boot attempts
[13:09:02][C][safe_mode:023]: Remain in safe mode for 300 seconds
[13:09:02][C][api:139]: API Server:
[13:09:02][C][api:140]: Address: comfoair180.local:6053
[13:09:02][C][api:142]: Using noise encryption: YES
When I try to action on the controls (ex. the bypass) seems like it’s working from the logs:
[13:12:04][D][switch:012]: ‘ComfoAir Bypass’ Turning ON.
[13:12:05][D][switch:016]: ‘ComfoAir Bypass’ Turning OFF.
It looks like there is no transmission happening at all. You should be seeing likes like those:
14:51:06][C][comfoair:241]: ComfoAir:
[14:51:06][C][comfoair:242]: Update Interval: 2.0s
[14:51:06][C][comfoair:244]: Bootloader SlimLine v1.30 b32
[14:51:06][C][comfoair:246]: Firmware SlimLine v1.30 b32
[14:51:06][C][comfoair:248]: Connector Board Luxe CA350 v3.22
[14:51:07][D][climate:396]: ‘ComfoAir 310 SL’ - Sending state:
[14:51:07][D][climate:399]: Mode: FAN_ONLY
[14:51:07][D][climate:404]: Fan Mode: MEDIUM
[14:51:07][D][climate:419]: Current Temperature: 24.50°C
[14:51:07][D][climate:425]: Target Temperature: 20.00°C
[14:51:07][D][sensor:093]: ‘Comfoair Outside Air’: Sending state 25.50000 °C with 0 decimals of accuracy
[14:51:07][D][sensor:093]: ‘Comfoair Supply Air’: Sending state 24.50000 °C with 0 decimals of accuracy
[14:51:07][D][sensor:093]: ‘Comfoair Return Air’: Sending state 24.50000 °C with 0 decimals of accuracy
[14:51:07][D][sensor:093]: ‘Comfoair Exhaust Air’: Sending state 25.00000 °C with 0 decimals of accuracy
[14:51:07][D][comfoair:741]: getting sensor data
…
Check that the TX/RX lines are proerly connected. At least you should be getting errors if the lines are not decedoed right but roght now it looks like there is nothing at all.