I guess, I'm just missing the obvious solution. But for now, this is working for me:
A Siri shortcut executes an Apple Script on the Mac that starts the radio stream with the Music app and adds the HomePod as airplay output.
1. Apple Script to start the radio stream
On the Mac, create a script using the
Script Editor application and save it e.g. to
tell application "Music"
set selected of AirPlay device "HomePod Kitchen" to true
set selected of AirPlay device "HomePod Living-Room" to true
play (every track of playlist "My Radio Playlist")
In the Playlist "My Radio Playlist", I've added the radio stream I want to start. I suppose, one could also add the radio stream's url directly. But this way, I can modify the playlist without re-opening the script again later.
2. Create Shortcut to execute the script
With the device that has been paired with the HomePod, e.g. the iPhone or iPad, open the
Shortcuts app and create a new shortcut that is named after the desired Siri command, here: "good morning"
Add the workflow item Run Script Over SSH. Enter the hostname of the Mac and your Mac's user-account name. Choose "SSH Key" as authentication method. Add the command to execute the apple script:
3. Import the SSH Key
If you haven't done so already, export the public SSH Key of the Shortcuts app by clicking on the SSH Key entry, share, and then air-drop it onto your Mac.
On the Mac, add the key to the file
Attention! This will allow the Shortcuts app on your iOS device to ssh into your Mac.
4. Activate SSH
If you haven't done so already, activate SSH remote login on your Mac:
- Go to "System Preferences"
- Go to "Sharing"
- Activate "Remote login"
Now the HomePod will understand "good morning" and execute the script, which will start Music on the Mac playing the radio station on the Mac and the selected AirPlay devices.