michaelarnauts / comfoconnect Goto Github PK
View Code? Open in Web Editor NEWPython Zehnder ComfoConnect LAN C library to interface with ComfoAir Q350/450/600 units.
License: Other
Python Zehnder ComfoConnect LAN C library to interface with ComfoAir Q350/450/600 units.
License: Other
Hi, it looks like you made some efforts in translating the protocol also for the canbus. I was wondering if some parts of this library could still be used coupled with a canbus transceiver somehow.
I am getting the below error when I am trying to connect to my Zehnder. 2 weeks back I was able to connect but now I am not not able.
Traceback (most recent call last):
File "C:\Users\LN434UJ\Envs\reku\example\example.py", line 193, in
main()
File "C:\Users\LN434UJ\Envs\reku\example\example.py", line 56, in main
bridge = bridge_discovery()
File "C:\Users\LN434UJ\Envs\reku\example\example.py", line 29, in bridge_discovery
bridges = Bridge.discover('192.168.0.115')
File "C:\Users\LN434UJ\AppData\Local\Programs\Python\Python39\lib\site-packages\pycomfoconnect\bridge.py", line 38, in discover
data, source = udpsocket.recvfrom(100)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
Hi Michael,
Thanks for the config, it's really great with ha.
I'm automating the ComfoAir to boost when the light is on in the bathroom (humidity sensor is good but I would like to really boost). Unfortunately, I didn't find how to revert to auto mode. As far as I understand "auto" is not in the speed_list for a fan object in ha. So I don't know how to do it in a clean way.
Meanwhile, I wrote this little python script to be called from ha:
#!/usr/bin/python3
from pycomfoconnect import Bridge,ComfoConnect
from pycomfoconnect.const import *
local_uuid = bytes.fromhex('00000000000000000000000000000005')
bridges = Bridge.discover("X.X.X.X")
pin = 0000
local_name = "Custom script"
bridge=bridges[0]
comfoconnect = ComfoConnect(bridge, local_uuid, local_name, pin)
comfoconnect.connect(True)
comfoconnect.cmd_rmi_request(CMD_MODE_MANUAL)
comfoconnect.cmd_rmi_request(CMD_MODE_AUTO)
comfoconnect.disconnect()
it's probably ugly but it does work.
Unfortunately, the pip package is rather old the the const for auto mode is not there yet.
Could you please publish a new pip package ?
If I can be super annoying, could you require that new version in ha?
(If there is a solution to revert to auto mode from ha directly it's event better)
Thanks in advance,
Regards,
Hello
I would like to set Bypass on / off and the time for this to be effected.
Thank you for your help.
may helpful for someone.
may includes pdid not documented in PROTOCOL-PDO.md currently (never checked back)
{
{ id: 16, type: 1, name: 'status.away' }, // 01 = low, medium, high fan speed, 07 = away
{ id: 49, type: 1, name: 'status.mode' }, // 01 = limited manual, 05 = unlimited manual, ff = auto
{ id: 56, type: 1, name: 'status.mode2', log: false }, // 01 = unlimited manual, ff = auto
{ id: 65, type: 1, name: 'setting.speed', unit: ''},
{ id: 66, type: 1, name: 'setting.bypass', log: false }, // 0 = auto, 1 = on, 2 = off
{ id: 67, type: 1, name: 'setting.temperature', log: false }, // 0 = normal, 1 = cool, 2 = warm
{ id: 70, type: 1, name: 'setting.fan.direction', log: false }, // 1 = IN only, 0 = IN + OUT
// 4294967295 / 0xFFFFFFFF = no auto change
{ id: 81, type: 3, name: 'counter.fan.speed', log: false, unit: 'sec' },
{ id: 82, type: 3, name: 'counter.bypass', log: false, unit: 'sec' },
{ id: 86, type: 3, name: 'counter.fan.direction', log: false, unit: 'sec' },
{ id: 117, type: 1, name: 'fan.out.value', unit: '%'},
{ id: 118, type: 1, name: 'fan.in.value', unit: '%'},
{ id: 119, type: 2, name: 'fan.out.flow', unit: 'm³/h'},
{ id: 120, type: 2, name: 'fan.in.flow', unit: 'm³/h'},
{ id: 121, type: 2, name: 'fan.out.rpm', unit: 'rpm'},
{ id: 122, type: 2, name: 'fan.in.rpm', unit: 'rpm'},
{ id: 128, type: 2, name: 'power.watt.current', unit: 'W'},
{ id: 129, type: 2, name: 'power.watt.year', unit: 'kWh'},
{ id: 130, type: 2, name: 'power.watt.total', unit: 'kWh'},
{ id: 146, type: 2, name: 'preheat.power.watt.current', unit: 'W'},
{ id: 144, type: 2, name: 'preheat.power.watt.total', unit: 'kWh'},
{ id: 145, type: 2, name: 'preheat.power.watt.year', unit: 'kWh'},
{ id: 192, type: 2, name: 'filter.life.left', unit: 'days'},
{ id: 208, type: 1, name: 'setting.ui.temperature', log: false }, // 0 = °C, 1 = °F
{ id: 209, type: 6, name: 'rmot', scale: -1, unit: '°C'},
{ id: 212, type: 6, name: 'air.temperature.room.soll', scale: -1, unit: '°C' },
{ id: 213, type: 2, name: 'energy.saved.current', unit: 'W'},
{ id: 214, type: 2, name: 'energy.saved.year', unit: 'kWh'},
{ id: 215, type: 2, name: 'energy.saved.total', unit: 'kWh'},
{ id: 216, type: 2, name: 'energy.saved.current_cool', unit: 'W'},
{ id: 217, type: 2, name: 'energy.saved.year_cool', unit: 'kWh' },
{ id: 218, type: 2, name: 'energy.saved.total_cool', unit: 'kWh'},
{ id: 220, type: 6, name: 'air.temperature.in.outdoor2', log: false, scale: -1, unit: '°C' },
{ id: 221, type: 6, name: 'air.humidity.in.supply2', log: false, scale: -1, unit: '°C' },
{ id: 225, type: 1, name: 'override.humidity' }, // 2 = override, 1 = auto
{ id: 226, type: 2, name: 'fan.out.flow2', unit: 'm³/h', log: false },
{ id: 227, type: 1, name: 'bypass.value', unit: '%'},
{ id: 274, type: 6, name: 'air.temperature.out.extract', scale: -1, unit: '°C'},
{ id: 275, type: 6, name: 'air.temperature.out.exhaust', scale: -1, unit: '°C'},
{ id: 276, type: 6, name: 'air.temperature.in.outdoor', scale: -1, unit: '°C'},
{ id: 278, type: 6, name: 'air.temperature.in.supply', scale: -1, unit: '°C'},
{ id: 290, type: 1, name: 'air.humidity.out.extract', unit: '%'},
{ id: 291, type: 1, name: 'air.humidity.out.exhaust', unit: '%'},
{ id: 292, type: 1, name: 'air.humidity.in.outdoor', unit: '%'},
{ id: 294, type: 1, name: 'air.humidity.in.supply', unit: '%'},
{ id: 338, type: 3, name: 'bypass.mode' }, // 0= AUTO, 1 = ON, 2 = OFF
{ id: 784, type: 1, name: 'compressor.state', log: false },
{ id: 224, type: 1, name: undefined },
{ id: 401, type: 1, name: undefined },
{ id: 33, type: 1, name: undefined },
{ id: 321, type: 2, name: undefined },
{ id: 337, type: 3, name: undefined },
{ id: 37, type: 1, name: undefined },
{ id: 325, type: 2, name: undefined },
{ id: 53, type: 1, name: undefined },
{ id: 85, type: 3, name: undefined },
{ id: 341, type: 3, name: undefined },
{ id: 87, type: 3, name: undefined },
{ id: 71, type: 1, name: undefined },
{ id: 176, type: 1, name: undefined },
{ id: 386, type: 0, name: undefined },
{ id: 402, type: 0, name: undefined },
{ id: 419, type: 0, name: undefined },
{ id: 210, type: 0, name: undefined },
{ id: 211, type: 0, name: undefined },
{ id: 369, type: 1, name: undefined },
{ id: 370, type: 1, name: undefined },
{ id: 371, type: 1, name: undefined },
{ id: 372, type: 1, name: undefined },
{ id: 345, type: 3, name: undefined },
{ id: 89, type: 3, name: undefined },
{ id: 73, type: 1, name: undefined },
{ id: 57, type: 1, name: undefined },
{ id: 42, type: 1, name: undefined },
{ id: 330, type: 2, name: undefined },
{ id: 58, type: 1, name: undefined },
{ id: 74, type: 1, name: undefined },
{ id: 90, type: 3, name: undefined },
{ id: 346, type: 3, name: undefined },
{ id: 228, type: 1, name: undefined },
{ id: 219, type: 2, name: undefined },
{ id: 400, type: 6, name: undefined },
{ id: 384, type: 6, name: undefined },
{ id: 418, type: 1, name: undefined },
{ id: 416, type: 6, name: undefined },
{ id: 417, type: 6, name: undefined },
{ id: 802, type: 6, name: undefined },
{ id: 230, type: 8, name: undefined, decode: function(o, val) {
// Passive temperature 00 08 00 02 00 20 00 00 - 35184405645312n
// OK 00 00 00 00 00 00 00 00 - 0n
// Rampup 02 00 00 00 00 60 00 00 - 105553116266498n
// restriction 0a 00 00 00 00 60 00 00 - 105553116266506n
}},
}
Hello,
I used the previous version with openhab2.5 succesfully.
Now I upgraded to openhab3 and updated to the last version of comfoconnect.
I'm missing some setup details, how to get it going.
In the previous version there was an option -d to discover and need to change this info into the script.
Is there somewhere more information how to setup?
Kind regards, Hans
I am an owner of the Q600 and have a comfoconnect.
due to high gas pricing and coming winter season i expect a lot of people in the neigherhood who are going to use their fireplace. Sometimes (due to weather circumstances) polluted air is coming into the Zehnder.
I want to set an automation through a PM2.5 sensor to automatically set to exhaust only when there is a high PM2.5 level outside the house.
Is there a command to set this (i found ventilation mode supply only but this is the opposite).
Hi,
First, let me thank you for this wonderful library!
I have a Zehnder ComfoCool module connected to my Q600 ventilation unit.
Using the ComfoConnect LAN C with the official Zehnder app, I'm able to interact with this module also:
Is this something that can be added to the library? How can I help to reverse engineer the required commands?
Thanks!
Gert
Hello there,
I am currently investigating the RMI-Commands structure, because that is what primarily is usable via CAN. Is there still activity or interest in expanding this project?
I do not own a LAN bridge, but via CAN I am able to perform the RMI Commands just like you pass to the LAN bridge and receive answers.
What would be the preferred feature to look into?
pip will install protobuf 4.21+ to satisfy the requirement.
Unfortunately zehnder_pb2.py will no longer be compatible and needs to be recompiled (or the requirement needs to be set to <=3.20.
File "/home/vscode/.local/lib/python3.9/site-packages/pycomfoconnect/__init__.py", line 11, in <module>
from .comfoconnect import *
File "/home/vscode/.local/lib/python3.9/site-packages/pycomfoconnect/comfoconnect.py", line 7, in <module>
from .bridge import Bridge
File "/home/vscode/.local/lib/python3.9/site-packages/pycomfoconnect/bridge.py", line 5, in <module>
from .message import *
File "/home/vscode/.local/lib/python3.9/site-packages/pycomfoconnect/message.py", line 4, in <module>
from .zehnder_pb2 import *
File "/home/vscode/.local/lib/python3.9/site-packages/pycomfoconnect/zehnder_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/home/vscode/.local/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
Maybe you've already found that,
but yesterday I've seen that the PDID 226 changed after my Q350 detects more humidity and goes into "humidity control". (Comfort controls)
After a little of testing it seems that the value ist depending on which Mode you are.
Away: 0
Reduced: 100
Normal: 200
Intensive: 300
And in this modes the system can modulate.
My Q350 was in mode Normal (200) and leveled up the Airflow.
In this moment the PDID 226 shows 300 at the beginning and Reduced over time.
200 205 206 207 206 205 200 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 214 213 212 211 210 209 208 207 206 200
You have to read backwards.
At the same time the PDID 225 change from 1 to 2.
Maybe the 225 shows the reason for the modulation. (Comfort controls)
Hi Michaël,
do you happen to have an idea how to set the seconds for the fan next change? I believe this is used for the party mode and the vacation mode within the app. It would be cool if we could set it also it through the script. The default seems to be 7200 seconds (i.e. 2 hours).
Thanks for your code!
Hi,
Zehnder ComfoAirQ, installed via HACS
Version: a308546
I don't know if I'm the only one seeing this error in the home-assistant log.
Traceback (most recent call last):
File "/config/custom_components/comfoconnect/sensor.py", line 410, in _handle_update
self._attr_native_value = self.entity_description.mapping(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/comfoconnect/sensor.py", line 333, in <lambda>
mapping=lambda x: "" if x is None else x[0],
~^^^
IndexError: list index out of range
It seems everything is working fine, just putting the question here...
Indication of reoccurence:
2023-10-11 19:36:35.662 ERROR (SyncWorker_3) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-11 20:10:05.695 ERROR (SyncWorker_0) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 02:32:07.677 ERROR (SyncWorker_2) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 03:18:55.552 ERROR (SyncWorker_12) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 03:24:04.595 ERROR (SyncWorker_4) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 03:45:30.542 ERROR (SyncWorker_5) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 03:51:23.510 ERROR (SyncWorker_9) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 03:54:37.508 ERROR (SyncWorker_12) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 03:54:38.527 ERROR (SyncWorker_2) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 04:06:09.470 ERROR (SyncWorker_8) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 04:52:23.349 ERROR (SyncWorker_7) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 04:57:17.345 ERROR (SyncWorker_12) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 04:57:18.365 ERROR (SyncWorker_9) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:00:49.337 ERROR (SyncWorker_2) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:04:47.327 ERROR (SyncWorker_12) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:04:48.345 ERROR (SyncWorker_9) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:20:43.288 ERROR (SyncWorker_10) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:27:47.268 ERROR (SyncWorker_11) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:34:47.248 ERROR (SyncWorker_6) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:41:55.188 ERROR (SyncWorker_11) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:44:25.229 ERROR (SyncWorker_2) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:48:48.229 ERROR (SyncWorker_10) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 05:55:30.223 ERROR (SyncWorker_0) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 06:02:51.170 ERROR (SyncWorker_12) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 06:05:29.175 ERROR (SyncWorker_2) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 06:06:23.160 ERROR (SyncWorker_2) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 06:39:24.115 ERROR (SyncWorker_8) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 06:55:09.055 ERROR (SyncWorker_3) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 06:55:10.080 ERROR (SyncWorker_0) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 07:06:47.007 ERROR (SyncWorker_5) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 07:34:53.967 ERROR (SyncWorker_6) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:26:42.516 ERROR (SyncWorker_11) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:30:14.512 ERROR (SyncWorker_5) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:34:25.528 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:34:26.538 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:35:06.505 ERROR (SyncWorker_9) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:35:07.516 ERROR (SyncWorker_6) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:38:16.487 ERROR (SyncWorker_3) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:42:28.472 ERROR (SyncWorker_0) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 10:54:27.460 ERROR (SyncWorker_4) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 11:03:48.384 ERROR (SyncWorker_8) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 11:42:22.321 ERROR (SyncWorker_11) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 11:49:48.270 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 11:56:57.318 ERROR (SyncWorker_10) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 12:07:14.266 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 12:07:15.283 ERROR (SyncWorker_5) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 13:16:07.124 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 13:21:01.092 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
2023-10-12 13:21:07.108 ERROR (SyncWorker_1) [homeassistant.util.logging] Exception in _handle_update when dispatching 'comfoconnect_update_00000000001210138001144fd71e1811_230': ([],)
Hello, could you do a module to add data to mysql? I would like to save all the correct data (fan, temperature, humidity, bypass, energy) every one minute to the database. For now I am trying to understand your code but I am slowly going and would not want to lose history.
Can you create a new tag please?
According to PROTOCOL-PDO.md, away_indicator should be:
pdid | type | description |
---|---|---|
16 | 1 | Away indicator (01 = low, medium, high fan speed, 07 = away) |
but i get pdid 10040001 (16) with Four bytes of increasing data (type 3 CN_UINT32).
The data seems to be some sort of clock. Increasing by 60 every minute. Current value: 0x2985a3d6
Is this my mistake, or does anyone else got this?
My device is ComfoAir Q350 with firmware R1.7.1
I think there might be some mixup with the exhaust and supply values.
I have checked with the official Zehnder app, used its Unbalance setting and an anemometer that the values in the Zehnder app are actually the correct ones.
I use pycomfoconnect indirectly in Home Assistant, but I think, the mixup happens in the pycomfoconnect library, since HA imports all the static parameters.
exhaust_airflow and supply_airflow values are switched in HA compared to the values in the Zehnder app!
Can anyone confirm this?
Hi!
Thanks for the integration!
I cannot create a card allowing to change the fan speed in lovelace.
Interestingly, in HomePanel, such a card is cerated automaticaly.
The second issue - is it possible to switch the ventilation mode ?
Best regards!!
Yatsek
Hi,
here is a little hit.
Zehnder announced a public beta for a IoT-Cloud in december 2020.
This cloud contains some kind of API for integration into the SmartHome.
You can find more informations here:
When setting the pin to something like "0123", you will have to define that with quotes, otherwise Python will not accept this number.
File "./openhab_gw.py", line 18
pin = 0123 # Set PIN of vent unit !
^
SyntaxError: invalid token
If you put the pin as string, the library will fail to register the app:
subscriber connected
publisher connected
ERROR: Could not connect to the bridge.
I'm using the MQTT-bridge from here, but the example script example.py also fails.
I assume that the pin would be required to be converted into a number prior sending it to the Comfoconnect LAN C device.
In the smartphone app, for some functions (e.g. bypass) a duration time > 60min can be selected via dropdown.
from const.py:
CMD_BYPASS_ON = b'\x84\x15\x02\x01\x00\x00\x00\x00\ [ x10\x0e\ ] x00\x00\x01'
Where the section in [brackets] is seconds coded in int32LE:
h | sec | i32LE
1 3600 = 10 0e (currently hard-coded in comfoconnect->const)
2 7200 = 20 1c
3 10800 = 30 2a
4 14400 = 40 38
5 18000 = 50 46
6 21600 = 60 54
7 25200 = 70 62
8 28800 = 80 70
9 32400 = 90 7e
10 36000 = a0 8c
11 39600 = b0 9a
12 43200 = c0 a8
Replacing the section in brackets with different time parameters shows a result >1h in app (actually tested for 2h, 10h, and 12h).
The app provides [1h;2h;3h;6h;12h;24h) but different times also seem to work.
Request: add parameter to set a duration time for parameters supporting that.
Hi,
I have upgraded to 2024.1.1. I see these messages in the log
2024-01-08 11:00:40.078 WARNING (MainThread) [homeassistant.const] ENERGY_KILO_WATT_HOUR was used from comfoconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfEnergy.KILO_WATT_HOUR instead, please report it to the author of the 'comfoconnect' custom integration
2024-01-08 11:00:40.080 WARNING (MainThread) [homeassistant.const] POWER_WATT was used from comfoconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please report it to the author of the 'comfoconnect' custom integration
2024-01-08 11:00:40.081 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from comfoconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'comfoconnect' custom integration
2024-01-08 11:00:40.083 WARNING (MainThread) [homeassistant.const] TIME_DAYS was used from comfoconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTime.DAYS instead, please report it to the author of the 'comfoconnect' custom integration
2024-01-08 11:00:40.085 WARNING (MainThread) [homeassistant.const] VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR was used from comfoconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR instead, please report it to the author of the 'comfoconnect' custom integration
2024-01-08 11:00:40.086 WARNING (MainThread) [homeassistant.const] ELECTRIC_POTENTIAL_VOLT was used from comfoconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfElectricPotential.VOLT instead, please report it to the author of the 'comfoconnect' custom integration
Kind regards
Hello,
The preheater power is constant 146, while 128 is the power consumed only by ventilation
Hello,
I cannot connect to the bridge as long as I have the iOS application opened. I thought that in the past the script killed all other session. Thought the following line did it:
comfoconnect.connect(True) # Disconnect existing clients.
I have to close the iOS App to be able to connect through the script.
My setup:
Thanks for your help.
Cheers,
Johannes
Hi
I use comfoconnect via the home assistant integration. Looking at history graphs in home assistant, I realized that the values for all monitored sensors jumps to 0
regularly, about every 30 minutes:
(the irregularities are from me trying to debug the issue).
After enabling DEBUG logging, this is what I see:
2021-09-01 09:00:29 WARNING (Thread-4) [comfoconnect] THe connection was broken. We will try to reconnect later.
2021-09-01 09:00:34 INFO (Thread-18) [comfoconnect] Unhandled CnNodeNotificationType
2021-09-01 09:00:34 INFO (Thread-18) [comfoconnect] Unhandled CnNodeNotificationType
2021-09-01 09:00:34 INFO (Thread-18) [comfoconnect] Unhandled CnNodeNotificationType
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 65: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_6) [homeassistant.components.comfoconnect.fan] Handle update for fan speed (65): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 291: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_13) [homeassistant.components.comfoconnect.sensor] Handle update for sensor exhaust_humidity (291): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 192: 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 290: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_8) [homeassistant.components.comfoconnect.sensor] Handle update for sensor days_to_replace_filter (192): 0
2021-09-01 09:00:34 DEBUG (SyncWorker_8) [homeassistant.components.comfoconnect.sensor] Handle update for sensor current_humidity (290): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 120: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_14) [homeassistant.components.comfoconnect.sensor] Handle update for sensor air_flow_supply (120): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 274: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_4) [homeassistant.components.comfoconnect.sensor] Handle update for sensor current_temperature (274): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 119: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_12) [homeassistant.components.comfoconnect.sensor] Handle update for sensor air_flow_exhaust (119): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 275: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_1) [homeassistant.components.comfoconnect.sensor] Handle update for sensor exhaust_temperature (275): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 128: 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 292: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_3) [homeassistant.components.comfoconnect.sensor] Handle update for sensor power_usage (128): 0
2021-09-01 09:00:34 DEBUG (SyncWorker_6) [homeassistant.components.comfoconnect.sensor] Handle update for sensor outside_humidity (292): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 130: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_13) [homeassistant.components.comfoconnect.sensor] Handle update for sensor power_total (130): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 276: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_8) [homeassistant.components.comfoconnect.sensor] Handle update for sensor outside_temperature (276): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 294: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_14) [homeassistant.components.comfoconnect.sensor] Handle update for sensor supply_humidity (294): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 221: 0
2021-09-01 09:00:34 DEBUG (SyncWorker_4) [homeassistant.components.comfoconnect.sensor] Handle update for sensor supply_temperature (221): 0
2021-09-01 09:00:34 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 192: 43
2021-09-01 09:00:35 DEBUG (SyncWorker_12) [homeassistant.components.comfoconnect.sensor] Handle update for sensor days_to_replace_filter (192): 43
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 290: 60
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 120: 152
2021-09-01 09:00:35 DEBUG (SyncWorker_1) [homeassistant.components.comfoconnect.sensor] Handle update for sensor current_humidity (290): 60
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 119: 150
2021-09-01 09:00:35 DEBUG (SyncWorker_1) [homeassistant.components.comfoconnect.sensor] Handle update for sensor air_flow_supply (120): 152
2021-09-01 09:00:35 DEBUG (SyncWorker_1) [homeassistant.components.comfoconnect.sensor] Handle update for sensor air_flow_exhaust (119): 150
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 65: 2
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 291: 77
2021-09-01 09:00:35 DEBUG (SyncWorker_3) [homeassistant.components.comfoconnect.fan] Handle update for fan speed (65): 2
2021-09-01 09:00:35 DEBUG (SyncWorker_6) [homeassistant.components.comfoconnect.sensor] Handle update for sensor exhaust_humidity (291): 77
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 128: 51
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 292: 82
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 130: 181
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 294: 59
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 274: 223
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 275: 166
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 276: 152
2021-09-01 09:00:35 DEBUG (SyncWorker_13) [homeassistant.components.comfoconnect.sensor] Handle update for sensor power_usage (128): 51
2021-09-01 09:00:35 DEBUG (SyncWorker_7) [homeassistant.components.comfoconnect.sensor] Handle update for sensor outside_humidity (292): 82
2021-09-01 09:00:35 DEBUG (SyncWorker_8) [homeassistant.components.comfoconnect.sensor] Handle update for sensor power_total (130): 181
2021-09-01 09:00:35 DEBUG (SyncWorker_13) [homeassistant.components.comfoconnect.sensor] Handle update for sensor supply_humidity (294): 59
2021-09-01 09:00:35 DEBUG (Thread-18) [homeassistant.components.comfoconnect] Received update for 221: 219
2021-09-01 09:00:35 DEBUG (SyncWorker_9) [homeassistant.components.comfoconnect.sensor] Handle update for sensor current_temperature (274): 223
2021-09-01 09:00:35 DEBUG (SyncWorker_8) [homeassistant.components.comfoconnect.sensor] Handle update for sensor exhaust_temperature (275): 166
2021-09-01 09:00:35 DEBUG (SyncWorker_13) [homeassistant.components.comfoconnect.sensor] Handle update for sensor outside_temperature (276): 152
2021-09-01 09:00:35 DEBUG (SyncWorker_7) [homeassistant.components.comfoconnect.sensor] Handle update for sensor supply_temperature (221): 219
It looks like after a connection error, the first bunch of values received by the bridge are 0
, and the actual values are sent right after.
This makes it difficult to implement e.g. automations on the days_to_replace_filter
value. Also, the new energy dashboard in Home Assistant can't use power_total
as the value isn't strictly monotonic (it would interpret every 0 value as a reset, then on the next update think that the device used X kWh instantly (X being the total number of kWhs used by the device).
Does anybody else see this behavior?
Trying to think of work arounds, the pycomfoconnect could dismiss the first received value for each sensor after a reconnect (or even only dismiss it if it is 0
). If that is an acceptable solution, I can open a PR.
Hi, is there any way to change engineer settings via python?
I would like to change the setting for a fireplace.
In de Protocol the following request is mentioned: \x83\x15\x01\x05 but the comment states that some commands are missing to actually make it switch auto->manual.
Any clue as where to go from there?
I have tried toggling auto->manual from the android app and then tcpdumping the packets, but everything is TLS1.2 encrypted.
I'm working my way trought the provided information for use the provided example.
I've managed to use the zehnder.proto to get the ip address, uuid and version in visual studio code.
using command:
echo "data form wireshark here" | xxd -r -p | protoc --decode=RegisterAppRequest zehnder.proto
This responces with:
1: "192.168.4.136"
2: "\000\000\000\000\000\020\020\024\300\001\024O\327\036-\205" (this is the uuid)
3: 1
Now i want register my app using command: (below is from the provided documentation)
type: RegisterAppRequestType
reference: 15
uuid: "\251\226\031\002 \004Mh\240}\205\242\343\206o\312"
pin: 0
devicename: "Computer"
But how do i do this? I dont understand how i have to register my app, i don't know what command to type in visual studio code.
Other thing i'm missing is:
In the example.py the local_uuid = bytes.fromhex('00000000000000000000000000000005') this notation is different from the above given uuid,
How do i convert the "\000\000\000\000\000\020\020\024\300\001\024O\327\036-\205" to the format needed by te example.py
I've noticed 225
and 226
are related to the automatic mode.
My ventilation was running with a low fan speed, and in auto mode with humidity protection active.
Detected a high humidity (SENSOR mode active). The fan started spinning high.
225 = 2
226 = 300
Fell back to normal mode.
225 = 1
226 = 100
Hello, first of all thank you for the great project. I have been using it for about a year and it works well.
Unfortunately I don't get any data from the ComfoCool module. What would I have to adjust to get values from it too? The ComfoCool module module is also output in debug mode. I tried to adapt the NodeId in the source code, but unfortunately without success. Can you give me a little hint where adjustments need to be made?
Dont work at mi Pi3...
I have copy:
comfoconnect:
host: xxx.xxx.xx.xx
and
sensor:
to my configuration.yaml.
But follow message:
The following components and platforms could not be set up:
comfoconnect
comfoconnect.sensor
Please check your config.
Can you say step by step what i have to do please?
Anyone has already try to connect this unit with.
Some parameters changed, for example intake temp./hum. not the outdoor data. How to grab all dedicated data from this expansion module ?
I've seen that there have been some changes made over a year ago adding some preheater values, but those have not been release. Any chance of cutting v0.5 from current head?
The fix is probably in here: #21, but I still need to review this.
It seems to be based on Protocol Buffers.
When decompiling the Android APK, I've found a compiled Java file generated by protoc
. This file contained a binary representation of the protocol buffers source file.
By using this code, I could convert it to a .proto
file.
This file should contain most of the information needed to understand the protocol ComfoConnect is using. I've attached it to this issue.
Hello! I came across this repo while searching for ways to control my Zehnder ComfoAir Q350 with Apple HomeKit via a Homebridge plugin (which doesn't yet exist). It looks like you've cracked most of the controls of the unit which is great. I wonder if you've ever thought of porting it for any existing home automation platform like HomeKit or know any other way to do it? I haven't found anything apart from software able to connect via KNX but that looks way OTT for my simple needs. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.