ZUNO_SETUP_SLEEPING_MODE()This macro defines how Z-Uno will manage power mode. It is very important to define correct mode because the behavior of the device changes dramatically depending on it. At the start, we recommend you to debug and develop your program using ZUNO_SLEEPING_MODE_ALWAYS_AWAKE mode, because that’s the easiest one.
If not specified in the project, ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE) is assumed. ZUNO_SETUP_SLEEPING_MODE(mode) mode Mode to manage power There is only three possible values available:
- ZUNO_SLEEPING_MODE_ALWAYS_AWAKE — device is always awake, reachable and helps to form mesh network acting as router (default mode). Used for mains powered devices.
- ZUNO_SLEEPING_MODE_SLEEPING — device wakes up by user request (interrupt) or periodically and does not help to form mesh. Used for battery powered devices.
- ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE — device wakes up by user request (interrupt) and regularly listening for packets (in Z-Wave it is called FLiRS), always available but does not help to form mesh. Used for battery powered devices.
Get more information about Z-Wave.
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_SLEEPING); ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE); ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE);