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

Hi all,

I’m trying to setup with a serial-ethernet-converter USR-TCP232-302.
I follow the quick start as Docker container but I can’t achieve connection ?

Previously I use a USB-RS232 adapter on domoticz, so I’m sure RJ45-DB9 cable is OK.

image

Have you an idea?

I think it supports just the basic controls: fan speed and target temperature.

However I assume any software that works with an ESP + MAX232 should work with the RS232 base.

Does other software support more controls?

Yes, my original integration via python scripts gives a few more:
image
Additionally you can configure in the settings file the fan speeds for each ventilation level. I thought this is not needed to be done via HA as this should not be changed too often.

I’m thinking of moving to the esp rs board but in this case I would use it only as a wifi-rs232 bridge and run my python on the server. This way I could get rid of the cable between comfoair and my nas (where the python script runs at the moment).

Ok cool! Not sure if these are all implemented in the ESPhome version…

Using it as wifi-rs232 bridge should work. Perhaps also possible to run the python on the ESP.

Hello there, I would like to thank you all very very much and especially @julianpas who supported also via private messages.
Please let me share my basic schematic for those like me that are no experts but just hobbists, I believe this would be beneficial for who is interested.
My machine: Comfoair 180
Controller: Comfosense
Adapter: green RS232 plug
DC stepdown to 5V
Dual RS232-TTL interface
Code: look for esphome-comfoair by @julianpas on github
I proxied the Comnfosense along with the ESP32 (wroom32D) so I can both control my unit either from the ESP or the Comfosense wall mounted.

6 Likes

OK, so I managed to get everything up and running with a docker container using socat on a serial to net adapter. The one thing that threw me off is the pinout in the description, it has the wires of TX and RX reversed. Correct pinout is (at least when using a male DP9 connector):
rj45 pin 2 → rs232 pin 2
rj45 pin 3 → rs232 pin 3
rj45 pin 8 → rs232 pin 5

@adorobis : I would like to help with getting the commands to the unit out in real time instead of waiting on the timer to pass, however I’m not proficient in Python. Is there anything I can do to help?

The control commands are already send straight on getting them from mqtt, not in a loop. Also right after sending the command a respective state refresh command is being sent. But it seems that it takes Summer time before the comfoair reflects the new state hence the impression that it is only refreshed in the time loop. I didn’t have more patience to play with it to figure out how to optimize that. But any suggestions are more than welcome.

1 Like

One thing that is not working in my set-up is the Bypass Valve icon, it does not change regardelss of the binary_sensor value:


When I click on the icon, the correct state for the past 24 hours is present.
My card config is:

type: custom:hacomfoairmqtt-card
climateEntity: climate.whr950_climate
outsideTempSensor: sensor.whr950_outside_temperature
exhaustTempSensor: sensor.whr950_exhaust_temperature
returnTempSensor: sensor.whr950_return_temperature
supplyTempSensor: sensor.whr950_supply_temperature
filterStatusSensor: binary_sensor.whr950_filter_status
bypassValveSensor: binary_sensor.whr950_bypass_valve
summerModeSensor: binary_sensor.whr950_summer_mode
returnAirLevelSensor: sensor.whr950_return_air_level
supplyAirLevelSensor: sensor.whr950_supply_air_level
preheatingStatusSensor: binary_sensor.whr950_preheating_status

How can I fix this issue?

Same issue here. Have not noticed that before. I’d suggest to open an issue on author’s repo:

1 Like

HI,

I see this warning, do I need to change something?

02-09-2024 20:49:43 WARNING: Expected return not found
02-09-2024 20:49:43 WARNING: function set_ewt could not get serial data, retrying in 2 seconds
02-09-2024 20:49:47 WARNING: Expected return not found
02-09-2024 20:49:47 WARNING: EWT Settings out of range, correcting to minimal temperature values

Logger: homeassistant.components.mqtt.number
Source: components/mqtt/number.py:182
integration: MQTT (documentation, issues)
First occurred: 10:49:40 PM (2 occurrences)
Last logged: 10:49:40 PM

  • Invalid value for number.ca350_ewt_low_temperature: -16.5 (range 0.0 - 15.0)
  • Invalid value for number.ca350_ewt_high_temperature: -16.5 (range 10.0 - 25.0)

Are you using the EWT (ground heater) integrated with your ventilation? If not you can ignore those messages, I’d need to make this configurable and correct the code a bit to avoid the out of range values being sent to HA.

No sir, I don’t have it. Thank you for your help

Hi,
I am new with HA and with this integration of CA350.

I am trying to get this integration running but I have a problem.
I added everthing as described here: https://github.com/adorobis/hacomfoairmqtt/wiki/Home-Assistant-Operating-System
After HA is started the shell command will be executed. At this moment I can see several values in the Dashboard but after 60 seconds I got this error message:

Error while executing automation automation.comfoair_script_start: Timed out running command: python3 /config/custom_components/ca350/ca350runner.py, after: 60 seconds >

After this no values are shown in the Dashboard. If I start the script directly via ssh (putty) everything works.

What I am doing wrong?
Thanks
Marcus

I believe this is due to the fact that shell_command is now timed out after 60 seconds and cannot be changed. Please join this discussion with author of those instructions, maybe he’ll be able to help:

Hi,

i tried to connect my ComoAir 180 just like you described in your picture.
But i always get a “Comm Error” on my ComfoSense.

Does the esp32 already be programmed, for this to be working? My esp32 is still empty.
I wanted to connect everything first, continue to control my ComfoAir 180 via the ComfoSense, and then program the esp32.

Hi hoermi93,

welcome here! Yes, you need to program the ESP first. The logic to proxy data is contained in the program itself.

Best,
Julian

Thanks for the info.
I´ll try my luck. It´s the first time I am programming a ESP32.

I solved the problem:
Modified ca350runner.py to:

os.system('source /config/custom_components/ca350/python3venv/bin/activate && nohup python3 /config/custom_components/ca350/ca350.py > /dev/null 2>&1 &')
1 Like

I am completely new to the world of Home Assistant and ComfoAir 350 (otherwise known as WHR 930) so excuse me if I am using the wrong topic. But, quick question;

The supply temp. is barely higher then the outside temperature. Last night it was 7.5 Celsius the return temp. 20 Celsius while the supply temperature was just 11 Celsius. Is that to be expected from such a unit? I noticed that summer mode is stuck on ON as well. With an outside temperature of 7.5 Celsius its not really summer :thinking:

Strange because I have a target temp. of 23 Celsius you would expect summer mode to be off?