@Lemme said:
Wondering if it is still limited to 8 seconds. Or if I have to do some sort of loop/counting to make it sleep for several minutes or more
If you need longer intervals, you should use SLEEP_FOREVER
and attach a Timer interrupt beforehand. Pseudocode would look like this:
loop(){
...
attachInterrupt(Timer1, 600000, dummy_function) // wake up every 10 minutes
gw.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF)
detachInterrupt(Timer1) // disable so we don't interrupt ourselves
.... do things, send data, and so on ......
}
void dummy_function(){
// this does nothing, but interrupt need something to call, so we make a dummy function
// this will return immediately to the loop() again
}
This is best-practise for things that are not real-time-based (like encoder wheels). Using the normal loop makes it possible to use all the millis() and other time-based functions you wouldn't be able to use withing interrupt calls.
By the way - in YOUR case, when you don't want to receive anything on the sensor node while sleeping, using the MySensors Sleep function is perfectly fine. This thread focuses on using it with other interrupts than Timers.