Controlling Bluetooth

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
BobF
Posts: 5
Joined: 04 Jan 2013 16:11

Controlling Bluetooth

Post by BobF » 04 Jan 2013 16:48

At last I've found an app which will control Bluetooth properly on my HTC Desire, without crashing it.

I need to connect my phone via BT to 3 cars with different 'Parrot' hands-free systems, 2 cars with in-built hands-free systems, as well as a BT headset, and I would get in a car and forget to switch BT on, and later forget to switch it off again. In the end, I used to leave Bluetooth on the phone turned on all the time.

I devised a number of flows, the main one of which is a 'timed' flow which turns BT on every 6 minutes, and waits for a further 1 minute to see if a BT device connects. If no device connects, BT is switched off again. If a device connects and stays connected (monitored by another flow and using global variables), BT stays on and when the timed flow runs again, it sees this and does nothing. Once the device disconnects, BT is turned off, until the timed flow executes again. When a device connects/disconnects, the phone makes a sound as a reminder.

This all works great with the 'Parrot' systems and the BT headset, but I'm still tinkering with it, as I've found that the 2 cars with built-in BT (both same car manufacturer) will scan for a BT device when the car is started, and if none is found just give up - :evil: - unlike the others which will will keep scanning. This means that with these 2 cars, if the timed flow doesn't occur just then, they never see each other. Which means I still have to remember to switch BT on manually before I start either car - which is a PITA. Now if they had car kits...

So for now I've amended the timed flow so that if it sees BT is on, but no device is connected, it will count each time it runs and then switch BT off after half an hour. Still not ideal, but in the right direction, and my battery lasts a lot longer.

I have tried using location via the cell masts, but I'm in a rural area, and visibility of my home mast comes and goes for many miles, and I've found it's not reliable enough, and using GPS will defeat the object, which is saving my battery.

auto_wiz
Posts: 26
Joined: 30 Nov 2012 23:49

Re: Controlling Bluetooth

Post by auto_wiz » 14 Jan 2013 16:24

This would be the sort of application suited to NFC stickers. A sticker in each car either in a charging dock or in a tray where you toss your phone. A quick swipe over the sticker to turn your bluetooth on and you could even have different flows for each car. For example setting volume depending on each stereo/headset. Then turn bluetooth off after "Bluetooth Device Disconnected" trigger. This would negate the need for any timed flows you just have to remember to swipe it or put the sticker somewhere it cant be missed. You can also get NFC key fobs so you could have one on each set of keys.

Yes, these stickers will cost you (I bought 10x25mm stickers for £6 from amazon) but I only bought them to use 1 and now I keep finding new uses for them so you'll quickly use them all!

This is the best solution I could think of. Hope this helps.

auto_wiz
Posts: 26
Joined: 30 Nov 2012 23:49

Re: Controlling Bluetooth

Post by auto_wiz » 14 Jan 2013 16:27

Sorry, forget the above. HTC Desire doesn't have NFC .Apologies

BobF
Posts: 5
Joined: 04 Jan 2013 16:11

Re: Controlling Bluetooth

Post by BobF » 15 Jan 2013 15:16

Hi auto_wiz, if only there was NFC!

Have since experimented with a flow where the trigger is 'shake', but counting it so there needs to be say, 3 shakes in less than 5 seconds, so I could just wave it round in my hand when in the 'awkward' cars, which would turn on BT. Soon found shake was triggering too often in my pocket, so I thought of adding a check using the proximity sensor, but after installing an app to monitor the sensor, found that it is basically either on or off, and the sensor is up near the earpiece (where it can do the job it's meant for). That didn't work, so it was back to the drawing board.

Have now resorted to installing a different lock screen which lets me put a BT control widget on it, so I can turn BT on by just waking the phone up and touching the widget, if I forget to turn BT on in those cars - I usually remember when I'm already on the motorway. I've retained the timed BT as well.

It means I don't have to login to my phone. It's not ideal (nor legal for that matter) if I'm on the move, but it's only 2 quick actions.

Bob

Post Reply