Unfortunately I measured that the z-uno 2 needs 1sec for transmission time and Z-Wave operation. Only 4 sec is the device in sleep mode.
The Z-Uno 2 is peered with an Z Wave Controller (Aeotec).
Attached you can see the timing diagram of the Z Uno 2 device current. It is measured with an oscilloscope and a 1Ohm resister.
That is the sketch:
Code: Select all
byte counter = 1;
#define SLEEP_MODE SLEEP_MODE_EM4
#define WAKEUP_CUSTOM_INTERVAL 5 // Every 5 seconds
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_SLEEPING) // It's sleeping device
ZUNO_SETUP_CHANNELS(ZUNO_SWITCH_BINARY(counter, NULL));
void setup()
{
}
void loop()
{
if(zunoIsSleepLocked())
{
zunoSendReport(1); // Report will block sleep anyway
zunoSetCustomWUPTimer(WAKEUP_CUSTOM_INTERVAL);
zunoSendDeviceToSleep(SLEEP_MODE); // This just says I am ready but it doesn't stop usercode momentally & completely
// User sleep latch is opened
}
}