[HOW TO] HomePod announcements from Homey

This is an update to my earlier post [TUTORIAL] Whole house audio and text to speech announcements to HomePod Mini and other AirPlay speakers where I used a Mac running Airfoil to make announcements to HomePod minis around my house.

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:

  1. 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.

  2. Create an Apple shortcut that looks something like this: Shortcuts

  3. Create a flow in Homey that looks something like this:

  1. 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!

4 Likes

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. :cry:

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.

This seemed saleswomen but indeed a spare device with 16.4 and a pushcart subscription (I guess is needed for the server) makes it quite unattractive.

I will use a soundboard file triggering a prerecorded intercom sound to send information around the house.

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).

Any ideas much appreciated! Thanks

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

Many thanks!

That’s not valid JSON, you’re using “smart quote characters” instead of regular ones (").

Solved, thanks!