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

MQTT seems to be O.K, because I see mostly all values in HA, but not Analog Sensor 1-4.

Check MQTT logs, maybe some hints will be there on what’s the problem

1 Like

Here is the log file:

2025-01-31 21:30:58: New client connected from 192.168.178.104:33801 as CA350 (p2, c1, k45, u'mqtt-user2').
2025-01-31 21:31:09: Client <unknown> has exceeded timeout, disconnecting.
2025-01-31 21:31:26: New connection from 172.30.32.2:53698 on port 1883.
2025-01-31 21:31:26: Client <unknown> closed its connection.
2025-01-31 21:31:37: New connection from 192.168.178.104:34787 on port 1883.
2025-01-31 21:31:37: Client CA350 disconnected, not authorised.
2025-01-31 21:31:40: New connection from 192.168.178.104:55805 on port 1883.
2025-01-31 21:32:45: Client mqttx_02de329e has exceeded timeout, disconnecting.
2025-01-31 21:32:49: New connection from 192.168.178.22:57887 on port 1883.
2025-01-31 21:32:49: New client connected from 192.168.178.22:57887 as mqttx_02de329e (p5, c1, k60, u'mqtt-user2').
2025-01-31 21:33:15: Client <unknown> has exceeded timeout, disconnecting.
2025-01-31 21:33:26: New connection from 172.30.32.2:33018 on port 1883.
2025-01-31 21:33:26: Client <unknown> closed its connection.
2025-01-31 21:33:40: New connection from 192.168.178.104:39165 on port 1883.
2025-01-31 21:33:40: Client CA350 disconnected, not authorised.
2025-01-31 21:33:44: New connection from 192.168.178.104:50481 on port 1883.
2025-01-31 21:35:15: Client <unknown> has exceeded timeout, disconnecting.
2025-01-31 21:35:26: New connection from 172.30.32.2:34584 on port 1883.
2025-01-31 21:35:26: Client <unknown> closed its connection.
2025-01-31 21:35:44: New connection from 192.168.178.104:42029 on port 1883.
2025-01-31 21:35:44: Client CA350 disconnected, not authorised.
2025-01-31 21:35:46: New connection from 192.168.178.104:43843 on port 1883.
2025-01-31 21:36:41: Client CA350 closed its connection.
2025-01-31 21:36:56: New connection from 192.168.178.104:53007 on port 1883.
2025-01-31 21:36:56: New client connected from 192.168.178.104:53007 as CA350 (p2, c1, k45, u'mqtt-user2').
2025-01-31 21:37:21: Client <unknown> has exceeded timeout, disconnecting.
2025-01-31 21:37:26: New connection from 172.30.32.2:32846 on port 1883.
2025-01-31 21:37:26: Client <unknown> closed its connection.
2025-01-31 21:37:46: New connection from 192.168.178.104:45967 on port 1883.
2025-01-31 21:37:46: Client CA350 disconnected, not authorised.
2025-01-31 21:37:49: New connection from 192.168.178.104:55895 on port 1883.
2025-01-31 21:39:20: Client <unknown> has exceeded timeout, disconnecting.
2025-01-31 21:39:26: New connection from 172.30.32.2:51018 on port 1883.
2025-01-31 21:39:26: Client <unknown> closed its connection.
2025-01-31 21:39:49: New connection from 192.168.178.104:47863 on port 1883.
2025-01-31 21:39:49: Client CA350 disconnected, not authorised.
2025-01-31 21:39:53: New connection from 192.168.178.104:38091 on port 1883.
2025-01-31 21:41:26: New connection from 172.30.32.2:33922 on port 1883.
2025-01-31 21:41:26: Client <unknown> closed its connection.
2025-01-31 21:41:27: Client <unknown> has exceeded timeout, disconnecting.
2025-01-31 21:41:53: New connection from 192.168.178.104:43897 on port 1883.
2025-01-31 21:41:53: Client CA350 disconnected, not authorised.
2025-01-31 21:41:56: New connection from 192.168.178.104:54819 on port 1883.

Check your credentials, clearly the client is not authorized to connect.

1 Like

Could be, but after checking all files in detail, all files are configured correctly.
The question is why the connection just sometimes gets lost after ~7 minutes for ~35 sec…

Data are most of the time available.
Sending data in MQTT/Mosquitto is also working.

Maybe it makes sense if I uninstall Mosquitto again-hoping that CA350 would work again.

Do you have any idea why the temperatures are not shown on the left side of the picture?
The entities itself show them.
Is there something to be configured?

I really appreciate your kind support and answering all my questions.
Getting CA350 runnning is the last step I need to do to get all my devices running-it was a long way to go. :wink:

Kind regards, Peter.

Edit the card in yaml mode and verify that the entity ids are correct there. Most likely they are not exactly the same as in the card default configuration.

1 Like

Not sure what the problem might be. You could try to enable anonymous in MQTT and don’t provide any userid nor password in the config. That’s how I have it working.

1 Like

Same issue here. Connection gets lost and Protocoll is full with a lot of reconnects:

2025-02-01 14:33:02: Client <unknown> closed its connection.
2025-02-01 14:33:06: Client CA350 closed its connection.
2025-02-01 14:33:22: New connection from 172.30.32.1:56237 on port 1883.
2025-02-01 14:33:22: New client connected from 172.30.32.1:56237 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:35:02: New connection from 172.30.32.2:59836 on port 1883.
2025-02-01 14:35:02: Client <unknown> closed its connection.
2025-02-01 14:35:05: New connection from 172.30.32.1:54265 on port 1883.
2025-02-01 14:35:05: Client CA350 already connected, closing old connection.
2025-02-01 14:35:05: New client connected from 172.30.32.1:54265 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:35:05: New connection from 172.30.32.1:46561 on port 1883.
2025-02-01 14:35:06: Client <unknown> closed its connection.
2025-02-01 14:35:06: New connection from 172.30.32.1:60505 on port 1883.
2025-02-01 14:35:06: Client CA350 already connected, closing old connection.
2025-02-01 14:35:06: New client connected from 172.30.32.1:60505 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:35:21: New connection from 172.30.32.1:37273 on port 1883.
2025-02-01 14:35:21: Client CA350 already connected, closing old connection.
2025-02-01 14:35:21: New client connected from 172.30.32.1:37273 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:35:21: New connection from 172.30.32.1:33073 on port 1883.
2025-02-01 14:35:22: Client <unknown> closed its connection.
2025-02-01 14:35:22: New connection from 172.30.32.1:36109 on port 1883.
2025-02-01 14:35:22: Client CA350 already connected, closing old connection.
2025-02-01 14:35:22: New client connected from 172.30.32.1:36109 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:35:26: New connection from 172.30.32.1:50217 on port 1883.
2025-02-01 14:35:27: Client <unknown> closed its connection.
2025-02-01 14:35:27: New connection from 172.30.32.1:52809 on port 1883.
2025-02-01 14:35:27: Client CA350 already connected, closing old connection.
2025-02-01 14:35:27: New client connected from 172.30.32.1:52809 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:37:02: New connection from 172.30.32.2:52492 on port 1883.
2025-02-01 14:37:02: Client <unknown> closed its connection.
2025-02-01 14:37:38: Client CA350 closed its connection.
2025-02-01 14:37:54: New connection from 172.30.32.1:43325 on port 1883.
2025-02-01 14:37:54: New client connected from 172.30.32.1:43325 as CA350 (p2, c1, k45, u'mqtt').
2025-02-01 14:39:02: New connection from 172.30.32.2:41722 on port 1883.
2025-02-01 14:39:02: Client <unknown> closed its connection.

To enable anonymous in MQTT and don’t provide any userid nor password in the config is not really an option :frowning:

Now it´s working.

The Entities really had different names.
I don`t know why.

Thank you very much for the hint.

Only the reconnecting issue is pending.
Suspicious that other ones have the same issue…

Never heard of such issue. I’ve also set user and password for my instal and it continues to work without disconnections from MQTT broker. Can’t help much more here…

I was able to solve this issue/failure by trying.
I proceeded like this:

  1. make a Backup
  2. un-install MQTT
  3. un-install Mosquitto
  4. Restart
  5. install Mosquitto
  6. configure Mosquitto just by entering your user-name and password (no changes regarding Server and Port)
  7. Restart

This worked well for me. Log-file doesn`t show any reconnecting attempts anymore.
Hope this might help you as well.

1 Like

I had to edit the card configuration and change as follows:

outsideTempSensor: sensor.ca350_outside_temperature
exhaustTempSensor: sensor.ca350_exhaust_temperature
returnTempSensor: sensor.ca350_return_temperature
supplyTempSensor: sensor.ca350_supply_temperature

The code in Github for the card has the word temperature abbreviated to temp, e.g. ca350_outsidetemp

Edit: Accidentally deleted this reply.

Right, same data to be changed in my case. :wink:

Thanks for the project @adorobis, got my new ComfoAir 180 talking to HomeAssistant in less than half an hour.

This DB9 pig tail made for a very neat connection to the serial to usb adaptor: https://www.amazon.co.uk/dp/B09CTQ7MFL

1 Like