Time Based Actions

Post your questions and help other users.

Moderator: Martin

iomari
Posts: 15
Joined: 28 Jun 2017 01:57

Time Based Actions

Post by iomari » 17 Aug 2017 14:46

Greetings,
Why is it that my daily alarms that are set for 15 minute intervals on the hour (12:00, 12:15, 12:30, 12:45,etc) trigger at random times.
Sometimes they trigger on time and other times they can trigger in between time. Each trigger says the time (tts). The TTS says the current correct time which tells me that the TTS is not delayed.
Let me explain:
Instead of triggering at 2:00pm as scheduled, the alarm may trigger at 2:05 and the TTS will say "the time is 2:05pm".
I hope I'm clear.
So why does it not trigger on time as programmed.

Infinix Note 3 Pro
Nougat 7.0

User avatar
Desmanto
Posts: 2208
Joined: 21 Jul 2017 17:50

Re: Time Based Actions

Post by Desmanto » 17 Aug 2017 16:27

I have several flows also regarding this time trigger. It always execute flawlessly even when holiday (I am lazy to put the holiday condition check). I am on android LP 5.1.

When it triggerred at 2:05 pm, did the trigger also show 2:05 as the last execution time? If yes, most likely it is your doze which cause the problem. Please make sure you whitelist automagic and allow the trigger in doze. If the trigger is 2:00, then something wrong with the flow or your TTS, probably you should whitelist the TTS as well (I also whitelist my TTS from my built-in power saver manager).
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

iomari
Posts: 15
Joined: 28 Jun 2017 01:57

Re: Time Based Actions

Post by iomari » 17 Aug 2017 17:19

I'm on Nougat. I can't seem to find any Doze settings.. I remember using doze back when I was on kitkat.
The trigger time in the log reflects the actual time in which I hear the TTS.

User avatar
Desmanto
Posts: 2208
Joined: 21 Jul 2017 17:50

Re: Time Based Actions

Post by Desmanto » 17 Aug 2017 17:50

So it is the doze/power saver or whatever it is called at your phone. It is phone specific setting, so can't help much with that. You need to find system manager or any setting like that. Maybe asking at the infinix note 3 pro forum/thread for more information about how to set it.

Doze only introduced at Marshmallow 6.0+. At kitkat, maybe you use other power saver such as greenify.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

iomari
Posts: 15
Joined: 28 Jun 2017 01:57

Re: Time Based Actions

Post by iomari » 17 Aug 2017 18:28

Yes it was greenify when I was using kitkat.
On my nougat, automagic is not being optimized so that is not the problem.

User avatar
Martin
Posts: 4413
Joined: 09 Nov 2012 14:23

Re: Time Based Actions

Post by Martin » 17 Aug 2017 19:15

Hi,

Unfortunately some ROMs optimize battery use overly aggressive when the display is off so timer events requested by apps are not sent to the apps in time but delayed for several minutes. Samsung is doing this but some other manufacturers also do it.
Maybe you can find a setting in the system settings app to prevent that Automagic is affected by this "feature". If not, you could try option Like alarm clock in the trigger which should help on most ROMs. This has the side effect of displaying the alarm clock icon in the status bar.

Regards,
Martin

iomari
Posts: 15
Joined: 28 Jun 2017 01:57

Re: Time Based Actions

Post by iomari » 17 Aug 2017 19:43

The triggers I'm using for this function are: Power Source, Battery Level and Speech Output.
I don't see any option for "Like alarm clock".
What am i missing?

User avatar
Desmanto
Posts: 2208
Joined: 21 Jul 2017 17:50

Re: Time Based Actions

Post by Desmanto » 18 Aug 2017 05:20

Seems like we are not on the same page :)

You said that it is about time interval (Trigger Time or Period Timer), but then stating the trigger is Power Source? If trigger is Power Source, then of coz the behaviour follow the event on Power source (when you plugged in or unplugged, depends on the setting). Only Trigger Time and Period Timer has that option.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

iomari
Posts: 15
Joined: 28 Jun 2017 01:57

Re: Time Based Actions

Post by iomari » 18 Aug 2017 15:09

Don't mind me. I haven't had much sleep :D . That's the wrong flow I posted.
The flow I'm talking about is called sayCurrentTime which is a periodic timer and all 3 options in the bottom are on. Yet the flow still triggers late at least 50% of the time.

User avatar
Desmanto
Posts: 2208
Joined: 21 Jul 2017 17:50

Re: Time Based Actions

Post by Desmanto » 18 Aug 2017 16:30

Ok, so now we are on the same page again. :)

- First, you need to make sure automagic is not in the optimize/kill list. Make sure you whitelist it also. Some ROM will optimize everything if you don't put them in whitelist.
- Then if you have any kind of power saver, task killer, perfomance booster or any app like that, disable them first. Or better uninstall them. These apps tend to do more harm than the benefit they offer.
- Now, charge your phone till above 80%, or just leave it charged for the whole test.
- Set your screen timeout to never or as long as you have. If no option for more than 1 hour, use automagic action Set Screen timeout to 24 hours/never, execute it.

Open Automagic and leave it as that, never open other app, just leave automagic as foreground. So maybe you should try this when you don't use your phone during the time.
Enable the period timer for every 15 minutes (exactly as your original profile) and see if the flow late again or not.

If the experiment successful flawlessly, then you know something is drugging automagic to sleep at the background when the it is not foreground app.

Try again now, reduce the interval to 5 minutes or even 1 minute. Leave the screen on, but switch to home screen (automagic is not foreground anymore). Try to see if it is late.
Try again, same interval 15, 5 and 1 minute, but with screen off, with automagic still on foreground before you lock the screen. Try also with screen off and automagic not foreground.

If waiting too long for the TTS speech is too boring, you can just use action write log or Write to File, Append; put down the {triggertime} and some global variable as counter. Increment the GloVar, so you know at which number it started to be late. You can reset the value manually (edit it back to 1) before starting another experiment.

After you find the cause or simply want to pause the experiment, remember to set the timeout back to your original one.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), Resurrection Remix Official 7.0.2 20190829, Pie 9.0, Rooted.

Post Reply