Play a barking dog sound on your HomePod when there is motion outside of your door with HomeKit (Alarm)
I’m not sure if it is ever going to work for you, but I’ve set up my HomePods to bark when we are not home and motion outside of our door is detected.
It’s that effective our neighbours asked since when we had a dog.
On this page
- an AirPlay 2 speaker, in my case 2 x HomePod (multiple speakers makes it sound more “real” since its a more filling effect in the apartment/house)
- HKSV compatible camera (so you have a motion sensor entity in HomeKit)
- Motion sensor in case you don’t have a HKSV camera
Software requirements, or things to consider
- Apple Music subscription (🤦🏼♀️)
- Audio editor (like Audacity)
- Source file of barking dogs of 1 minute (or whatever sound you want to play on your HomePod’s
Making your HomePod bark
If you are just here for the sound file feel free to download it.
The reason you need a 1 minute sound file, is because the current automations in HomeKit can only stop playing a sound after 1 minute.
So if your sound file is not 1 minute long, it will continue to the next song in the library and that might be whatever song, making it even more obvious there is no actual dog in the house.
So you really have 2 options:
- Play a 10-20 second sound clip, add enough silence to get to 1 minute of sound
- Copy paste the 20 seconds 3 times, making it more or a minute long and a lot of barking.
When exporting from Audacity I put “HomePod” as an album, so I can find it back easier
Editing the audio
I’ve grabbed a “good sounding bark” from FreeSound by Anton, https://freesound.org/people/Anton/sounds/157322/
Download the WAV and open it in Audacity
Select the entire audio clip, and copy-paste it 3 times, adding up to the 1-minute minimum requirement
go to “File > Export > Export as MP3” and give it a file name, in the next step we will give it some metadata to find it.
I’ve set “HomePod” as the album title so any future custom sounds can be in the same album, and easier to find.
Importing it into Apple Music
Open up “Music”, go to “File > Import” and select the MP3
Once imported you can find it in the “recently added”
Once imported it will automatically upload it to the “cloud” but to speed up the process I forced a cloud library update
Go back to the track click the extra options “…” and go to “Get Info”, go to the file tab and check if the track is in the cloud, once it’s uploaded your HomePods will be able to access it.
Setting up the automation in HomeKit
At the moment of writing (iOS 15 / iPadOS 15 / macOS Big Sur) you cannot do this in the desktop apps, you will need an iPhone or iPad to create the automation
Open HomeKit, create an automation and select your motion sensor (for me that’s my Eufy 2K indoor camera)
I’ve set up the barking to only bark when no one is home. (so I don’t get scared shitless)
it might prompt to get access to your Music, which is what we want, click on “Choose Audio” and go to library, find our HomePod album and select the barking song.
⚠️ Make sure to select the song and not the album, you only want to play the sound effect, not the entire album
That’s it! upon motion, your dog will be barking when you are not home!