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.
FLiRS — Frequently Listening Routing Slaves - the device periodically quits the sleeping mode on a short period and checks, whether send to it any message. If no packets for it on air are present, the device right there passes into the sleeping mode. Awakening interval 250ms or 1s.
If device is in sleeping mode, the USB port is not available for uploading new sketch. Device should be woken up or turned into rescue mode before uploading new sketch. After changing sleeping mode Z-Uno must be excluded and included back. Z-Uno will not adopt sleeping mode change without being excluded. (A debug configuration parameter can disable this restriction).
Get more information about Z-Wave.