This macro is used to add additional channels to the Z-Uno board, each of them for a separate function (i.e. 1st one is a dimmer, 2nd one is a temperature sensor, 3rd one is an open/close sensor, etc.).
Channel description array
This array should contain structures, each consists of the following items:
To make life easier there are simple macro defining popular types of channels: ZUNO_SWITCH_MULTILEVEL, ZUNO_SWITCH_BINARY, ZUNO_SENSOR_MULTILEVEL, ZUNO_SENSOR_BINARY, ZUNO_METER, ZUNO_BLINDS(), ZUNO_FLOWSTOP(), ZUNO_SIREN(), ZUNO_SWITCH_COLOR(), ZUNO_THERMOSTAT(), ZUNO_DOORLOCK() and many others defined in ZUNO_Definitions.h.
This macro hides behind itself an array in a code space of the Z-Uno module. On the start of the Sketch bootloader, if the device is not included in the network, the bootloader looks for this array, and if he founds it, then he configures channels of the device.
Z-Uno supports up to 10 channels
After changing numer of types of channels Z-Uno must be excluded and included back. Z-Uno will not adopt any channel type change without being excluded. (A debug configuration parameter can disable this restriction).
- Channel type (Switch Binary, Switch Multilevel, Sensor Binary, Sensor Multilevel, Meter, Siren , Blind, Flow Stop, Color, Door Lock, Thermostat)
- Channel parameter 1 (for sensors and meters it's type, for switches not used)
- Channel parameter 2 (for sensor Multilevel and Meter it's scale, precision and size combined in one byte)
- Channel setter function (a pointer to any user defined function, which is supposed to parse data, coming to the channel (i.e. for Switch Binary channel a command from another device, containing a new value (On/Off)).
- Channel getter function (a pointer to any user defined function, which is supposed to return current value for this channel (i.e. for Switch Binary channel request from another device of the current value of the channel (On/Off).
Get more information about Z-Wave.