It looks like the trigger "WiFi Disconnected" is erratic. I assume the trigger is an instant event reported by Android on WiFi disconnect, which in theory (and in my case, in practice) may cause Automagic to actually miss the event and not initiate the flow based on that trigger.
Would it be possible to add a NOT condition to every/most trigger(s)? In that way (and in this case), Automagic would evaluate the state of not being connected to WiFi rather than the instant of disconnection from WiFi, hence less chance of missing that event/initiating flows that depend on that trigger.
I have Automagic running in the foreground at all times so this is probably not an issue of resources.
I'm aware that I could check for a given access point with the Periodic Timer trigger and a 'WiFi connected' condition but I don't want to since this would be fixing something that should work in the first place.
Thanks for your comments!
Trigger reliability?
Moderator: Martin
Re: Trigger reliability?
I too have noticed that sometimes triggers are lost, for example wifi connected/disconnected, BT conn./disc., Gleoo recording or not.. etc.
I think it happen with phone is in sleep state or for other reasons that i don't know.
It would be nice to enhance trigger reliability if possible...
I think it happen with phone is in sleep state or for other reasons that i don't know.
It would be nice to enhance trigger reliability if possible...
Re: Trigger reliability?
I don't like to use periodic timer because it keeps the flow always running. Instead I set a loop in the flow checking wifi and the flow only triggers when you turn on your wifi. http://automagic4android.com/flow.php?i ... 0228669821
If you get the idea, it's easy to implement in any flow. Still not a perfect solution but for me that has to suffice until they fix the triggers.
If you get the idea, it's easy to implement in any flow. Still not a perfect solution but for me that has to suffice until they fix the triggers.
Re: Trigger reliability?
With periodic timer the flow run only when timer trigger. It doesn't drain battery. Sleep timer instead keep the phone always active.MURTUMA wrote:I don't like to use periodic timer because it keeps the flow always running. Instead I set a loop in the flow checking wifi and the flow only triggers when you turn on your wifi. http://automagic4android.com/flow.php?i ... 0228669821
If you get the idea, it's easy to implement in any flow. Still not a perfect solution but for me that has to suffice until they fix the triggers.
Re: Trigger reliability?
Trigger Periodic Timer only wakes the device when the flow is executed. Using a loop for such a construct will keep your device awake and drain battery.
The triggers (bluetooth and wifi) rely on the operating system events used to inform apps about such occurrences. You can try to change wifi events using different power saving modes in the advanced wifi settings (Android Settings->Wi-Fi->Menu->Advanced) and change settings like "Wi-Fi optimization" and "Keep Wi-Fi on during sleep".
Also ensure that the Automagic status bar icon is enabled otherwise Android can terminate and restart the Automagic service and Automagic can miss such events.
If this does not help, then please enable the "Debug Log" and "Log to SD card" in the settings of Automagic, reproduce a case when the event has been missed and send the log /sdcard/Automagic/log.txt to info@automagic4android.com
The triggers (bluetooth and wifi) rely on the operating system events used to inform apps about such occurrences. You can try to change wifi events using different power saving modes in the advanced wifi settings (Android Settings->Wi-Fi->Menu->Advanced) and change settings like "Wi-Fi optimization" and "Keep Wi-Fi on during sleep".
Also ensure that the Automagic status bar icon is enabled otherwise Android can terminate and restart the Automagic service and Automagic can miss such events.
If this does not help, then please enable the "Debug Log" and "Log to SD card" in the settings of Automagic, reproduce a case when the event has been missed and send the log /sdcard/Automagic/log.txt to info@automagic4android.com
Re: Trigger reliability?
I found one bug in the wifi disconnect trigger that can cause it to fail. This problem should be fixed in the next update.
Nevertheless, please send the debug logs if you can reproduce such an issue in one of your flows (with wifi or bluetooth) since it might be another problem.
Thanks
Nevertheless, please send the debug logs if you can reproduce such an issue in one of your flows (with wifi or bluetooth) since it might be another problem.
Thanks
Re: Trigger reliability?
Thanks for your responses! Martin, I am still on Android 2.3.6 and have the correct WiFi sleep policy selected in Android's advanced settings, so everything should work fine. That said, I'm glad you did identify the bug with WiFi disconnect because my problem was actually relevant to WiFi disconnect only. The WiFi connect trigger has always worked flawlessly for me.
I'm not sure how I could reproduce the bug and whether anything would show in the log if the trigger (being the first activity in a flow) would not fire in the first place? Any advice? I'd be happy to help.
Thanks again! Looking forward to the updates
I'm not sure how I could reproduce the bug and whether anything would show in the log if the trigger (being the first activity in a flow) would not fire in the first place? Any advice? I'd be happy to help.
Thanks again! Looking forward to the updates
Re: Trigger reliability?
Unfortunately reproducing such issues is often very difficult. What you can do is to enable 'debug logging' and 'log to SD card' and just normally use Automagic until the problem occurs one more time.
When this happens, send the file /sdcard/Automagic/log.txt to me with a description what result you expected and what actually happened (something like "I left home at 8:15 and wifi disconnect trigger did not execute flow XYZ"). Please also send the relevant flows to me so I can check the settings and I can try to reproduce the problem.
If you want to check the debug log on your own, you can either open the text file on the sdcard or use menu->Manage->Log to show the live log. The log on the filesystem contains much more log history than the live log.
When this happens, send the file /sdcard/Automagic/log.txt to me with a description what result you expected and what actually happened (something like "I left home at 8:15 and wifi disconnect trigger did not execute flow XYZ"). Please also send the relevant flows to me so I can check the settings and I can try to reproduce the problem.
If you want to check the debug log on your own, you can either open the text file on the sdcard or use menu->Manage->Log to show the live log. The log on the filesystem contains much more log history than the live log.