This project lets you use the Olimex ESP32-EVB with CAN interface to interact with the Comfoair Q 350 ventilation unit. Tested with the Olimex ESP32-EVB-EA-IND.
- It exposes all known information and airflow control through MQTT
- It allows you to integrate the unit in Home Assistant as depicted below:
You can find the configuration YAML files in the docs
folder.
Based on the original repo: https://github.com/vekexasia/comfoair-esp32
With changes merged in from the following forks:
- Olimex ESP32-EVB board
- 5V power supply adapter
- Any ethernet cable (RJ45 connector)
- A micro USB cable to connect the board to your computer
updated MacOS driver for USB: https://github.com/WCHSoftGroup/ch34xser_macos
- Update
secrets.yaml
with your WiFi and MQTT credentials. - Build the image with PlatformIO.
- Upload/flash the firmware to the board.
- Copy the Home Assistant configuration from
docs/home-assistant/packages/comfoair
to your Home Assistant installation (e.g./config/packages/comfoair
). Reload your YAML configuration.- For the ventilation card with the arrows, see
docs/home-assistant/example-picture-elements-card.yaml
- For the ventilation card with the arrows, see
- Strip one side of the ethernet cable
- Connect the orange, white-orange, white-green wires to the ESP32-EVB board (see diagram + pictures below).
- Connect the other side of the cable to the RJ45 port of the ventilation unit (located at the top, behind the sliding cover).
|----------------+ +---------------+
| | | |
| [ComfoAir] | | [ESP32-EVB] |
| | | |
| | +++++++++++++++++++++ | |
| RJ45 o--------| (orange) CAN-H o-------o CAN-TX D5 |
|----------------+ | (w/orange) CAN-L o-------o CAN-RX D35 |
| (w/green) GND o-------o GND |
+++++++++++++++++++++ +---------------+
Here is a picture of the board in the case connected to the Zehnder ComfoAir Q
The following commands are available. just issue whatever payload you want to ${prefix}/commands/${key}
where ${key}
is:
- ventilation_level_0
- ventilation_level_1
- ventilation_level_2
- ventilation_level_3
- boost_10_min
- boost_20_min
- boost_30_min
- boost_60_min
- boost_end
- auto
- manual
- bypass_activate_1h
- bypass_deactivate_1h
- bypass_auto
- ventilation_supply_only
- ventilation_supply_only_reset
- ventilation_extract_only
- ventilation_extract_only_reset
- ventilation_balance
- temp_profile_normal
- temp_profile_cool
- temp_profile_warm
Along with these above you can also use the ventilation_level
key with the string 0
or 1
, 2
, 3
to set the desired fan speed level.
There is also set_mode
which accepts auto
or manual
as payload.
- ESP32-EVB connects to the RJ45 port on the ventilation unit
- ESP32-EVB uses the CAN pin numbers GPIO_NUM_35 (CAN-RX) + GPIO_NUM_5 (CAN-TX) instead of GPIO_NUM_5 + GPIO_NUM_4
- CAN interface is built-in, so no need for soldering or additional hardware
- Requires a separate 5V power supply, whereas the ESP32 can be powered via the 12V supply of the ventilation unit (but separate power supply can be more reliable)
- Also, you can get a metal box case from Olimex, so no need for 3D printing
Example ESP32 alternative (see diagram)
Compared to original project by
vekexasia
Some of these changes could be avoided by smarter configuration in HA, yet it was easier for me to change firmware rather than tinker with HA.
- Some small refactors in C++ to avoid warnings or unpredicted side-effects.
MQTT_PREFIX/status
topic - that shows whether device is online or offline, it uses last will feature of MQTT, to send offline message. This topic can have one of two possible valuesonline
oroffline
. This can be used to driveavailability_topic
in HA.- Number of topics is renamed, to follow more style of HA also new command topics are added
MQTT_PREFIX/climate/fan[/set]
- status of fan (off
,low
,medium
andhigh
) and topic to set value from HA (same values). Please see Climate.MQTT_PREFIX/climate/mode[/set]
- topic for operating mode (auto
andmanual
). There is hack to forceauto
whenlimited_manual
is active:limited_manual
->manual
->auto
(otherwise status would be ignored).MQTT_PREFIX/climate/preset[/set]
- temperature profile (warm
,auto
,cool
). I was unable to use this in HA from any existing UI components (automations and stuff works).operating_mode
->climate/mode
, and one value was renamedunlimited_manual
->manual
fan_speed
->climate/fan
, and values changed from numerical to strings from point 2.temp_profile
->climate/preset
and as above.- Hostname added to network configuration, should be defined in
secrets.h
as#define HOSTNAME "ca350_bridge"
(or any hostname you prefer). - I prepared bigger case as I had bigger ESP32 board (DoIt ESP32 DevKit v1) please find it in
./docs/3d
Other configuration is same as sensors.yaml with small renames.
A lot of this repo was inspired by the reverse engineering here. If you'd like to know more how the unit communicates, head over
There's also a Node.JS version with a Raspberry PI here