vekexasia / comfoairq-mqtt

Comfoair Q 350 <-> MQTT integration in Node.JS
20 stars 5 forks source link

unable to write ComfoAir #7

Open samezrp opened 1 year ago

samezrp commented 1 year ago

Hi, At the beginning big thanks for your soft! I would like to ask you for help. For the first time I installed it all was OK. Someday I realized that I cannot send any message to recuperator. I receive all data correctly. See example:

Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/ah_actual', ... (4 bytes)) 6.37 Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/exhaust_fan_speed', ... (4 bytes)) 2239 Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/next_fan_change', ... (5 bytes)) 11459 Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/supply_fan_flow', ... (3 bytes)) 126

However I want to send anything like:

Client null received PUBLISH (d0, q0, r0, m0, 'comfoair/commands/ventilation_level_3', ... (1 bytes)) 0

Nothing happens. I was suspecting some HW errors but with: /djwlindenaar/zcan I can send messages to my AerisNEXT, but with your soft looks like there is no communication when I try to send anything, at least it is not understandable. When I click to send MQTT message on PM2 I receive following log:

0|comfoair_mqttbridge | canID addr: 1f054051 0|comfoair_mqttbridge | T1F05405180084150101000000 0|comfoair_mqttbridge | T1F054051781000100000003 0|comfoair_mqttbridge | received reply 0|comfoair_mqttbridge | received reply line: <Buffer 5a> 0|comfoair_mqttbridge | received reply 0|comfoair_mqttbridge | received reply line: <Buffer 5a> 0|comfoair_mqttbridge | canID addr: 1f074051 0|comfoair_mqttbridge | T1F07405180084150101000000 0|comfoair_mqttbridge | T1F074051781000100000003 0|comfoair_mqttbridge | received reply 0|comfoair_mqttbridge | received reply line: <Buffer 5a> 0|comfoair_mqttbridge | received reply 0|comfoair_mqttbridge | received reply line: <Buffer 5a>

but nothing changes, no boost, no ventilation level change. Would you mind helping me what else should i check or test? This is console at the moment I clicked Boost 60 mode: image

Below there is /zcan log setting boost 60:

~/djwlindenaar/zcan$ ./slcan_boost_60 Received: can_id=144061, can_dlc=4, data=b'\xe6(\x00\x00' Received: can_id=1e8061, can_dlc=2, data=b'U\x04' Received: can_id=4c4061, can_dlc=2, data=b'\x0f\x00' Received: can_id=1d4061, can_dlc=1, data=b';' Received: can_id=1e4061, can_dlc=2, data=b'\xd3\x08' Received: can_id=10000021, can_dlc=0, data=b'' 0X0021 1F015851#0084150106000000 1F015851#8100100E000000 Reply: 0X1F001461

samezrp commented 1 year ago

I managed to find a root cause and temporary solution, however it is not a nice one.

Problem was with dstAddr variable, which in vekexasia sources is defined as a const = 1 in index.js, line 86. In djwlindenaar solution this variable is handled by zcanbridge.py, line 66, as a part of cansocket variable, and in my case it was 0x21. I changed to const=0x21 and it is working.