ZUNO_SENSOR_BINARY()

This macro is a generic macro to be used to setup binary sensor channel for Z-Uno board using ZUNO_SETUP_CHANNELS. Instead we suggest to use one of the specific macro ZUNO_SENSOR_BINARY_* from the list below. This type (and 3 other) affects only the display on the controller. ZUNO_SENSOR_BINARY(type, getter) type type of channel like ZUNO_SENSOR_BINARY_TYPE_DOOR, ZUNO_SENSOR_BINARY_TYPE_SMOKE,.. etc. Used to correctly display the sensor in the Z-Wave controller. Full list is defined in ZUNO_Definitions.h and starts with ZUNO_SENSOR_BINARY_TYPE_ getter pointer to a user defined function, which is supposed to return current value for this channel. Functions getter should return 0 for non-triggered state and any non-zero for triggered state. BYTE getter(void) Channel generated using this macro will have Z-Wave Device Class GENERIC_TYPE_SENSOR_NOTIFICATION / SPECIFIC_TYPE_NOTIFICATION_SENSOR with Notification and Sensor Binary (for legacy suport) Command Classes.
           ZUNO_SETUP_CHANNELS(ZUNO_SENSOR_BINARY(ZUNO_SENSOR_BINARY_TYPE_SMOKE, getterFunction));
           
void setup() {
    ...
}

void loop() {
    ...
}

byte getterFunction() {
    return currentValue;
}
        
    
Popular sensor types have pre-defined macro. Few are listed below. Full list is defined in ZUNO_Definitions.h file and starts with ZUNO_SENSOR_BINARY_ ZUNO_SENSOR_BINARY_GENERAL_PURPOSE(getter)
ZUNO_SENSOR_BINARY_SMOKE(getter)
ZUNO_SENSOR_BINARY_CO(getter)
ZUNO_SENSOR_BINARY_CO2(getter)
ZUNO_SENSOR_BINARY_HEAT(getter)
ZUNO_SENSOR_BINARY_WATER(getter)
ZUNO_SENSOR_BINARY_FREEZE(getter)
ZUNO_SENSOR_BINARY_TAMPER(getter)
ZUNO_SENSOR_BINARY_DOOR_WINDOW(getter)
ZUNO_SENSOR_BINARY_MOTION(getter)
ZUNO_SENSOR_BINARY_GLASSBREAK(getter)