Odd delay times with Delay blocks.

50 views
Skip to first unread message

mike.g...@gmail.com

unread,
May 7, 2021, 11:59:00 AM5/7/21
to Automate
Hi.

I had recently been having an issue with high battery usage which appears to be resolved but this led me to look in greater detail and some of my logs and I find that recently I appear to be getting very unpredictable delays from "Delay" blocks which I use to do things such as check that WiFi has activated before trying to use it..

Last night a 5 second delay block seems to have resulted in a delay before the next block was activated of 3 hrs and 28 minutes!  Another 15 second delay block resulted in a delay of 11 minutes.  This seems odd and resulted in the flow not doing what was intended.  The device concerned is using the "Timing accuracy workaround" set to "Alarm clock".

Looking at another device (also with the Timing accuracy workaround set to Alarm clock) I notice that there also, the delay blocks seems to be slightly unreliable, but that a few days ago it looked very accurate.  

A few days ago I had changed the "Wake up" action in the delay blocks.  Previously I had "Awake device" checked/active but now it is set to blank/inactive on the basis that nothing should need reawakening with only a 5 to 15 second delay.  However the latest results seem to be alarming and I am inclined to go back to activating "Awake device" on all my delay blocks.

Would anyone like to comment or give me some advice related to these odd and irritating delays?

Thanks for your time.

Mike

The Sys Eng

unread,
May 7, 2021, 1:54:36 PM5/7/21
to automa...@googlegroups.com
I've experienced extremely long delays myself. The Logs showed it stoped at the Delay block and would not continue after the set delay for some time. I have the block set to Exact and for 5 secs.  Exact should be just that, exact, not hours later.

Henrik "The Developer" Lindqvist

unread,
May 7, 2021, 4:53:54 PM5/7/21
to Automate
Using Proceed = Exact, "Awake device" option enabled, and "Timer accuracy workaround" set to "Alarm clock", is the only way to expect the best accuracy.
If it still isn't, then there's likely some "power save" feature interfering. Please read:

For short delays, a possible workaround may be to use the Device keep awake before he Wi-Fi check and Delay, then again after to allow sleep again.

Henrik "The Developer" Lindqvist

unread,
May 7, 2021, 4:56:29 PM5/7/21
to Automate
Nothing in Android is "exact" and usually never works as expected/documented.
Use Proceed = Exact, "Awake device" option enabled, and "Timer accuracy workaround" set to "Alarm clock.

Mike O

unread,
May 8, 2021, 8:24:49 AM5/8/21
to automa...@googlegroups.com
Thanks Henrik.

I ran the flow on two different devices last night having re-enabled "Device awake" and both seemed to run pretty accurately.  So that seems to be the solution.

I had already set Automate to not sleep and running the timer set hours ahead still seemed to be working well, so I don't think I will bother with bracketing things with "Device keep awake" at least for the time being.  ;-)

Excellent service as ever.

Many thanks.

Mike


--
You received this message because you are subscribed to a topic in the Google Groups "Automate" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/automate-user/89upy074VYQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/084bc0d0-8e0d-4ae7-9dd1-e0ada0abd087n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages