With the arrival of iOS 16.4, there is now a slicker and simpler alternative which uses a new feature in Apple Shortcuts and an iOS device dedicated to running pushcut and set up as a pushcut automation server.
The new feature in question is the Intercom action in shortcuts which can take as input text or audio and plays it to any single HomePod or collection by room / group (e.g. downstairs or home) that you have set up in Apple Home. The pushcut automation server makes these shortcuts available to Homey via a REST API call.
Steps:
Install the shortcuts and pushcut apps on an iOS device running 16.4 or later. Start the pushcut server on the device. This must be left running in the foreground at all times, hence a fully dedicated device.
Create an Apple shortcut that looks something like this: Shortcuts
Create a flow in Homey that looks something like this:
When you want to announce from a flow, simply change the value of the Announcement variable to the message you want to announce.
In this example, I am using a single announcement variable and just announcing to my âdownstairsâ group of HomePods but you could have variations of this flow and variables for Announce_downstairs, Announce_upstairs and so on. The abstraction via a variable keeps all the specifics of how to call the API in a single flow for easier maintenance.
Hope this was useful to someone!
EDIT: Obviously you shouldnât normally share your secret with anyone as I have above, but I have generated a new secret so this one no longer works!
This is amazing, well done! Granted, needing to dedicate an iOS device always running this as a server is very clumsy but it might at least be possible to use HomePods as speech speakers now.
Ohhh this is almost awesome. Iâve experimented with the new 16.4 to make this happen, but sadly only local automation can utilise the Homepod Siri talking capability. I donât have an unused ios device that runs 16.4 though.
No neither did I but there are now a few different things Iâm using Pushcut automation server for so I looked around and found the oldest device supporting iOS 16 is the iPhone 8 and if you look for the lowest grade most scratched, locked to a single phone network (none of which matters for this use case) example second hand theyâre quite cheap.
Hi, thanks for sharing! Still getting an error though, I am not a deep expert so appreciate some help. Homey gives me an error when I add the header to the post message. If i leave it out the shortcut actually runs with a test message that I hardcoded in the shortcut. However not able to specifiy the message in homey. Any tips?
Also not familiar with the start of your shortcut. It says Recieve text and apps from nowhere (also tried sharesheet).
The Receive text and apps from action in the shortcut is the part that enables the shortcut to receive the message specified in your POST from Homey so if thatâs not set up right, that would explain why you get an error when you add the message to the POST but not when you leave it out.
The Receive text and apps action is not added explicitly in the normal way. Instead, when you add the âGet dictionary from inputâ action to the top of your shortcut, tap âInputâ in that shortcut action and you get a context menu offering Clipboard, Current date, Device Details or Shortcut Input. Tap Shortcut input and the âReceive input fromâ action is automatically added to the top of the shortcut. By default it comes up as âReceive Images and 18 more input from Nowhereâ. You can leave the Nowhere bit but tap on âImages and 18 moreâ and you get a list of on/off buttons for content types. Untick everything except Text and hit Done.
Tks for the quick reply!
Still I get a bad request error somehow. The shortcut runs without an issue if I leave either the body or the header of the POST message empty, but when I add them both I get a bad request. When leaving them empty I cannot add content in homey obviouslyâŚ.
Any thoughts what I am doing wrong? Below snips of shortcut and homey flow
Once you install Pushcut, do you need to run the âAutomation Serverâ?
It seems like you have to upgrade to âProâ to run the automation server. Is that what you are doing?
Itâs the POST call to Pushcut thatâs failing so some things to check:
Is pushcut automation running in the foreground on your device?
Did you start the automation server in the pushcut app on your device (server tab > Start server on this device)?
Is your shortcut enabled as a server action in pushcut? (server tab > server actions > shortcuts - the shortcut youâre calling should be black text not grey in the list)
If yes to all of the above, do you see an error message in the pushcut app on your device?
P.S. You shared your pushcut secret key in the screenshot above so now anyone on the internet could make your HomePod announce things (and potentially run any other shortcuts you have enabled as server actions) so you probably want to change that.
Oh I see now, you just included the pushcut secret from my initial post above. Yeah, that wonât work.
After installing pushcut on your device, go to server tab. In Server actions, go to shortcuts and tap on the shortcut you want to enable. You should get a menu with the option to âCopy URLâ. Thatâs the URL you need to use in the Homey flow (and includes your specific pushcut secret not mine).
Assuming youâre correctly setting the HomePod_Speech variable in Homey, then check the Intercom action in your shortcut - should be picking up the âmessageâ item from the dictionary it gets as input, not the target item.