|Zweck / Funktion|
|Extract information and control the ventilation devices ComfoAir from Zehnder, WHR930 from StorkAir, G90-380 from Wernig and Santos 370 DC from Paul|
|Dokumentation||EN / DE|
|Ersteller||StefanStrobel (Forum / Wiki)|
The ComfoAir module communicates with ComfoAir ventilation systems from Zehnder, especially the ComfoAir 350 (CA350) connected via serial line to the FHEM computer.
Many other ventilation systems use the same communication device and protocol, e.g. WHR930 from StorkAir, G90-380 from Wernig and Santos 370 DC from Paul. They can be controlled with this module as well.
This module is based on the protocol description at http://www.see-solutions.de/sonstiges/Protokollbeschreibung_ComfoAir.pdf, fixes some small erorrs in this protocol description and copies some ideas from earlier modules for the same devices that were posted in the FHEM forum from danhauck(Santos) and Joachim (WHR962).
The module can be used in two ways depending on how FHEM and / or a vendor supplied remote control device like CC Ease or CC Luxe are connected to the system. If a remote control device is connected it is strongly advised that FHEM does not send data to the ventilation system as well and only listens to the communication between the vendor equipment.
The RS232 interface used is not made to support more than two parties communicating and connecting FHEM in parallel to a CC Ease or similar device can lead to collisions when sending data which can corrupt the ventilation system. If connected in parallel, FHEM should only passively listen and <Interval> is to be set to 0. If no remote control device is connected to the ventilation systems then FHEM has to take control and actively request data in the interval to be defined. Otherwiese FHEM will not see any data. In this case FHEM can also send commands to modify settings.
The module has been checked in
This module requires the Device::SerialPort or Win32::SerialPort module.
define <name> ComfoAir <device> <Interval>
The module connects to the ventilation system through the given serial device and either passively listens to data that is communicated between the ventialation system and its remote control device (e.g. CC Luxe) or it actively requests data from the ventilation system every <Interval> seconds
define ZL ComfoAir /dev/ttyUSB1@9600 60
Configuration of the module
apart from the serial connection and the interval which both are specified in the define command there are several attributes that can optionally be used to modify the behavior of the module. The module internally gives names to all the protocol messages that are defined in the module and these names can be used in attributes to define which requests are periodically sent to the ventilation device. The same names can also be used with set commands to manually send a request. Since all messages and readings are generically defined in a data structure in the module, it should be quite easy to add more protocol details if needed without programming.
The names currently defined are:
Bootloader-Version Firmware-Version RS232-Modus Sensordaten KonPlatine-Version Verzoegerungen Ventilation-Levels Temperaturen Betriebsstunden Status-Bypass Status-Vorheizung
The attributes that control which messages are sent / which data is requested every <Interval> seconds are:
poll-Bootloader-Version poll-Firmware-Version poll-RS232-Modus poll-Sensordaten poll-KonPlatine-Version poll-Verzoegerungen poll-Ventilation-Levels poll-Temperaturen poll-Betriebsstunden poll-Status-Bypass poll-Status-Vorheizung
if the attribute is set to 1, the corresponding data is requested every <Interval> seconds. If it is set to 0, then the data is not requested. by default
Status-Bypass are requested if no attributes are set.
define ZL ComfoAir /dev/ttyUSB1@9600 60 attr ZL poll-Status-Bypass 0 define FileLog_Lueftung FileLog ./log/Lueftung-%Y.log ZL
like with the attributes mentioned above, set commands can be used to send a request for data manually. The following set options are available for this:
request-Status-Bypass request-Bootloader-Version request-Sensordaten request-Temperaturen request-Firmware-Version request-KonPlatine-Version request-Ventilation-Levels request-Verzoegerungen request-Betriebsstunden request-Status-Vorheizung
additionally important fields can be modified with set:
Temp_Komfort (target temperature for comfort) Stufe (ventilation level)
All readings that are derived from the responses to protocol requests are also available as Get commands. Internally a Get command triggers the corresponding request to the device and then interprets the data and returns the respective field value. To avoid huge option lists in FHEMWEB, only the most important Get options are visible in FHEMWEB. However this can easily be changed since all the readings and protocol messages are internally defined in the modue in a data structure and to make a Reading visible as Get option only a little option (e.g.
showget => 1 has to be added to this data structure
The readings created by this module might look like this:
- if any of these attributes are set to 1 the module includes a request for the data belonging to the named group when sending requests every <interval> seconds
- if set to 1 the module prevents readings of the named group from being created even if used passively without polling and an external remote control requests this data. Please note that this attribute doesn't delete already existing readings.
- modify the delay used when sending requests to the device from the internal queue, defaults to 1 second
- max length of the send queue, defaults to 50
- set the timeout for reads, defaults to 2 seconds