UNPKG

lib-comfoair

Version:

Library to communicate with Zehnder ComfoAirQ ventilation unit through the ComfoControl gateway

266 lines (265 loc) 10.8 kB
import { PropertyDataType } from './deviceProperties'; export declare enum NodeTypes { VENTILATION_UNIT = 1, OPTION_BOX = 2, COMFOCONTROL_GATEWAY = 55 } export declare enum ErrorCodes { NO_ERROR = 0, UNKNOWN_COMMAND = 11, UNKNOWN_UNIT = 12, UNKNOWN_SUBUNIT = 13, UNKNOWN_PROPERTY = 14, TYPE_CANNOT_HAVE_RANGE = 15, VALUE_NOT_IN_RANGE = 30, PROPERTY_NOT_GETTABLE_OR_SETTABLE = 32, INTERNAL_ERROR = 40, INTERNAL_ERROR_COMMAND_WRONG = 41 } export interface NodeProperty { node: NodeTypes; unit: UnitTypes; /** * Defaults to 1 when not specified. */ subunit?: number; propertyId: number; dataType: PropertyDataType; access?: 'ro' | 'rw'; } /** * Enum representing different node types. */ export declare enum UnitTypes { /** NODE: Represents the general node with attributes like serial nr, etc. (1 SubUnit) */ NODE = 1, /** COMFOBUS: Unit responsible for comfobus-communication. Probably stores the ID's of connected devices. (1 SubUnit) */ COMFOBUS = 2, /** ERROR: Stores errors, allows errors to be reset (1 SubUnit) */ ERROR = 3, /** SCHEDULE: Responsible for managing Timers, the schedule, etc. Check here for level, bypass etc. (10 SubUnits) */ SCHEDULE = 21, /** VALVE: ??? Bypass PreHeater and Extract (2 SubUnits) */ VALVE = 22, /** FAN: Represents the two fans (supply, exhaust) (2 SubUnits) */ FAN = 23, /** POWERSENSOR: Counts the actual wattage of ventilation and accumulates to year and since factory reset (1 SubUnit) */ POWERSENSOR = 24, /** PREHEATER: Represents the optional preheater (1 SubUnit) */ PREHEATER = 25, /** HMI: Represents the Display + Buttons (1 SubUnit) */ HMI = 26, /** RFCOMMUNICATION: Wireless-communication with attached devices (1 SubUnit) */ RFCOMMUNICATION = 27, /** FILTER: Counts the days since last filter change (1 SubUnit) */ FILTER = 28, /** TEMPHUMCONTROL: Controls the target temperature, if its cooling or heating period and some settings (1 SubUnit) */ TEMPHUMCONTROL = 29, /** VENTILATIONCONFIG: Responsible for managing various configuration options of the ventilation (1 SubUnit) */ VENTILATIONCONFIG = 30, /** NODECONFIGURATION: Manages also some options (1 SubUnit) */ NODECONFIGURATION = 32, /** TEMPERATURESENSOR: Represents the 6 temperature sensors in the ventilation (6 SubUnits) */ TEMPERATURESENSOR = 33, /** HUMIDITYSENSOR: Represents the 6 humidity sensors (6 SubUnits) */ HUMIDITYSENSOR = 34, /** PRESSURESENSOR: Represents both pressure sensors (2 SubUnits) */ PRESSURESENSOR = 35, /** PERIPHERALS: Stores the ID of the ComfoCool attached, can reset peripheral errors here (1 SubUnit) */ PERIPHERALS = 36, /** ANALOGINPUT: Provides data and functionality for the analog inputs, also the scaling for the voltages (4 SubUnits) */ ANALOGINPUT = 37, /** COOKERHOOD: "Dummy" unit, probably represents the ComfoHood if attached (1 SubUnit) */ COOKERHOOD = 38, /** POSTHEATER: Represents the optional post heater attached (temperature sens, config) (1 SubUnit) */ POSTHEATER = 39, /** COMFOFOND: "Dummy" unit, represents the optional comfofond (1 SubUnit) */ COMFOFOND = 40 } /** * Known properties of each subunit. */ export declare const VentilationUnitProperties: { readonly NODE: { readonly SERIAL_NUMBER: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODE; readonly propertyId: 4; readonly dataType: PropertyDataType.CN_STRING; readonly access: "ro"; }; readonly FIRMWARE_VERSION: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODE; readonly propertyId: 6; readonly dataType: PropertyDataType.CN_UINT32; readonly access: "ro"; }; readonly MODEL_NUMBER: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODE; readonly propertyId: 8; readonly dataType: PropertyDataType.CN_STRING; readonly access: "ro"; }; readonly ARTICLE_NUMBER: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODE; readonly propertyId: 11; readonly dataType: PropertyDataType.CN_STRING; readonly access: "ro"; }; readonly CURRENT_COUNTRY: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODE; readonly propertyId: 13; readonly dataType: PropertyDataType.CN_STRING; readonly access: "ro"; }; readonly VENTILATION_UNIT_NAME: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODE; readonly propertyId: 20; readonly dataType: PropertyDataType.CN_STRING; readonly access: "ro"; }; }; readonly TEMPHUMCONTROL: { readonly RMOT_HEATING_PERIOD: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 2; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly RMOT_COOLING_PERIOD: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 3; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly PASSIVE_TEMPERATURE_CONTROL: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 4; readonly dataType: PropertyDataType.CN_UINT8; readonly access: "rw"; }; readonly HUMIDITY_COMFORT_CONTROL: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 6; readonly dataType: PropertyDataType.CN_UINT8; readonly access: "rw"; }; readonly HUMIDITY_PROTECTION: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 7; readonly dataType: PropertyDataType.CN_UINT8; readonly access: "rw"; }; readonly TARGET_TEMPERATURE_HEATING: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 10; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly TARGET_TEMPERATURE_NORMAL: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 11; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly TARGET_TEMPERATURE_COOLING: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.TEMPHUMCONTROL; readonly propertyId: 12; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; }; readonly VENTILATIONCONFIG: { readonly VENTILATION_SPEED_AWAY: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 3; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly VENTILATION_SPEED_LOW: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 4; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly VENTILATION_SPEED_MEDIUM: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 5; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly VENTILATION_SPEED_HIGH: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 6; readonly dataType: PropertyDataType.CN_INT16; readonly access: "rw"; }; readonly HEIGHT_ABOVE_SEA_LEVEL: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 7; readonly dataType: PropertyDataType.CN_UINT8; }; readonly VENTILATION_CONTROL_MODE: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 9; readonly dataType: PropertyDataType.CN_UINT8; }; readonly BATHROOM_SWITCH_ACTIVATION_DELAY: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 11; readonly dataType: PropertyDataType.CN_INT16; }; readonly BATHROOM_SWITCH_DEACTIVATION_DELAY: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 12; readonly dataType: PropertyDataType.CN_UINT8; }; readonly BATHROOM_SWITCH_MODE: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 13; readonly dataType: PropertyDataType.CN_UINT8; }; readonly UNBALANCE: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.VENTILATIONCONFIG; readonly propertyId: 18; readonly dataType: PropertyDataType.CN_INT16; }; }; readonly NODECONFIGURATION: { readonly MAINTAINER_PASSWORD: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODECONFIGURATION; readonly propertyId: 3; readonly dataType: PropertyDataType.CN_STRING; }; readonly ORIENTATION: { readonly node: NodeTypes.VENTILATION_UNIT; readonly unit: UnitTypes.NODECONFIGURATION; readonly propertyId: 4; readonly dataType: PropertyDataType.CN_UINT8; }; }; };