[ComfoAir] WIP: Integrate ComfoConnect LAN C

Hi all,
it appears that no one attempted to add ComfoConnect support to ComfoAir binding yet (or did I miss it?). Therefor, I started extending the ComfoAir binding using a lot of research of Michaël Arnauts.

Current WIP state can be found at GitHub - darkspirit510/openhab-addons at wip-comfoair-comfoconnect

I already get values from some sensors, but still need to understand which sensor of serial integration matches the ComfoConnct sensor (if applicable).

21:59:51.434 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Zuluftventilator_' changed from 24.0 to 23.0
22:00:13.460 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Abluftventilator_' changed from 26.0 to 25.0
22:00:15.425 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Fortlufttemperatur' changed from 11.2 °C to 11.1 °C
22:00:27.413 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Ablufttemperatur' changed from 20.1 °C to 20.2 °C
22:01:01.416 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Fortlufttemperatur' changed from 11.1 °C to 11 °C
22:01:02.375 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Aussenlufttemperatur' changed from 7.5 °C to 7.4 °C
22:01:07.379 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Aussenlufttemperatur' changed from 7.4 °C to 7.3 °C
22:01:43.386 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Aussenlufttemperatur' changed from 7.3 °C to 7.4 °C
22:01:45.408 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Fortlufttemperatur' changed from 11 °C to 10.9 °C
22:01:53.413 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Aussenlufttemperatur' changed from 7.4 °C to 7.5 °C
22:01:55.427 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Ablufttemperatur' changed from 20.2 °C to 20.3 °C
22:01:56.467 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Zehnder_ComfoConnect_LAN_Ablufttemperatur' changed from 20.3 °C to 20.2 °C

Plus I am not sure if I’m using openHAB framework correctly :sweat_smile:

Hi
I integrated my Q-Series Zehnder Device using Modbus TCP. Maybe this helps you.

Look at this post https://community.openhab.org/t/zehnder-comfoairq350-do-i-need-comfoconnect-to-control-it/13159/125?u=levin1

Hi @darkspirit510,

Following up on this — I picked up where you left off on wip-comfoair-comfoconnect and wanted to share progress in case it’s useful to you or anyone else watching this thread.

Status: early / alpha, but the core is working and tested on real hardware (ComfoAirQ + ComfoConnect LAN C), on both openHAB 4.2.0 and 5.2.1.

What works now

  • Fixed the discovery bug (the UDP response buffer was being parsed including its zero-padding, causing InvalidProtocolBufferException on every attempt)
  • Proper session handshake (RegisterApp + StartSession) with real error surfacing — no more silent failures if another client (the Zehnder app, or a bridge like comfoconnect-mqtt-bridge) already holds the session
  • Full sensor readout via normal openHAB Channels/Items, live-updated via push notifications (not polling): fan speed, 5 temperature sensors, 5 humidity sensors — so the “which sensor matches serial integration” question from your original post is sorted for these
  • Write support: fan speed control (Away/Low/Medium/High) directly from an openHAB Item, via CnRmiRequest
  • Configurable session takeover (takeOverSession parameter — on by default, forces other clients off; can be disabled if you’d rather the connection just fail cleanly instead)

What’s still missing

  • Only fan speed is controllable so far — no bypass, ventilation mode, boost, away, or temperature profile control yet
  • No automatic reconnect if the session drops (e.g. gateway restart) — currently needs a manual disable/enable of the Thing
  • No auto-discovery in the UI — you add the Thing manually and enter the gateway’s IP
  • Hasn’t been run through openHAB’s full code-quality checks (sat-plugin) yet, so it’s not close to an official PR

Try it

  1. Download the jar from the release: org.openhab.binding.comfoair-4.2.0-SNAPSHOT.jar
  2. Drop it in your addons folder
  3. Add a Thing of type “ComfoConnect attached Ventilation System” (binding comfoair), enter your LAN C gateway’s IP
  4. Heads up: takeOverSession defaults to true, which will force-disconnect anything else currently holding a session with the gateway — check the Thing’s advanced config if you want to disable that

Getting a proper control widget for Fan Level

By default, MainUI’s auto-generated widget for the Fan Level Item renders as a generic 0-100 slider — it doesn’t pick up the channel’s actual 0-3 scale. To get a proper +/- control instead:

  1. Open the Fan Level Item → Add Metadata → Default Stand Alone Widget
  2. Set Widget to Stepper Card (oh-stepper-card)
  3. Set Min 0, Max 3, Step 1

(Note: “State Description” metadata with options does not change the widget type — that field is only used for Actions. The widget type has to be set separately via the metadata above.)

Source: branch wip-comfoair-comfoconnect on my fork: GitHub - PePe2KC/openhab-addons at wip-comfoair-comfoconnect · GitHub

Protocol details were mostly cross-checked against michaelarnauts/aiocomfoconnect and michaelarnauts/home-assistant-comfoconnect — thanks to both projects for the groundwork.

Feedback, testers, and PRs welcome — especially from anyone on different ComfoAir hardware than a ComfoAirQ, since node/unit IDs for RMI control are currently hardcoded for that.

Fun fact: I’ve been working on this integration during the last week, too. All channel reads are working including reconnect. But no writing is possible, yet. I’ll push my current state sometime in the evening today.

Glad about the process at Zehnder. We should probably talk to prevent double-work. I’ll write you a DM. :wink:

Okay, I updated my branch at GitHub - darkspirit510/openhab-addons at comfoair-comfoconnect · GitHub.

What works:
Basic reads of all sensors (at least what the AI said to be basic sensors)
Automatic reconnect
Auto-Discovery in UI

Unknown:
Reading of advanced sensors and hardware I do not own (comfocool or hood)

What is missing:
Writing any value to the unit
REFACTORING (AI code is bad)
Unit tests

So in other words: I mostly did what you miss and you did what I miss. We should talk :joy: