Page 1 of 1

Auto Bluetooth On and Off for fit band.

Posted: 14 Jan 2015 14:40
by Randy Watson
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.

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

Posted: 14 Jan 2015 15:16
by Wibbly
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...

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

Posted: 14 Jan 2015 16:34
by Randy Watson
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?

Re: Auto Bluetooth On and Off for fit band.

Posted: 14 Jan 2015 18:41
by Wibbly
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"

Re: Auto Bluetooth On and Off for fit band.

Posted: 15 Jan 2015 07:06
by Randy Watson
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 ?

Re: Auto Bluetooth On and Off for fit band.

Posted: 15 Jan 2015 08:49
by Wibbly
Sounds as I intended to me :)

Re: Auto Bluetooth On and Off for fit band.

Posted: 15 Jan 2015 09:34
by Randy Watson
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.

Re: Auto Bluetooth On and Off for fit band.

Posted: 05 Aug 2015 07:34
by harshk60
Pls pls tell me, i also want the solution, i also have a same problem with my yufit band.