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

Nope
image

Yeah, just one more small fix str instead of int in the line:

publish_message(msg=str(FilterStatusBinary), mqtt_path='comfoair/filterstatus_binary')

I tried both the conditions

image

image

the filter status remains OK all the time
image

Bingo

To summarize

            if data[8] == 0:
                FilterStatus = 'Ok'
                FilterStatusBinary = 'OFF'
            elif data[8] == 1:
                FilterStatus = 'Full'
                FilterStatusBinary = 'ON'

and
publish_message(msg=str(FilterStatusBinary), mqtt_path='comfoair/filterstatus_binary')

So the full function will look like that:

def get_filter_status():
    data = send_command(b'\x00\xD9', None)

    if data is None:
        warning_msg('get_filter_status function could not get serial data')
    else:
        if len(data) > 16:
            info_msg('Filter query data: {0}'.format(data))
            if data[8] == 0:
                FilterStatus = 'Ok'
                FilterStatusBinary = 'OFF'
            elif data[8] == 1:
                FilterStatus = 'Full'
                FilterStatusBinary = 'ON'
            else:
                FilterStatus = 'Unknown'
                FilterStatusBinary = 'OFF'
            publish_message(msg=str(FilterStatus), mqtt_path='comfoair/filterstatus')
            publish_message(msg=str(FilterStatusBinary), mqtt_path='comfoair/filterstatus_binary')
            debug_msg('FilterStatus: {0}'.format(FilterStatus))
        else:
            warning_msg('get_filter_status data array too short')

Works ok for me. Just can’t check if indeed the filter needs replacement as I don’t use the display anymore.

1 Like

Great. Now would be good if you could reset the filter status and confirm that HA will show it Ok again. How do you reset the filter state?

Sure, IIRC it should be enough to press OK on the display
BTW, I will do it tomorrow; I can’t do it now without waking up the entire family :(, that’s why I love sooooo much this integration, being able to get data from remote is priceless

I will keep you posted

If it works, the automation should be

According to the manual the filter status reset procedure is more complicated but I’ve always had problems with it, most of the time displaying the filter message.
Automation trigger should be correct now.

HI,
it works
I pressed the OK button on the display and I changed the filters
image

image

Great! I’ve updated the repo with this fix already. One question though:

Are you running this integration and the display at the same time? If yes, how did you connect it and configure it that it works together?

I followed the instructions and I plugged this RS232/USB to the raspberry
image
then I built the cable as you described

It seams that both are working together

regards

OK, thanks, I’ll give it another try

@adorobis, can I suggest you a new feature?
Add a switch DEBUG (Yes/No), when set to Yes, publish a MQTT text with the raw value of the data attribute
This will help a lot to understand the behavior without debug the python code

regards

Interesting idea :slight_smile: Could you open a feature request on github?
And a question: as you still have the display connected maybe you could try to see if there is a way to listen to data returned. We are missing one major feature of the unit which is not documented in the protocol doc: switching mode to intake fan only, exhaust fan only or both.

@adorobis, can you explain me how to do the switch between intake fan only, exhaust fan only or both?

are you referring to these options?
image

this sounds a perfect case where the MQTT message with the raw data sounds really helpful :grinning_face_with_smiling_eyes:
feel free to send me some instruction to explain how to do that

Yes, this is for this case. According to the manual this is the way to activate it. Are you using comfosense controller?

  1. Press OK. The text says SHIFT for 8
    seconds.
  2. Press MENU before the text SHIFT
    disappears. The text says COMF.
  3. Press once. The text says FAN.
  4. Press OK to confirm. The text says
    IN, OFF.
  5. Press or to choose which fan
    to switch on or off. The following
    options can be chosen:
    ■ IN OFF = Switch off the supply
    fan;
    ■ OUT OFF = Switch off the
    exhaust fan;
    ■ BOTH ON = Switch on both fans.
  6. Press OK to confirm. The text says
    SAVED for 2 seconds. The menu is
    automatically closed. The symbol of
    the chosen option is visible.
    image
    for the icon 5:

The problem is that I don’t know how to monitor what is being sent by the device :slight_smile: So far only commands that have been described in the protocol documentation are implemented in this integration.

Hi @adorobis ,

I don’t have the comfosense controller, I have only the display mounted on the front panel
image

Here what I see in the manual
image

Essentially, press for 3 second the button to enable/disable the supply fan
I don’t see any reference to stop the exhaust fan

OK, got it. I think this panel is not communicating with the unit via RS232 but controls it directly. And options here are limited. I guess it won’t send any data on serial interface when you click on those buttons.

Hi,
I would like to ask what exact RJ45 socket are you using?
On my AERISNext there is a dedicated plug for ComfoNet:

however connecting RS232 gives an ComfoNet error.
Am I right that this can be not a RS232 socket and in this case your solution does not work?
Here is my mainboard connection: