Page 1 of 2
Which flow(s) eat my battery?
Posted: 06 Dec 2013 08:15
by kintrupf
Currently I have a rather alarming battery usage from Automagic:

- BatteryStat.jpg (13.6 KiB) Viewed 24524 times

- Automagic.jpg (10.56 KiB) Viewed 24524 times
So out of 6 hours Automagic kept my phone awake for far over 1 hour.
How can I identify the flow(s) that are responsible for that wake time? Sifting through the logs of all flows would be very, very tedious
Are there any "simple" stats on the flows? It would be nice to know on a glance how often a flow was was executed and how long that took.
Re: Which flow(s) eat my battery?
Posted: 06 Dec 2013 09:38
by Martin
There is a simple flow statistics available under Menu->Manage->About->Statistics. Watch out for a flow with a long total duration or a flow with a high count.
You can also use an app like
Wakelock Detector-Save Battery or
BetterBatteryStats to show the wake locks created by Automagic. Wake locks are usually named after the name of the trigger or the name of the flow that caused the wake lock.
Re: Which flow(s) eat my battery?
Posted: 06 Dec 2013 12:38
by kintrupf
You should place the statistics more prominently in the "Manage" menu instead of hiding it in the About dialog

Very useful info!
I found the culprit, it was a flow that uses the Sleep action (with allow device sleep) and a timeout of 5 minutes.
Does that mean that my phone (Nexus 4, KitKat) does not really
sleep while in a Sleep action?
Re: Which flow(s) eat my battery?
Posted: 06 Dec 2013 15:30
by Martin
Action
Sleep without
Keep device awake should not cause this. Please send the flow to
info@automagic4android.com so I can check if there is a bug in Automagic.
Note that the duration in the statistics will show the real duration it took to execute the flow from start to end. It does not consider whether the flow keeps the device awake for the whole time or not so the statistics will only give a rough idea which flow might be the culprit.
For example this flow:
-trigger ...
-action Sleep: 5m (allow device sleep)
Executing the flow once will show a duration of ~5m in the statistics. The wake lock detector apps will show that the the flow keeps the device awake for just a few seconds.
Re: Which flow(s) eat my battery?
Posted: 07 Dec 2013 00:17
by colabi
Same problem here starting with EAP version 1.20.0-dev

- 2013-12-07-02-09-25.jpg (180.13 KiB) Viewed 24509 times

- 2013-12-07-02-09-32.jpg (178.32 KiB) Viewed 24509 times
Re: Which flow(s) eat my battery?
Posted: 07 Dec 2013 14:16
by Martin
Did you add new flows when you switched to version 1.20?
Could you please use one of the wake lock detector apps to check which feature or flow is causing this:
Google Play: Wakelock Detektor-Save Battery
After installing the app you can click on the row with Automagic Premium to show the green detail section. It should show the name of the flow or the name of the trigger that's causing the problem.
Thanks & regards
Martin
Re: Which flow(s) eat my battery?
Posted: 07 Dec 2013 18:09
by colabi
Hi Martin, no new flows; this is what I get with Wakelock Detector-Save Battery:

- 2013-12-07-20-03-27.jpg (301.6 KiB) Viewed 24499 times
What
*overflow* mean?
Re: Which flow(s) eat my battery?
Posted: 08 Dec 2013 09:41
by Martin
When an app uses more than 30 distinct wake lock names Android starts to group the wake locks under the name *overflow* (I'm not sure if it's 30 on every version of Android).
Unfortunately, the wake lock causing the problem falls into this *overflow* group. There's not much one can do about this other than restarting the device to reset the statistics, see if the problem arises again and to check the statistics again. You might have to disable some flows and repeat this process when the rogue wake lock always falls into the *overflow* group.
Are you using flows which take a long time to execute, for example flows containing loops or some of the sensor triggers like 'Shake'?
Regards,
Martin
Re: Which flow(s) eat my battery?
Posted: 10 Dec 2013 08:17
by kintrupf
This is really weird! After resetting all statistics I got this:

- BatteryUsage.jpg (111.21 KiB) Viewed 24478 times
So out of 13 1/2 hours on Battery AutoMagic kept my phone awake for nearly 5 hours!
The total combined running time of all my flows in that time was only around 20 minutes, and most of that time were Sleep actions (with deep sleep).
So what is using the battery?
BetterBetteryStats doesn't reveal anything (to me) and Wakelock Detector does not (yet) work on KitKat, though I'm working on it.
Nexus 4 with KitKat, AutoMagic 1.20 dev. No new flows added for a while.
Re: Which flow(s) eat my battery?
Posted: 10 Dec 2013 17:06
by Martin
Hmm, the flow statistics look OK to me.
Is there anything showing in BetterBatteryStats when you change the first dropdown to 'Partial Wakelocks'? Could you please post a screenshot?