How do I automate other apps from a HomeKit (or other) trigger?

Hello!

I want to run the following actions on an iPhone (iOS 13) when an external trigger occurs:

  • Open the BBC Sounds app to play BBC Radio 3
  • Set the playback destination to an AirPlay speaker

The external trigger could be a HomeKit button, a web request that I could generate from another device, or even something physically connected to the iPhone - anything within reason that would enable running these actions from a single trigger.

I can successfully create a Shortcut on the iPhone to do these things, but not a HomeKit automation - I try creating an automation and tap the ‘Convert to Shortcut’ button but the BBC Sounds app doesn’t appear in the available apps and actions.

I have an iPad set up as the HomeKit hub and I have a Raspberry Pi running Home Assistant with the HomeKit and HomeKit Controller integrations, if those are any help.

Am I missing something or can this not be done? Is there any third-party app that would help? I’ve looked at Pushcut but the best that can do seems to be pop up a notification that then needs two taps to actually run the shortcut.

HomeKit ‘shortcuts’ cant run apps on a device. They have a limited number of actions as these run on your current active home hub (which can change to any of a number of possible devices) with no interface or other interactions.

You’re better off using an nfc sticker and your iPhone to trigger an automation like this.

For Pushcut to be able to run this automatically you will need to use it’s Automation Server:
https://www.pushcut.io/support_automation_server.html

Should do exactly what you want, but will require a separate, dedicated iOS device…

Thanks for the replies. I read up on the Pushcut automation server but if I understand it correctly, the Shortcut that is triggered would run on the dedicated server device, but the server device has to have the automation server app constantly open? That wouldn’t be ideal as after running the shortcut I want the device where it runs to be available for interaction - e.g. to change the radio station or select other AirPlay destinations.

I’m looking into whether I can use Switch Control from iOS’s accessibility features to trigger my shortcut from a Bluetooth keyboard - I’ll report back if that works!