ZUNO_DOORLOCK()

This macro is used to setup binary switch channel of type door lock for Z-Uno board using ZUNO_SETUP_CHANNELS. Door lock requires security. It will work only if included securely in your Z-Wave controller (see Security section). ZUNO_DOORLOCK(getter, setter) getter pointer to a user defined function, which is supposed to return current value for this channel. setter pointer to a user defined function, which is called when new value is received for this channel. Functions getter should return 0 for Closed and any non-zero value for Open BYTE getter(void) Functions setter accepts next values:
  • 0 for closed
  • 1-99 for open
  • >=100 - reserved value
void setter(BYTE value) Channel generated using this macro will have Z-Wave Device Class GENERIC_TYPE_ENTRY_CONTROL / SPECIFIC_TYPE_DOOR_LOCK with Switch Binary Command Class. You can make a battery power door lock using FLiRS power mode (see ZUNO_SETUP_SLEEPING_MODE). This type is allowed only in ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE and ZUNO_SLEEPING_MODE_ALWAYS_AWAKE power mode (see ZUNO_SETUP_SLEEPING_MODE).
        ZUNO_SETUP_CHANNELS(ZUNO_DOORLOCK(getterFunction, setterFunction));
           
void setup() {
    ...
}

void loop() {
    ...
}

BYTE getterFunction() {
    return currentValue;
}

void setterFunction(BYTE newValue) {
    ...
}