Program Your Smart Speaker to Automatically Play Music in Your Bathroom
Being a good host is about predicting what guests might need and creating small moments of delight. A well-stocked bathroom is a great example—keeping mouthwash, Band-Aids, tampons, Advil, all accessible and ready to be grabbed when needed. At some...
Being a good host is about predicting what guests might need and creating small moments of delight. A well-stocked bathroom is a great example—keeping mouthwash, Band-Aids, tampons, Advil, all accessible and ready to be grabbed when needed. At some point I found myself noticing what fancy restaurants and hotels have in their bathrooms to make them feel luxurious, and the one thing that stood out was the music. You walked in, and music would be playing. I found myself thinking it would be hilarious (and great) to do this at home.
I live in a small house, with one bathroom, which is off the hallway. Providing music wouldn’t turn the tiny bathroom into the Ritz, but aside from being a delightful surprise, it would create more privacy. The trick was to have it only play when someone was in the bathroom; the rest of the time the door is open and the music would bleed into the rest of the house, where I usually have something else playing during parties.
Smart door sensors tell your hub when a door is open or closed
I accomplished this with two simple smart tools: a smart speaker and a door sensor. Now, I love Google Home, but there are some limitations, and using smart devices as triggers is a perfect example. For this, you’ll need IFTTT, which stands for “If this, then that.” In this case, we’re going to say, “If the door sensor is closed, then play music on that speaker.”
Smart door sensors are pretty simple: There are two parts; one sits on the door jamb and the other on the door. They make contact when the door is closed, and send a signal to the hub. There are plenty on the market, but I chose YoLink because it was cheap and worked with IFTTT. Installation is easy—you simply peel the backing off and stick it on. Instructions prompt you to download an app, which will initiate the sensor.
How to choose a smart speaker for your bathroom
I had an older Sonos Play 1 in my bathroom for a while because I like to listen to music while I shower. I switched to a Google Nest mini, which is a smart speaker with voice command, because it turns out I also like to shout music changes and time checks while I have shampoo in my eyes. (Newer Sonos models do have voice commands as well.) The problem with my Nest is it doesn’t play music loud enough, so now the Sonos and Nest sit side by side. I’m a complicated person. You can also use any device that has Alexa, as well, if your smart speaker doesn’t have voice commands.
IFTTT is how you tie everything together
Now, all you need to do is go into IFTTT and make sure your accounts—whether it be Sonos or Google Assistant or Alexa—are connected to IFTTT just like the YoLink. You’re going to create an applet by hitting the + sign in the middle bottom tray on mobile, or using the big “create” button in the upper right.
The basic applet creation for IFTTTScreenshot: Amanda Blum
Remember our recipe? You’ll see before you two prompts, one for “if this” and the second for “then that.” Next to “If this,” click on “add.” Search for YoLink. Once it appears, select it, and then choose “doorsensor event.” If you haven’t connected your YoLink account, it’ll prompt you to do so now. This will show all your available door sensors. Choose yours, then choose the “closed” event, because you only want this action while the door is closed.
Set up the “then that.” Click “add” next to it, and search for your speaker. I’ll use my Sonos in this example, but again, you could use Google Assistant or Alexa. I’ll make sure my Sonos account is selected, and then choose the speaker I want to use from the list of available speakers IFTTT provides. Choose a playlist or stream of your choice. I have a playlist of classic elevator music because I have a warped sense of humor.
A word of caution here: Remember that your Sonos speakers can be accessible to everyone or only to you. If you leave them open so guests can connect, you risk a guest turning off the elevator music and throwing Dave Matthews on, which will forever screw up your Spotify algorithm. It’s not important how I know. Secure your Sonos.
Use this basic template to explore automation further
Now you just need to test it, and check the volume, which can also be managed in IFTTT. If you do have a Nest or Alexa, you can have it say “Hello, welcome to my bathroom” when someone enters, or offer instructions like they’d get at Disneyland when they step onto a ride.