Auto Bluetooth On and Off for fit band.

Post your questions and help other users.

Moderator: Martin

Post Reply
Randy Watson
Posts: 13
Joined: 14 Jan 2015 14:18

Auto Bluetooth On and Off for fit band.

Post by Randy Watson » 14 Jan 2015 14:40

I'm new to this app, so please forgive my ignorance....... Could someone please for the love of God give me a hand creating a flow that will toggle my bluetooth on and off...

I have a garmin Vivosmart fitband that won't auto connect to my phone when i go out of range and then return to my phone....I have to toggle bluetooth on and off manually to get a connection again.

I have attatched a flow that isn't working for me.....it just doesn't reconnect and or the flow doesn't execute.

Bluetooth device disconnected > Set bluetooth state off > Sleep 40 sec(device awake) > set bluetooth state ON.

Is is possible to add to this flow.....that if the device doesn't reconnect that it continues to toggle blue tooth On and Off every 3 minutes until the Garmin fitband reconnects?

or does someone else have a better solution to my grief.

Thanks in advance.
Attachments
GarminVivosmart flow.xml
(3.07 KiB) Downloaded 827 times
Last edited by Randy Watson on 14 Jan 2015 16:52, edited 1 time in total.

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Auto blue tooth On and Off for fit band.

Post by Wibbly » 14 Jan 2015 15:16

Have you tried the "Connect/Disconnect Bluetooth Device" Action a few seconds after you re-enable Bluetooth? It may also work on its own to re-establish the Bluetooth connection. Or it might not work at all!

The problem with Bluetooth seems to be that one end or the other needs to initiate re-establishing a connection. You might be falling foul of waiting for a timeout at one end or the other. And if the Bluetooth stack is actually crashing at one end of the other, that doesn't help!

And rather than toggling Bluetooth on and off on the phone when it gets in range again, what happens if you leave Bluetooth enabled and just go into the Bluetooth settings on the phone, tap on the fitband and select to connect? I think "Connect/Disconnect Bluetooth Device" will emulate that...

Randy Watson
Posts: 13
Joined: 14 Jan 2015 14:18

Re: Auto blue tooth On and Off for fit band.

Post by Randy Watson » 14 Jan 2015 16:34

Wibbly wrote:Have you tried the "Connect/Disconnect Bluetooth Device" Action a few seconds after you re-enable Bluetooth? It may also work on its own to re-establish the Bluetooth connection. Or it might not work at all!

The problem with Bluetooth seems to be that one end or the other needs to initiate re-establishing a connection. You might be falling foul of waiting for a timeout at one end or the other. And if the Bluetooth stack is actually crashing at one end of the other, that doesn't help!

And rather than toggling Bluetooth on and off on the phone when it gets in range again, what happens if you leave Bluetooth enabled and just go into the Bluetooth settings on the phone, tap on the fitband and select to connect? I think "Connect/Disconnect Bluetooth Device" will emulate that...

I appreciate your reply..........I have tried the connect Bluetooth device after the re-enable Bluetooth in my flow...doesn't work.

As for trying the connect Bluetooth device in settings it doesn't work either, only the toggling of the blue tooth on and off gets the Vivosmart re-connected again.

Perhaps just a flow toggling blue tooth on and off every 3 minutes untill the vivo smart is connected.....can that be done?

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Auto Bluetooth On and Off for fit band.

Post by Wibbly » 14 Jan 2015 18:41

Try:

Trigger: Bluetooth device disconnected? > Condition: Bluetooth device connected = False > Set bluetooth state off > Sleep 40 sec (device sleep) > set bluetooth state ON > sleep 3 mins (device sleep) > loop back to the Condition

I would have both Sleep conditions will allowing the device to sleep, or battery consumption will be high. There only a need for these times to be approx.
I would also set the options of the flow to "Skip when an instance is already executing"

Randy Watson
Posts: 13
Joined: 14 Jan 2015 14:18

Re: Auto Bluetooth On and Off for fit band.

Post by Randy Watson » 15 Jan 2015 07:06

Wibbly wrote:Try:

Trigger: Bluetooth device disconnected? > Condition: Bluetooth device connected = False > Set bluetooth state off > Sleep 40 sec (device sleep) > set bluetooth state ON > sleep 3 mins (device sleep) > loop back to the Condition

I would have both Sleep conditions will allowing the device to sleep, or battery consumption will be high. There only a need for these times to be approx.
I would also set the options of the flow to "Skip when an instance is already executing"

Thanks again for the response.........I have done everything you've suggested

Not sure if I have correctly looped it though.

Bluetooth device disconnected > Condition: Bluetooth device connected = False > Set bluetooth state off > Sleep 40 sec (device sleep) >> set Bluetooth state On > Sleep 3 mins > Condition: Bluetooth device connected

Is this correctly looped ?

EDIT: I think I figured out how to loop......I drag the + sign (sleep 3 minute) and drag it to the (Bluetooth device connected =False (condition)

Is that correct ?

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Auto Bluetooth On and Off for fit band.

Post by Wibbly » 15 Jan 2015 08:49

Sounds as I intended to me :)

Randy Watson
Posts: 13
Joined: 14 Jan 2015 14:18

Re: Auto Bluetooth On and Off for fit band.

Post by Randy Watson » 15 Jan 2015 09:34

Wibbly wrote:Sounds as I intended to me :)
Took me half an hour to figure out how to drag to loop......found it by accident. :roll:

BTW...its working a treat. Thanks for taking the time to help me.

I very much appreciate it.

harshk60
Posts: 1
Joined: 05 Aug 2015 07:33

Re: Auto Bluetooth On and Off for fit band.

Post by harshk60 » 05 Aug 2015 07:34

Pls pls tell me, i also want the solution, i also have a same problem with my yufit band.

Post Reply