If this does not work, most likely the cable connection is not correct. I’m using entry through the RJ45 socket that is available in the comfoair unit. There is also a screw terminal which might be easier to play with.
Could be that the pinout on the DB9 port is not a standard one.
Here is example for my setup:
No, the one in green is used to connect to the second board in the unit (and is already occupied). The screw terminal I’ve marked in blue is the one you can use:
It is actually marked - you need to use just the GND, RX and TX terminals.
Look at one of the first posts to see which pins need to be connected (not sure if you’ll have standardized cable colours in your cable - just cut it to the length that you’ll need).
Once you are sure it works you can also end it with RJ45 plug if there is such socket on your board (it is right below the screw terminal - it connects to the same tracks. Not sure from the picture you’ve provided).
Ah, and btw, you can’t have both the ethernet-RS232 gateway and the Comfoair controller (e.g. CCEase) connected at the same time. RS232 is a point-to-point interface and can only have 2 devices connected at the same time.
I’m trying to create an automation to control ha_climate_mode. Unfortunately, I can’t find the entity. Does anyone have an example of how to increase or decrease the fan speed?
possible fan modes are: off, low, medium, high
Btw, for CA350 off is not really off, it is more an “away” mode as the vent is not really turned off, rather is put on the lowest speed. You can’t have such setup for climate entity in HA.
I need some help with the installation.
My setup: HaOS on Rasp5 and Waveshare RS232/485 to WiFi and Ethernet.
ca350.py:
26-02-2025 09:37:34 WARNING: Opening serial port exception:
26-02-2025 09:37:34 WARNING: (<class ‘serial.serialutil.SerialException’>, SerialException(2, “could not open port /dev/cuau3: [Errno 2] No such file or directory: ‘/dev/cuau3’”), <traceback object at 0x7fa6a99540>)
How are you running the script? Have you followed the wiki for HAOS installation? If yes, you need to somehow create the virtual port on HAOS, you can take example from the docker startup script and do something similar for HAOS:
Mainly have a look at this line: /usr/bin/socat -d -d pty,link="$SERIAL_PORT",raw,group-late=dialout,mode=660 tcp:"$COMFOAIR_IP":"$COMFOAIR_PORT"
You’ll have to either modify the ca350runner.py program or create a separate one just for the virtual serial port. Not sure if there is a better way of achieving it on HAOS.
I finally got a connection to my comfoair via serial connection RS232 using the docker container. I would like to share what I changed in my docker-compose.yml to get it working.
Maybe you want to add it to the documentation on github:
So I receive mqtt data now which is visible in mqtt explorer as well as in home-assistant.
There is one issue left though. The TimWeyand Lovelace-comfoair Card is not working. When trying to add the card to the dashboard I only get this:
I have had the problem for some time that the connection to the MQTT broker is cancelled after a few days. The connection could only be re-established by restarting the Homeasisstant.
About my configuration. I connected the CA350 directly to the Home Assistant via a USB TTL adapter and set up the whole thing there according to the instructions. Home · adorobis/hacomfoairmqtt Wiki · GitHub MQTT Broker is an add-on in the Homeassistant.
A few days ago I completely lost the connection. Does anyone have the same problem or any idea what the problem could be?
Is it just the connection from the CA350 script to MQTT broker or HA is loosing connection to the MQTT completely? The script has a reconnection mechanism implemented so it is reconnecting automatically. If it can’t reconnect you’d need to figure out what’s wrong there, maybe something in the MQTT addon logs that would tell what the problem is?
Thanks for your fast replay.
I have some other devices which are connected to the mqtt broker. They work fine. So I guess it is something between the CA350 and the broker. May you can see something more than me in the log:
[09:37:11] INFO: Starting NGINX for authentication handling...
s6-rc: info: service legacy-services successfully started
[09:37:12] INFO: Starting mosquitto MQTT broker...
2025-03-19 09:37:12: Warning: Mosquitto should not be run as root/administrator.
2025-03-19 09:37:12: mosquitto version 2.0.20 starting
2025-03-19 09:37:12: Config loaded from /etc/mosquitto/mosquitto.conf.
2025-03-19 09:37:12: Loading plugin: /usr/share/mosquitto/go-auth.so
2025-03-19 09:37:12: ├── Username/password checking enabled.
2025-03-19 09:37:12: ├── TLS-PSK checking enabled.
2025-03-19 09:37:12: └── Extended authentication not enabled.
2025-03-19 09:37:12: Opening ipv4 listen socket on port 1883.
2025-03-19 09:37:12: Opening ipv6 listen socket on port 1883.
2025-03-19 09:37:12: Opening websockets listen socket on port 1884.
2025-03-19 09:37:12: mosquitto version 2.0.20 running
2025-03-19 09:37:12: New connection from ::1:52314 on port 1883.
2025-03-19 09:37:12: Client <unknown> disconnected due to protocol error.
[09:37:12] INFO: Successfully send discovery information to Home Assistant.
[09:37:13] INFO: Successfully send service information to the Supervisor.
2025-03-19 09:37:17: New connection from 172.30.32.1:36055 on port 1883.
2025-03-19 09:37:17: New client connected from 172.30.32.1:36055 as 5gxzIdHpoWRj9oS5LEwHB9 (p2, c1, k60, u'mqttuser').
2025-03-19 09:37:18: New connection from 192.168.178.64:54372 on port 1883.
2025-03-19 09:37:18: New client connected from 192.168.178.64:54372 as Strommessung (p2, c1, k30, u'mqttuser').
2025-03-19 09:37:37: New connection from 192.168.178.81:64096 on port 1883.
2025-03-19 09:37:37: New client connected from 192.168.178.81:64096 as Strom_allg (p2, c1, k10, u'mqttuser').
2025-03-19 09:38:05: New connection from 172.30.32.2:47700 on port 1883.
2025-03-19 09:38:05: Client <unknown> closed its connection.
2025-03-19 09:40:05: New connection from 172.30.32.2:44768 on port 1883.
2025-03-19 09:40:05: Client <unknown> closed its connection.
2025-03-19 09:42:05: New connection from 172.30.32.2:48024 on port 1883.
2025-03-19 09:42:05: Client <unknown> closed its connection.
2025-03-19 09:44:05: New connection from 172.30.32.2:45800 on port 1883.
2025-03-19 09:44:05: Client <unknown> closed its connection.
2025-03-19 09:46:05: New connection from 172.30.32.2:40964 on port 1883.
2025-03-19 09:46:05: Client <unknown> closed its connection.
2025-03-19 09:48:05: New connection from 172.30.32.2:49252 on port 1883.
2025-03-19 09:48:05: Client <unknown> closed its connection.
2025-03-19 09:50:05: New connection from 172.30.32.2:51650 on port 1883.
2025-03-19 09:50:05: Client <unknown> closed its connection.
In the past, I copied the logs when the connection was ok and when I no longer had a connection.
When I have connection:
2024-10-04 22:28:57: Client CA350 closed its connection.
2024-10-04 22:29:13: New connection from 192.168.178.43:50175 on port 1883.
2024-10-04 22:29:13: New client connected from 192.168.178.43:50175 as CA350 (p2, c1, k45, u'comfoair').
2024-10-04 22:30:00: New connection from 172.30.32.2:40012 on port 1883.
2024-10-04 22:30:00: Client <unknown> closed its connection.
2024-10-04 22:30:40: Client CA350 closed its connection.
2024-10-04 22:30:56: New connection from 192.168.178.43:45429 on port 1883.
2024-10-04 22:30:56: New client connected from 192.168.178.43:45429 as CA350 (p2, c1, k45, u'comfoair').
2024-10-04 22:32:00: New connection from 172.30.32.2:33732 on port 1883.
2024-10-04 22:32:00: Client <unknown> closed its connection.
2024-10-04 22:34:00: New connection from 172.30.32.2:37078 on port 1883.
2024-10-04 22:34:00: Client <unknown> closed its connection.
2024-10-04 22:36:00: New connection from 172.30.32.2:47338 on port 1883.
2024-10-04 22:36:00: Client <unknown> closed its connection.
2024-10-04 22:38:00: New connection from 172.30.32.2:37302 on port 1883.
2024-10-04 22:38:00: Client <unknown> closed its connection.
When the connection ist lost:
2024-10-04 22:16:00: New connection from 172.30.32.2:56790 on port 1883.
2024-10-04 22:16:00: Client <unknown> closed its connection.
2024-10-04 22:16:20: New connection from 192.168.178.43:43079 on port 1883.
2024-10-04 22:16:20: Client CA350 already connected, closing old connection.
2024-10-04 22:16:20: New client connected from 192.168.178.43:43079 as CA350 (p2, c1, k45, u'comfoair').
2024-10-04 22:17:48: Client CA350 has exceeded timeout, disconnecting.
2024-10-04 22:18:00: New connection from 172.30.32.2:48650 on port 1883.
2024-10-04 22:18:00: Client <unknown> closed its connection.
2024-10-04 22:18:00: New connection from 192.168.178.43:57233 on port 1883.
2024-10-04 22:18:00: New client connected from 192.168.178.43:57233 as CA350 (p2, c1, k45, u'comfoair').