Homekit (via Homebridge) and Smartthings Airplay Automation!

I have a Bathroom project where i wanted to turn on 2 lights switches that are connected to speakers when i start an Airplay stream so i can have automated music in my bathroom while i shower :).

This is how i pulled it all together…

The Hardware:

The Software:

The Wetware:
Smartthings Setup
I installed the first speaker in the light socket with the bathroom fan connected to a zwave switch named Bathroom Speaker 1. The second speaker was connected to a zwave outlet named Bathroom Speaker 2. Next i created a virtual switch named Bathroom Speaker This gets presented to Homekit through the JSON Complete API smartapp as apart of the Homebridge-smartthings install.
IMG_1047
Core Automation:
IMG_1048

Homekit setup
After adding your Apple TV 4 or 4K to homekit as a switch with Homebridge-dacp.
config
I named mine Bathroom2 you should have something like this in the home app.
IMG_1049
And the final bits of automation

Now you can say “Hey siri, turn on the bathroom speaker” or simply Airplay to the bathroom everything will automagicly turn on and work like this.
IMG_1054IMG_1055
IMG_1056

4 Likes