Which flow(s) eat my battery?

Post your questions and help other users.

Moderator: Martin

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Which flow(s) eat my battery?

Post by kintrupf » 06 Dec 2013 08:15

Currently I have a rather alarming battery usage from Automagic:
BatteryStat.jpg
BatteryStat.jpg (13.6 KiB) Viewed 24509 times
Automagic.jpg
Automagic.jpg (10.56 KiB) Viewed 24509 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.

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

Re: Which flow(s) eat my battery?

Post by Martin » 06 Dec 2013 09:38

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.

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Which flow(s) eat my battery?

Post by kintrupf » 06 Dec 2013 12:38

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?

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

Re: Which flow(s) eat my battery?

Post by Martin » 06 Dec 2013 15:30

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.

colabi
Posts: 134
Joined: 06 Jan 2013 22:33

Re: Which flow(s) eat my battery?

Post by colabi » 07 Dec 2013 00:17

Same problem here starting with EAP version 1.20.0-dev
2013-12-07-02-09-25.jpg
2013-12-07-02-09-25.jpg (180.13 KiB) Viewed 24494 times
2013-12-07-02-09-32.jpg
2013-12-07-02-09-32.jpg (178.32 KiB) Viewed 24494 times

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

Re: Which flow(s) eat my battery?

Post by Martin » 07 Dec 2013 14:16

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

colabi
Posts: 134
Joined: 06 Jan 2013 22:33

Re: Which flow(s) eat my battery?

Post by colabi » 07 Dec 2013 18:09

Hi Martin, no new flows; this is what I get with Wakelock Detector-Save Battery:
2013-12-07-20-03-27.jpg
2013-12-07-20-03-27.jpg (301.6 KiB) Viewed 24484 times
What *overflow* mean?

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

Re: Which flow(s) eat my battery?

Post by Martin » 08 Dec 2013 09:41

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

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Which flow(s) eat my battery?

Post by kintrupf » 10 Dec 2013 08:17

This is really weird! After resetting all statistics I got this:
BatteryUsage.jpg
BatteryUsage.jpg (111.21 KiB) Viewed 24463 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.

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

Re: Which flow(s) eat my battery?

Post by Martin » 10 Dec 2013 17:06

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?

Post Reply