I use Sonos speakers to play my favourite radio station around my house. I have various Homey flows which control the playback. I wanted to also control these by voice using Siri - to switch the radio on and off and to control the volume. I tried quite a few things before I stumbled on a solution that works really well for me.
You can add the Sonos speakers natively to Apple Home as AirPlay2 speakers but if you are using native Sonos playback rather than AirPlaying to them then no playback controls are available in Home app or to Siri.
So I now use a combination of Homey apps to solve this problem:
First, I create a virtual device of type âFanâ (yes thatâs not a typo) using the Virtual Devices app, with on/off and dimmable capabilities. I call this device something like âKitchen radioâ. Then I create an advanced flow in Homey that responds to on / off / dim changes of this virtual device and controls the Sonos in my kitchen accordingly (playing / stopping my radio station and changing the volume).
Then I publish this device to HomeKit using the HomeKitty app. Now the device is available to Home and Siri and I can say things like âSiri, kitchen radio onâ and âSiri, turn kitchen radio up a bitâ and these work as expected.
The reason I use a fan type instead of anything else is that I need a virtual device type thatâs published to HomeKit with on/off and dim capabilities but I donât want to use lightbulb since then when I ask Siri to turn off/on the lights, the radio would also be controlled. Since I donât have any other fan devices (that I need to control by voice) in these rooms, using a fan device is âsafeâ in this regard.
It looks a bit weird in the Home app since my radio devices appear as fans, but I use the Homey app and dashboards rather than the Home app anyway so I donât care. Iâm using Home purely as a bridge to Siri. You do have to be a bit careful with wording when controlling the volume - asking to turn the volume of these devices up or down doesnât work, because Siri thinks theyâre fans. But we soon got used to just asking Siri to turn them up or down a bit and that feels quite natural and works consistently.
Hope this helps someone.