Hello,
first of all, I am new to automagic. I just recently discovered the app and successfully managed to create a flow that automatically enables WiFi at specific locations (based on the GSM Tower I am connected).
My issues now is that my smartwatch will not automatically re-connect to my phone via bluetooth when I leave the bluetooth range unless I either toggle bluetooth on the phone, reconnect to the smartwatch from the bluetooth settings or reboot the watch. I want to automate the task using automagic and have actually successfully managed to do so. However, there's an aesthetical issue I have with my flow.
As you can see from the attached flows, my flow contains a loop and a few pause/sleep instructions. I would like to prevent the flow from being run multiple times. I tried to do that with the flow titled "flow_Smartwarch_reconnect_notworking.xml" by using a variable that gets zeroed when the flow has finished running and checking if that variable is zero or not on the beginning of the flow. However, automagic always thrwos an error when the flow is executed, presumably because the variable isn't initialized.
Removing that condition and instead inserting an action that does initilize that variable will successfully run the flow (see flow_Smartwarch_reconnect_working.xml), but in theory the flow could be run multiple times depending on how often the device goes out of range and at what point in the flow the previous instance is paused. It doesn't really break anything, but for cleanliness sake I would still like to prevent this. Is there some other way i can keep a flow from being run if the flow is currently still "active" in a loop?
thanks in advance for your help.
Regards
Localhorst86
Preventing flow from being run parallel
Moderator: Martin
-
- Posts: 2
- Joined: 26 Aug 2015 11:29
Preventing flow from being run parallel
- Attachments
-
- flow_Smartwarch_reconnect_working.xml
- (4.71 KiB) Downloaded 552 times
-
- flow_Smartwarch_reconnect_notworking.xml
- (4.92 KiB) Downloaded 556 times
Re: Preventing flow from being run parallel
When in flow editor, press menu and option. There are few setting how flow should behave when triggered multiple times in quick succession.
-
- Posts: 2
- Joined: 26 Aug 2015 11:29
Re: Preventing flow from being run parallel
boy, that was easy. Thanks. That did the trick.