Too long sleep

Post your questions and help other users.

Moderator: Martin

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Too long sleep

Post by Nerey » 05 Jun 2016 16:57

Highscreen Power Ice
Android 5.1
When using Sleep... here you can see (pay attention to the time):

Code: Select all

05.06.2016 19:47:27.648 [Flow3] Starting to execute flow 'Flow3' with Context{global{…},local{flow_name=Flow3,triggertime=1465145247646,trigger=Manual}}
05.06.2016 19:47:27.649 [Flow3] Start executing action 'Sleep: 1s (keep device awake)'
05.06.2016 19:47:27.650 [Flow3] Action 'Sleep: 1s (keep device awake)' Sleeping for 1s (allow device sleep)
05.06.2016 19:47:32.702 [Flow3] End executing action 'Sleep: 1s (keep device awake)'
05.06.2016 19:47:32.742 [Flow3] Flow ended.
The device is not asleep
There is different behavior sometimes when time less than 1s
Sorry for bad english, my native is russian.

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

Re: Too long sleep

Post by Martin » 05 Jun 2016 19:49

Hi,

Some ROMs on some versions of Android enforce a minimum time of five seconds to execute an alarm that is used by the action Sleep when 'keep device awake' is not checked. The sleep-action will be notified about the elapsed time after 5 seconds instead of 1 second on such ROMs therefore the delay. However I would use 'Keep device awake' for such a short sleeping duration since it's unlikely that the device will save much energy in a few seconds.

Regards,
Martin

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Too long sleep

Post by Nerey » 06 Jun 2016 18:49

So strange...
Thank you
Sorry for bad english, my native is russian.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Too long sleep

Post by Nerey » 07 Jun 2016 07:28

What can you say about that?

Code: Select all

07.06.2016 10:10:15.925 [Bluetooth auto disable] Start executing action 'Sleep: 60s (allow device sleep)'
07.06.2016 10:10:15.925 [Bluetooth auto disable] Action 'Sleep: 60s (allow device sleep)' Sleeping for 60s (1m) (allow device sleep)
07.06.2016 10:24:50.950 [Bluetooth auto disable] End executing action 'Sleep: 60s (allow device sleep)'
07.06.2016 10:24:50.983 [Bluetooth auto disable] Flow continues executing with the next step.
Full log:

Code: Select all

07.06.2016 10:10:12.768 [Bluetooth auto disable] Starting to execute flow 'Bluetooth auto disable' with Context{global{…},local{flow_name=Bluetooth auto disable,trigger=Bluetooth State: On, Off,triggertime=1465283412766,bluetooth_state=on,bluetooth_previous_state=turning_on}}
07.06.2016 10:10:12.770 [Bluetooth auto disable] Start executing condition 'Expression: notification_title ==null'
07.06.2016 10:10:12.811 [Bluetooth auto disable] End executing condition 'Expression: notification_title ==null' with return value true
07.06.2016 10:10:12.864 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:12.865 [Bluetooth auto disable] Start executing condition 'Bluetooth Enabled'
07.06.2016 10:10:12.869 [Bluetooth auto disable] End executing condition 'Bluetooth Enabled' with return value true
07.06.2016 10:10:12.916 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:12.916 [Bluetooth auto disable] Start executing condition 'Call State: Ringing, Off-hook'
07.06.2016 10:10:13.470 [Bluetooth auto disable] End executing condition 'Call State: Ringing, Off-hook' with return value false
07.06.2016 10:10:13.505 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:13.505 [Bluetooth auto disable] Start executing condition 'Bluetooth Device Connected: Any device'
07.06.2016 10:10:13.584 [Bluetooth auto disable] End executing condition 'Bluetooth Device Connected: Any device' with return value false
07.06.2016 10:10:13.619 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:13.619 [Bluetooth auto disable] Start executing condition 'Expression: global_current_mode=="incar"'
07.06.2016 10:10:13.657 [Bluetooth auto disable] End executing condition 'Expression: global_current_mode=="incar"' with return value false
07.06.2016 10:10:13.698 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:13.699 [Bluetooth auto disable] Start executing action 'Sleep: 2s (keep device awake)'
07.06.2016 10:10:13.699 [Bluetooth auto disable] Action 'Sleep: 2s (keep device awake)' Sleeping for 2s (keep device awake)
07.06.2016 10:10:15.709 [Bluetooth auto disable] End executing action 'Sleep: 2s (keep device awake)'
07.06.2016 10:10:15.742 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:15.743 [Bluetooth auto disable] Start executing condition 'Expression: (trigger == "Global Variable: global_current_mode" and global_last_mode == "incar") or trigger == "Outgoing Call: all, Ended" or trigger == "Incoming Call. State: Ringing, Off-hook, Ended, Numbers: All"'
07.06.2016 10:10:15.775 [Bluetooth auto disable] End executing condition 'Expression: (trigger == "Global Variable: global_current_mode" and global_last_mode == "incar") or trigger == "Outgoing Call: all, Ended" or trigger == "Incoming Call. State: Ringing, Off-hook, Ended, Numbers: All"' with return value false
07.06.2016 10:10:15.810 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:15.811 [Bluetooth auto disable] Start executing action 'Notification on Statusbar: Blutooth have no connection Bluetooth ID 3'
07.06.2016 10:10:15.874 [Bluetooth auto disable] End executing action 'Notification on Statusbar: Blutooth have no connection Bluetooth ID 3'
07.06.2016 10:10:15.924 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:10:15.925 [Bluetooth auto disable] Start executing action 'Sleep: 60s (allow device sleep)'
07.06.2016 10:10:15.925 [Bluetooth auto disable] Action 'Sleep: 60s (allow device sleep)' Sleeping for 60s (1m) (allow device sleep)
07.06.2016 10:24:50.950 [Bluetooth auto disable] End executing action 'Sleep: 60s (allow device sleep)'
07.06.2016 10:24:50.983 [Bluetooth auto disable] Flow continues executing with the next step.
07.06.2016 10:24:50.984 [Bluetooth auto disable] Start executing action 'Set Bluetooth State: Off'
07.06.2016 10:24:51.340 [Bluetooth auto disable] Stopping execution due to stop-execution policy
07.06.2016 10:24:51.523 [Bluetooth auto disable] End executing action 'Set Bluetooth State: Off'
The device is not asleep
Sorry for bad english, my native is russian.

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

Re: Too long sleep

Post by Martin » 08 Jun 2016 19:14

Maybe some kind of doze feature of the device or another battery saving feature of the ROM that is kicking in. It's up to the ROM if it wants to execute alarms as requested by the apps or if it wants to add some delays.
Samsung ROMs for example often execute actions only after 5 minutes when the screen is off. Other ROMs use other mechanisms to save battery. Also check the system settings if there's a way to exclude Automagic from such optimizations.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Too long sleep

Post by Nerey » 08 Jun 2016 19:46

Screen was always ON
Also such problems with triggers by time - always late
Sorry for bad english, my native is russian.

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

Re: Too long sleep

Post by Martin » 09 Jun 2016 19:53

For time based triggers you could try option 'Like alarm clock'. Some ROMs don't delay triggers when this option is set. There's not much I can do to prevent the battery optimizations of the ROM.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Too long sleep

Post by Nerey » 09 Jun 2016 19:56

But it occurs even if phone is not sleeping :(
Sorry for bad english, my native is russian.

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

Re: Too long sleep

Post by Martin » 09 Jun 2016 20:06

Yes, that's possible. ROMs (for example by Samsung) don't execute alarms of apps even when the device is awake. Samsung ROMs execute alarms on a five minute basis when the alarm was registered when the screen is off. Turning on the screen will not prevent this, the alarm will be executed after 5 minutes (approximately). Your ROM might use a similar mechanism.

User avatar
Nerey
Posts: 102
Joined: 07 Mar 2014 16:59

Re: Too long sleep

Post by Nerey » 09 Jun 2016 20:18

Strange...
But what can I do with long sleep?
Sorry for bad english, my native is russian.

Post Reply