Zehnder ComfoConnect component

Hi,

I’m trying to use the Zehnder Hub (comfoconnect) component. It seems to work, but when I add it to the config, and after HA restart, all my Z-wave components are not there anymore.
When I remove the Zehnder component in the config, they are back again…The configuration syntax is showing up as “valid”, so no issue on this side.

Any ideas why I get this “bug” ?

Thanks in advance for your help.

I’m not using zwave myself, but I don’t see how these components can conflict… There is an existing issue in comfoconnect that gives a warning on startup, due to a null referencing, but that should not cause any issues.

Hi Michael,
Ok, thanks for feedback. I will try again and troubleshoot if necessary, this issue is strange.

Hi @michaelarnauts, I got it working. Don’t know what was wrong the first.

I have the six values that are available in the component. I know that there are some more available (as I read on the https://github.com/michaelarnauts/comfoconnect/blob/master/PROTOCOL.md page).

The thing, in my case, I now have a ComfoAirQ 350 + Comfofond L Q (canadian well). And since the ComfoFond is active, there is a mismatch in the value I get from the ComfoControl app on one side, and from HA on the other side.

Situation : this is currently what I have in the ComfoControl app and in HA :


HA_Zehnder

Problematic : the outdoor Air is here the “real” outdoor temperature in ComfoControl, whereas the “outside_temperature” sensor in HA is showing the temperature of air supplied to the ComfoAirQ after going through the ComfoFond (being warmer as the one outside, that’s the goal :slight_smile: )

Question : would it be possible to make some more values available Home Assistant also, as we know that they are available through the ComfoConnect interface ?

Thanks again for your awesome work on that :slight_smile:

If I remember correctly, it should be possible to just change the home-assistant component side to listen to additional sensors, since they are just mapped to numbers. I don’t think it’s neccesary to change the pycomfoconnect side.

Hi @michaelarnauts , that may be correct yes. I will have a look to it, and will let you know.

There are 5 temperatures that you’ve identified as being trasmitted in the communcation flow from ComfoConnect. Do you know what “Current RMOT” means ? Remote temperature ?
Protocol_pycomfoconnect

Hi @michaelarnauts

I confirm that for most of the values, no modification to pycomfoconnect needs to be done.
I managed to test the update of the HA component and sensors, and managed to grab some new values in HA, from the one that are supported by pycomfoconnect.

Except for the current RMOT :
–> First : I make the assumption that this is the real outside temperature, in contraddiction with the current so-called “Outdoor Air”, which is most probably the sensors of the air supplied to the ComfoAir Q box, whereas “Current RMOT” should be the temperature directly at air intake.
–> Second : this “Current RMOT” has been identified in the protocol reverse enginneering, which is perfect. But currently, it’s not officially implemented in the last version of pycomfoconnect.

@michaelarnauts , do you think that you could add this “Current RMOT” to the pycomfoconnect library ?

I could take care of the HA component update, as it’s pretty easy to do.

Let me know,
Christophe

Hi @chrisuki , I am trying to use the library in Domoticz to get the same data from my Zehnder unit with Comfoconnect Lan C , can you please paste the code how you integrate the library into your HA ? I am struggling to get it running .
Thanks in advance.
Marek

Great that this Zehnder ComfoAirQ350 is available in HA! Just a small problem: I have 2 of these devices on my network. How do I proceed?

hi,

have you find a way to use more value sensor ?
I search especially the “exhaust_temp” and the bypass_status

regards

Anyone else getting bunch of errors/warnings from comfoconnect component every time HA starts?
I get this in home-assistant.log every time…
Ideas?

Jaka

2019-04-30 16:17:37 ERROR (MainThread) [homeassistant.setup] Setup failed for customize: Integration not found.
2019-04-30 16:17:44 ERROR (Thread-15) [homeassistant.components.comfoconnect.sensor] Exception in _handle_update when dispatching 'comfoconnect_update_received': (120,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/sensor.py", line 105, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

2019-04-30 16:17:44 ERROR (Thread-17) [homeassistant.components.comfoconnect.sensor] Exception in _handle_update when dispatching 'comfoconnect_update_received': (119,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/sensor.py", line 105, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

2019-04-30 16:17:44 ERROR (Thread-5) [homeassistant.components.comfoconnect.sensor] Exception in _handle_update when dispatching 'comfoconnect_update_received': (292,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/sensor.py", line 105, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

2019-04-30 16:17:44 ERROR (Thread-11) [homeassistant.components.comfoconnect.sensor] Exception in _handle_update when dispatching 'comfoconnect_update_received': (290,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/sensor.py", line 105, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

2019-04-30 16:17:44 ERROR (Thread-13) [homeassistant.components.comfoconnect.sensor] Exception in _handle_update when dispatching 'comfoconnect_update_received': (274,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/sensor.py", line 105, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

2019-04-30 16:17:44 ERROR (Thread-20) [homeassistant.components.comfoconnect.sensor] Exception in _handle_update when dispatching 'comfoconnect_update_received': (276,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/sensor.py", line 105, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

2019-04-30 16:17:44 ERROR (Thread-18) [homeassistant.components.comfoconnect.fan] Exception in _handle_update when dispatching 'comfoconnect_update_received': (65,)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/comfoconnect/fan.py", line 44, in _handle_update
self.schedule_update_ha_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 336, in schedule_update_ha_state
self.hass.add_job(self.async_update_ha_state(force_refresh))
AttributeError: 'NoneType' object has no attribute 'add_job'

Yes I do see the same errors.

How do I add additional sensors for temperature e.g. supply air?

Jan

Updated to newest everything… and now I am getting new errors :slight_smile:
Thing seeks to work, just these appear in the log at startup…

Any ideas about how to make them gone are welcome.

2020-03-08 20:56:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.comfoairq_outside_temperature. Platform comfoconnect does not generate unique IDs
2020-03-08 20:56:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.comfoairq_supply_airflow. Platform comfoconnect does not generate unique IDs
2020-03-08 20:56:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.comfoairq_outside_humidity. Platform comfoconnect does not generate unique IDs
2020-03-08 20:56:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.comfoairq_inside_temperature. Platform comfoconnect does not generate unique IDs
2020-03-08 20:56:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.comfoairq_inside_humidity. Platform comfoconnect does not generate unique IDs
2020-03-08 20:56:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.comfoairq_exhaust_airflow. Platform comfoconnect does not generate unique IDs

I’ve made a request to add new commands and sensor to the HA zehnder component as there are avalaible in the pycomfoconnect library
Here is the link : Add all other sensors in comfoconnect

Hello everyone,

I am pretty new to Home Assistant. I got some of the integrations done, but I can’t find more detailed instructions how to inegrate Zehnder Ventilation system including Comfofond and Comfoconnect to HA.

I would appreciate an example or a step by step instruction what to install, which files to edit, etc. Information in Integration section of HA for Zehnder is pretty „thin”. Googling did not really help.

Thanks!

Dominik

Hi Dominick,
The component has been recently updated, to me you can just stick to the explanation on how to add the Zehnder component to your HA config, and forget about the files edit and so on.

There are still some features missing (for instance, being able to toggle the temperature profile from the HA interface), but unfortunately I’m not yet into dev enough to manipulate Python :smile:

EDIT: I just saw that new sensors addition have been requested to the intergation code owner, I think this will cover the remaining functions that are not integrated yet, let’s wait on that :slight_smile:
Thanks to @michaelarnauts and all contributors out there :slight_smile:

Hi,

Thanks for the hint - this is where I started and that did not work, so I thought there’s some “magic” which is not mentioned in the HA integration description.
Doing everything as mention in the description of the integration I get the HA notification:

"The following integrations and platforms could not be set up:

  • comfoconnect
  • comfoconnect.sensor

Please check your config."

and bunch of error messages in the home assistant log:

'2020-06-14 13:25:48 ERROR (MainThread) [homeassistant.setup] Error during setup of component comfoconnect
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 273, in _connect
self.cmd_start_session(takeover, use_queue=False)
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 377, in cmd_start_session
use_queue=use_queue
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 157, in _command
reply = self._get_reply(confirm_type, use_queue=use_queue)
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 199, in _get_reply
raise PyComfoConnectNotAllowed()
pycomfoconnect.error.PyComfoConnectNotAllowed

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 77, in connect self._connect(takeover=takeover)
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 279, in _connect
self.cmd_register_app(self._local_uuid, self._local_devicename, self._pin, use_queue=False)

File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 411, in cmd_register_app
use_queue=use_queue
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 157, in _command
reply = self._get_reply(confirm_type, use_queue=use_queue)

File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 199, in _get_reply
raise PyComfoConnectNotAllowed()
pycomfoconnect.error.PyComfoConnectNotAllowed

During handling of the above exception, another exception occurred:
Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/setup.py”, line 190, in _async_setup_component
result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/comfoconnect/init.py”, line 74, in setup ccb.connect()
File “/usr/src/homeassistant/homeassistant/components/comfoconnect/init.py”, line 109, in connect
self.comfoconnect.connect(True)
File “/usr/local/lib/python3.7/site-packages/pycomfoconnect/comfoconnect.py”, line 80, in connect
raise Exception(‘Could not connect to the bridge since the PIN seems to be invalid.’)
Exception: Could not connect to the bridge since the PIN seems to be invalid.

2020-06-14 13:25:48 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform comfoconnect.sensor: Unable to set up component.
2020-06-14 13:26:04 WARNING (MainThread) [aiohttp.websocket] websocket connection is closing.’

I added only lines which are mentioned to be required to the configuration.yaml, which are:

comfoconnect:
-host: IP_of_the_ventilation_comfoconnect

and then the whole sensors section.

Is there anything which needs to be done to make it work? is pycomfoconnect installation the only other thing? How HA knows that it should run it? Is an additional Python daemon needed?

It’s bit lenghtly, but I hope with some guidance from people who made it run I will get there as well and then also the HA integration section could be updated accordingly.

Anyway thanks for all the help and efforts to create this integration. When I finally get it to run I was thinking about linking arming alarm system with turning the ventiation system off (saving of energy and filters).

Thanks!

You are probably using a wrong PIN, the default HA is using is 0000. That’s what the pycomfoconnect.error.PyComfoConnectNotAllowed indicated IIRC.

I agree the error could be less cryptic :slight_smile:

Thanks for the hint… I appreciate your time. I tried the PIN of my ventilation system (I assume this is the one to access the installator settings and functions in the app?) and I still get the same notification in HA and same set of errors.

Hi Dominick,
This is how it looks in my configuration.yaml.

# Zehnder configuration
comfoconnect:
  host: 192.168.0.16
  pin: !secret zehnder_pin

This is how it looks in my sensors.yaml

# Zehnder sensors
sensor:
  - platform: comfoconnect
    resources:
      - current_temperature
      - current_humidity
      - outside_temperature
      - outside_humidity
      - air_flow_supply
      - air_flow_exhaust
      - supply_temperature
      - supply_humidity
      - exhaust_temperature
      - exhaust_humidity
      - days_to_replace_filter
      - bypass_state
      - exhaust_fan_duty
      - exhaust_fan_speed
      - power_usage
      - supply_fan_duty
      - supply_fan_speed