Open jakubjakubik opened 3 years ago
Update: after having let it run overnight, I've got all 5 temperature/humidity sensors and the filter lifetime counter. Haven't seen the fan operating mode yet - got the speeds/percents though.
I guess what I'm trying to accomplish is to be able to request all the interesting values upon restart and periodically every ~hour + the fan setting more often/on every update.
Hi!
First and most important: There are the old ComfoAir's (without Q) which are addressed via Serial Communication - the ca350 file you mentioned is using the serial console, and the new ComfoAirs (with Q - Q600 f.e.) communicate using ComfoNet / CAN. To help you the best, you should mention which model you use and how your system is setup.
Secondly, usually the PDO's are transmitted after each update, and for some periodically. If you use the Q series and are able to use cansend/candump, try the following commands. They cansend the request message (RTR) on the correct PDO id to can1. When the ventilation receives this message, it 'answers'/sends the PDO requested.
/usr/bin/cansend can1 00400041#R
/usr/bin/cansend can1 00404041#R
/usr/bin/cansend can1 00808041#R
/usr/bin/cansend can1 0080c041#R
/usr/bin/cansend can1 00810041#R
/usr/bin/cansend can1 00814041#R
/usr/bin/cansend can1 00818041#R
/usr/bin/cansend can1 00604041#R
/usr/bin/cansend can1 00820041#R
/usr/bin/cansend can1 00824041#R
/usr/bin/cansend can1 00828041#R
/usr/bin/cansend can1 0082c041#R
/usr/bin/cansend can1 00040041#R
/usr/bin/cansend can1 00444041#R
/usr/bin/cansend can1 00048041#R
/usr/bin/cansend can1 0044c041#R
/usr/bin/cansend can1 00450041#R
/usr/bin/cansend can1 00454041#R
/usr/bin/cansend can1 00458041#R
/usr/bin/cansend can1 00084041#R
/usr/bin/cansend can1 00488041#R
/usr/bin/cansend can1 0048c041#R
/usr/bin/cansend can1 00490041#R
/usr/bin/cansend can1 00494041#R
/usr/bin/cansend can1 00498041#R
/usr/bin/cansend can1 000c4041#R
/usr/bin/cansend can1 0081c041#R
/usr/bin/cansend can1 004c4041#R
/usr/bin/cansend can1 004c8041#R
/usr/bin/cansend can1 00804041#R
/usr/bin/cansend can1 000e0041#R
/usr/bin/cansend can1 00104041#R
/usr/bin/cansend can1 00108041#R
/usr/bin/cansend can1 0010c041#R
/usr/bin/cansend can1 00120041#R
/usr/bin/cansend can1 00544041#R
/usr/bin/cansend can1 00148041#R
/usr/bin/cansend can1 0014c041#R
/usr/bin/cansend can1 00150041#R
/usr/bin/cansend can1 00154041#R
/usr/bin/cansend can1 00158041#R
/usr/bin/cansend can1 0015c041#R
/usr/bin/cansend can1 00160041#R
/usr/bin/cansend can1 00180041#R
/usr/bin/cansend can1 00184041#R
/usr/bin/cansend can1 00188041#R
/usr/bin/cansend can1 00560041#R
/usr/bin/cansend can1 00044041#R
/usr/bin/cansend can1 00448041#R
/usr/bin/cansend can1 005c4041#R
/usr/bin/cansend can1 005c8041#R
/usr/bin/cansend can1 005cc041#R
/usr/bin/cansend can1 005d0041#R
/usr/bin/cansend can1 001d4041#R
/usr/bin/cansend can1 001d8041#R
/usr/bin/cansend can1 001dc041#R
/usr/bin/cansend can1 001e0041#R
/usr/bin/cansend can1 001e4041#R
/usr/bin/cansend can1 001e8041#R
/usr/bin/cansend can1 00200041#R
/usr/bin/cansend can1 00204041#R
/usr/bin/cansend can1 00208041#R
/usr/bin/cansend can1 10040041#R
/usr/bin/cansend can1 00640041#R
/usr/bin/cansend can1 00244041#R
/usr/bin/cansend can1 00648041#R
/usr/bin/cansend can1 00644041#R
/usr/bin/cansend can1 00688041#R
/usr/bin/cansend can1 001cc041#R
/usr/bin/cansend can1 001d0041#R
/usr/bin/cansend can1 00248041#R
/usr/bin/cansend can1 00300041#R
/usr/bin/cansend can1 00484041#R
/usr/bin/cansend can1 00340041#R
/usr/bin/cansend can1 00344041#R
/usr/bin/cansend can1 00348041#R
/usr/bin/cansend can1 0034c041#R
/usr/bin/cansend can1 00350041#R
/usr/bin/cansend can1 00354041#R
/usr/bin/cansend can1 00358041#R
/usr/bin/cansend can1 0035c041#R
/usr/bin/cansend can1 00360041#R
/usr/bin/cansend can1 00364041#R
/usr/bin/cansend can1 00368041#R
/usr/bin/cansend can1 0036c041#R
/usr/bin/cansend can1 00370041#R
/usr/bin/cansend can1 00374041#R
/usr/bin/cansend can1 00378041#R
/usr/bin/cansend can1 00380041#R
/usr/bin/cansend can1 00384041#R
/usr/bin/cansend can1 00388041#R
/usr/bin/cansend can1 0038c041#R
/usr/bin/cansend can1 00390041#R
/usr/bin/cansend can1 00394041#R
/usr/bin/cansend can1 00398041#R
/usr/bin/cansend can1 00144041#R
/usr/bin/cansend can1 00240041#R
hi,
it's the Q 450 model, and I have the USB can converter connected. cansend needs the slcand daemon running and Marco's zcangate uses direct access to the serial port. The cansend commands return no output - even if I start slcand and point them to slcan0
However zcangate is able to successfully change the ventilation levels so it proves read/write operation.
It's true that I see the register values when they update, but this means I need to wait ~24h to see the filter days left for example - quite annoying after a reboot.
thanks!
The cansend command never returns something when you use it correctly - it does not know if, when or how an answer comes back from any device on the bus. You can however implement the requesting of the PDO's at the start, and calculate the ids on the fly. The ID is generated as follows: (PDO-ID) << 14 + (Node-ID) + 0x40, if that does not work, try (PDO-ID) << 14 + (Node-ID) + (Node-ID) << 6.
When I start the zcangate, I only get a few select values reported, namely:
Power_avoided_heating_actual Power_consumption_actual PresSens_exhaust PresSens_inlet air_humidity_inlet_after_recuperator air_humidity_inlet_before_preheater air_humidity_inlet_before_recuperator temperature_inlet_before_preheater temperature_inlet_before_recuperator ventilator air_volume input ventilator air_volume output ventilator power_percent input ventilator power_percent output ventilator speed input ventilator speed output z_Unknown_PostHeater_ThisYear z_Unknown_TempHumConf z_unknown_NwoNode
If I wait a bit longer, I sometimes see a few more.Testing around other tools, it seems like there is a way to actually poll for the data on the bus, as far as I understand it's happening here:
https://github.com/djwlindenaar/zcan/blob/master/testcan.py#L209
or here:
https://github.com/adorobis/hacomfoairmqtt/blob/master/src/ca350#L349
however I haven't had any luck with getting ca350 working.
Do you have any pointers how to adapt the request_tdpo function into your code? I'm having a hard time translating the CANbus packet that @djwlindenaar is using into what should land direct on the serial port, taking your conversion functions into account.
thanks!