Zehnder ComfoAir CA350 integration via serial connection (RS232) and MQTT

First of all, thanks for this great project.
I’m looking for a solution without Raspberry for my comfoair 200; I was told I can use this https://a.aliexpress.com/_Ew1IJi3
And I was told also not to buy the wireless one. So I started looking for POE version and found this: https://www.waveshare.com/product/rs232-485-422-to-poe-eth-b.htm
Do you think it can work?
Thanks

I guess this should work as long as it will be visible in linux as a serial port (so I believe you’ll need some driver for that). I would rather go into the direction of the esp module which would integrate with HA directly, without a need to use my service. So I would check out this project:

Thank you very much for your reply.
I was looking for something different from esp module, because I’d like to use your service… I’ll see if I can find any driver before buying it.
Thanks

1 Like

I am new here. I’ve been busy setting up my home assistant for a few days now. This thread was very helpful, thank you all!

We have a WHR930 (1 print version with only rj45 connector).
This is connected as indicated in this topic via a serial - usb adapter on a raspberry pi.

As a software I try the adorobis/hacomfoairmqtt, first no connection to serial but after flipping tx/rx the script continues but stops with the error:

26-08-2023 06:14:42 DEBUG: Sending autodiscover for homeassistant/binary_sensor/ca350_bypass_valve/config
Traceback (most recent call last):
  File "/home/pi/ca350/ca350.py", line 1110, in <module>
    get_temp()
  File "/home/pi/ca350/ca350.py", line 374, in get_temp
    EWTTemp = data[6] / 2.0 - 20
IndexError: index out of range

I suspect this is because our WHR930 does not have the ETW.
In the config I don’t see an option to turn it off, does anyone know how to solve this?

Please open issue on github and I’ll fix it.
Edit: fixed already

Did you get any further with the serial interface, is it working or not ?
I would like to try also.

If not, this was my backup plan : 3 position ventilation switch

But then it’s only the switch, no readout of temperatures, that will be done later with an ESP then

Is it just a swap from Wichers code ?

Nobody tried ?

I found a solution: Use “Advanced SSH & Web Terminal” and not “Terminal & SSH”, then you can run these commands.

Hi,

I would also like to control my Ventillation unit without having to disconnect my comfosense, but I am confused by the schematic. In my case there are only 4 cables (V+, 1, 2, GND) going from the Ventillation unit to the comfo sense but on this schematic I am seeing 5 cables?

The fifth is just PE aka Protective Earth or connected to the mains ground so in your case it is likely not wired. For my cable it is connected to the loose copper strand that goes along the 4 wires for stiffness.

Hi!

I’ve been trying to make it work using source from this repo: GitHub - Oxyd69/esphome-comfoair: ESPHome configuration to drive Zehnder ComfoAir devices. (which is updated to support ESPHome 2023.9.0).

I’ve been using this device: Tasmota ESP8266 ESP-01 RS232 to WLAN kit modulo RS232 to WiFi set kit | eBay and followed the schematic to connect a network cable. The result is this one:



Unfortunately all sensors show up as “unknown” in home assistant:

And of course I cannot control the fan.

In the comfoair.yaml I’ve just changed the wifi details and the api password:

esphome:
  name: comfoair
  platform: ESP8266
  board: esp01_1m
  includes:
    - comfoair.h

wifi:
  ssid: '[REDACTED]'
  password: '[REDACTED]'

# Disable uart logging
logger:
  baud_rate: 0

# Enable Home Assistant API
api:
  password: '[REDACTED]'

to the match the one i stored in configuration.yaml

homeassistant:
  [...]
  auth_providers:
    - type: homeassistant
    - type: legacy_api_password
      api_password: [REDACTED]

These are the logs from esphome:

INFO ESPHome 2023.10.0
INFO Reading configuration /config/esphome/vmc.yaml...
INFO Starting log output from comfoair.local using esphome API
INFO Successfully connected to comfoair.local
[10:11:34][I][app:102]: ESPHome version 2023.10.0 compiled on Oct 19 2023, 08:44:41
[10:11:34][C][wifi:546]: WiFi:
[10:11:34][C][wifi:382]:   Local MAC: 98:CD:AC:23:84:79
[10:11:34][C][wifi:383]:   SSID: [redacted]
[10:11:34][C][wifi:384]:   IP Address: 10.11.12.31
[10:11:34][C][wifi:385]:   BSSID: [redacted]
[10:11:34][C][wifi:387]:   Hostname: 'comfoair'
[10:11:34][C][wifi:389]:   Signal strength: -35 dB ▂▄▆█
[10:11:34][C][wifi:393]:   Channel: 11
[10:11:34][C][wifi:394]:   Subnet: 255.255.255.0
[10:11:34][C][wifi:395]:   Gateway: [redacted]
[10:11:34][C][wifi:396]:   DNS1: [redacted]
[10:11:34][C][wifi:397]:   DNS2: 0.0.0.0
[10:11:34][C][logger:361]: Logger:
[10:11:34][C][logger:362]:   Level: DEBUG
[10:11:34][C][logger:363]:   Log Baud Rate: 0
[10:11:34][C][logger:365]:   Hardware UART: UART0
[10:11:34][C][uart.arduino_esp8266:102]: UART Bus:
[10:11:34][C][uart.arduino_esp8266:103]:   TX Pin: GPIO1
[10:11:34][C][uart.arduino_esp8266:104]:   RX Pin: GPIO3
[10:11:34][C][uart.arduino_esp8266:106]:   RX Buffer Size: 256
[10:11:34][C][uart.arduino_esp8266:108]:   Baud Rate: 9600 baud
[10:11:34][C][uart.arduino_esp8266:109]:   Data Bits: 8
[10:11:34][C][uart.arduino_esp8266:110]:   Parity: NONE
[10:11:34][C][uart.arduino_esp8266:111]:   Stop bits: 1
[10:11:34][C][uart.arduino_esp8266:113]:   Using hardware serial interface.
[10:11:34][C][comfoair:204]: ComfoAir:
[10:11:34][C][comfoair:205]:   Update Interval: 0.6s
[10:11:34][C][comfoair:207]:   Bootloader  v0.00 b 0
[10:11:34][C][comfoair:209]:   Firmware  v0.00 b 0
[10:11:34][C][comfoair:211]:   Connector Board  v0.00
[10:11:34][C][mdns:115]: mDNS:
[10:11:34][C][mdns:116]:   Hostname: comfoair
[10:11:34][C][ota:097]: Over-The-Air Updates:
[10:11:34][C][ota:098]:   Address: comfoair.local:8266
[10:11:34][C][api:138]: API Server:
[10:11:34][C][api:139]:   Address: comfoair.local:6053
[10:11:34][C][api:143]:   Using noise encryption: NO
[10:11:34][D][comfoair:578]: getting fan status
[10:11:34][D][comfoair:586]: getting valve status
[10:11:36][D][comfoair:626]: getting ventilation level
[10:11:36][D][comfoair:631]: getting temperatures
[10:11:37][D][comfoair:593]: getting error status
[10:11:37][D][comfoair:603]: getting bypass control
[10:11:38][D][comfoair:578]: getting fan status
[10:11:39][D][comfoair:586]: getting valve status
[10:11:40][D][comfoair:626]: getting ventilation level
[10:11:40][D][comfoair:631]: getting temperatures
[10:11:41][D][comfoair:593]: getting error status
[10:11:42][D][comfoair:603]: getting bypass control
[10:11:42][D][comfoair:578]: getting fan status
[10:11:43][D][comfoair:586]: getting valve status
[10:11:44][D][comfoair:626]: getting ventilation level
[10:11:45][D][comfoair:631]: getting temperatures
[10:11:45][D][comfoair:593]: getting error status
[10:11:46][D][comfoair:603]: getting bypass control
[10:11:46][D][comfoair:578]: getting fan status
[10:11:47][D][comfoair:586]: getting valve status
[10:11:48][D][comfoair:626]: getting ventilation level

Do you guys have any idea what I’m missing? I suspect it might be something on connections side or hardware side. I already tried inverting TX/RX on serial socket side and switching jumpers.

Are you sure your model supports the external controller? See this comment:

The manual sais it’s a ComfoAir Standard 375. In the represented schematic, the rj45/rs232 connector serves ComfoSense unit (which i detached to connect mine):

Mine is a ComfoAir 310 SL and it works connected like this. The ComfoSense is using the same protocol only some more exotic commands are not supported.

Are you sure the TX/RX pair is correctly wired and not swapped?

OK, seems it should work. Maybe enable the verbose logging and see what’s happening there. Not sure if it is reading any data.

I tried swapping white/green and orange cables multiple times, no success :confused:

Do you mind sharing you BOM and how you connected everything?

How do I enable verbose logging?

Everything I did is described in my Github page linked above - GitHub - julianpas/esphome-comfoair: ESPHome configuration to drive Zehnder ComfoAir devices.

I read your github page before - i just could not figure out how those colored cables should be connected to a rj45 plug :sweat_smile: