Shortcut automation to connect to Bluetooth?

I have a question for the shortcut automation gurus here. Is it possible to run a shortcut that will connect my iPhone via BT to another device? I want to run a shortcut that opens settings, blue tooth and then connects to my echo speaker. I use this each night to run white noise on the echo. Currently, I go through each step manually. I’d like to create a shortcut for this.

Is it possible? I’m not asking anyone to create the shortcut for me, I’ll try to figure it out if I’m told it can be done. Thanks!

I don’t have an Echo, but Set playback destination works for my bluetooth speaker. I’ve added a line to set the volume and start white noise from the Dark Noise app, just to show how it could be done.

White Noise via Bluetooth

Tap on the blue text in the Set playback command to select the speaker you want to connect to.

Hope this helps.

1 Like

@Tony that worked great! Now if I can only figure out how to get it to go into settings and actually connect to the device. That probably is not possible. The only reason that would be a value to me is because I disconnect the Bluetooth when I leave early in the morning so that if I start something else on my phone it doesn’t disturb my poor wife. :slight_smile: But I can deal with this. Thanks for the shortcut, I’m impressed and grateful.

1 Like

You have a couple of options for that…

  1. Here is an updated version of the Shortcut that will turn on Bluetooth before selecting the speaker.

  2. In the morning, rather than disconnecting your Bluetooth you can automate stopping of the white noise outputting to the Echo and redirecting the output to your phone so any further sounds will go to your phone and not the speaker. You can either:

2A.Set the Bluetooth off; or

2B.Route the sound back to your phone without turning off the Bluetooth.

You could set your chosen option to be performed automatically: if you use an alarm in the morning, you can select an automation to run automatically when the alarm is stopped; if you use Sleep Mode you can select a Shortcut to run when it exits, or you could set the automation to run at a specific time if you wake at a specific time. All of these are set up in the automations tab of the Shortcuts app, selecting the Automation tab and then creating a Personal Automation and using either Time of Day or Alarm.

I hope this makes sense.

Oooh, @Tony some of this sounds like it could solve my problem.

I have an aftermarket Bluetooth unit hooked into my car. When I first set it up I encountered this intermittent problem and reported it to the vendor who claimed “it’s an issue with Apple’s Bluetooth stack and they’re aware of it.” I think two major iOS releases later it’s exactly the same.

I have Bluetooth on all the time. Between watch and AirPods Pro and my car, it’s just never worth turning off in my view. When I turn my car on my iPhone connects to the Bluetooth “GTA Car Kit” 100% of the time. However, being “connected” is not the whole story as around 60% of the time that does not result in any audio. The phone reports it is connected and even shows “GTA Car Kit” as the audio output but nothing comes from the car speakers, and the Car Kit eventually makes a beep that says it isn’t connected.

As I said, sometimes it just works, but the times it does not work, there is an action that always makes it work correctly. That is to go into Bluetooth settings on the phone and disconnect and reconnect from there.

I’ve tried setting up Back Tap to go into Bluetooth settings but it turns out it is notoriously difficult to set off Back Tap when the phone is in its cradle. I had already looked into Shortcuts a while back and had not seen any options but it sounds like there may be some solutions, or at least affordances I could use.

@zkarj As an extra thought for your case, you could have an NFC sticker in your car or an NFC tag on your car keys that runs your Shortcut. The Shortcut could be something like this, perhaps with a line to set the audio destination to the car audio at the end.

You may need to try different Wait durations to ensure the Bluetooth does fully disconnect before reconnecting.