When iPhone connects to Bluetooth Car automatically open gate -> Shortcuts app keeps asking permission!

What I’d like to do is the following:

When I start my car and have my iPhone, their Bluetooth’s automatically pair.
This is a sign I’m leaving, so I’d like to automatically open the gate in that case.

I have Home Assistant scripts for opening the gate (gate_departure_script).

I can see this script and even call it using the Shortcut app with its Automation feature.
However, the app does not run the automation automatically but asks permission to execute, defeating the purpose.

How can I automatically trigger it? Without requiring permissions? Any clue or alternatives?

I don’t know about the iOS version, but the Android version of the Companion app now has sensors for what bluetooth devices are connected to your phone.

I don’t know what the shortcut app is or what it does.

You can’t because is a IOS BT automation and is not allowed

This is a limitation imposed by Apple out of security concerns. The following trigger types in Shortcuts personal automations cannot be run automatically:

  • Arrive / Leave / Before I Commute
  • Email
  • Message
  • Wi-Fi
  • Bluetooth

If you make a personal automation with any of those triggers, it’ll first show a notification on your lock screen that you must accept to continue running the actions. I agree that this kind of defeats the purpose of an automation, since it’s no longer automatic. Only thing that can be done is send feedback to Apple, as the limitation is on their end.

The best alternative would be to use an iBeacon which typically costs only a few bucks. Keep it plugged in to any of your cars USB ports, and then when the car gets powered on it’ll start transmitting via Bluetooth. Once your phone sees that signal and sends a webhook to Home Assistant which runs your gate scripts. I use the Geofency app to do this but it’s also supported in OwnTracks.

I’ve been doing this for two years now with Geofency (to determine car presence) and it works very well.

Do you have any recommendations for where to get the usb powered iBeacon (or what hardware I need to be able to do this with the Geofency app)? Would love to implement this with my car. Did some quick searching and was a little lost.

I used to use a DSD TECH SH-A10 USB Bluetooth dongle but finally have dropped it for the following reasons.
First because sometimes it does not work, sometimes it takes more than 30 seconds for the door to start opening (I suspect it is because Geofency did not pickup the event or experienced delay in picking it up).
Second reason, when I have my car parked in front of my house, I do not want the garage door to open when I start the car’s engine (but of course it does; and I did not find a good solution to detect if my car is in the garage or in front of the house).
So now I use a less automated solution but it fits more to my needs: an NFC tag which I stick on the car door. When I want the garage door to open or to close, I just tap on the NFC tag with my phone.