Program Your Smart Speaker to Automatically Play Music in Your Bathroom

Being a good host means anticipating what guests might need and creating little moments of pleasure. A good example is a well-stocked bathroom that has mouthwash, band-aids, tampons, Advil, all close at hand and ready to be taken when needed. At one point I noticed that trendy restaurants and hotels have bathrooms to make them feel luxurious and the only thing that stood out was the music. You entered and the music was playing. I caught myself thinking that it would be fun (and cool) to do this at home.

I live in a small house with one bathroom, which is located in the hallway. Music won’t turn a tiny bathroom into a Ritz hotel, but it will create more privacy in addition to being a delightful surprise. The trick was to only play when someone was in the bathroom; the rest of the time the door is open and the music seeps into the rest of the house where I usually have something else playing during parties.

Smart door sensors tell your hub when the door is open or closed

I achieved 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. To do this, you will need IFTTT , which means “If this, then this.” In this case, we’re going to say, “If the door sensor is closed, play music on this speaker.”

Smart door sensors are quite simple: there are two parts; one sits on the door frame and the other on the door. They contact when the door is closed and send a signal to the hub. There are many on the market, but I chose YoLink because it was cheap and worked with IFTTT. Installation is simple – you just peel off the backing and stick it on. The instructions prompt you to download an app that activates the sensor.

How to choose a smart bathroom speaker

I had an old Sonos Play 1 in my bathroom for a while because I love listening to music while I shower. I switched to the Google Nest mini, which is a voice-activated smart speaker, because as it turns out, I also love to yell about music changes and time checks while I have shampoo in my eyes. ( Newer Sonos models also have voice commands.) The problem with my Nest is that it doesn’t play music loud enough, so now Sonos and Nest are side by side. I am a complex person. You can also use any device with Alexa if your smart speaker doesn’t have voice commands.

IFTTT is how you tie everything together

Now all you need to do is log into IFTTT and make sure your accounts – be it Sonos, Google Assistant or Alexa – are connected to IFTTT just like YoLink. You are going to create an applet by clicking the + icon in the middle bottom tray on mobile, or by using the big “Create” button in the top right corner.

Remember our recipe? You will see two clues in front of you, one for “if this” and one for “then that”. Next to If This, click Add. Find YoLink. When it appears, select it and then select “Door Sensor Event”. If you have not yet connected your YoLink account, you will be prompted to do so now. This will show all your available door sensors. Select yours, then select the “closed” event because you only need this action when the door is closed.

Set up “then this”. Click “Add” next to it and find your speaker. For this example, I’ll be using my Sonos, but again, you can use Google Assistant or Alexa. I’ll make sure my Sonos account is selected and then select the speaker I want to use from the list of available speakers that IFTTT provides. Select the playlist or stream of your choice. I have a playlist of classical elevator music because I have a twisted sense of humor.

A word of caution here: remember that your Sonos speakers may be available to everyone or just you. If you leave them open for guests to connect, you run the risk of the guest turning off the elevator music and turning on Dave Matthews, messing up your Spotify algorithm forever. It doesn’t matter how I know. Protect 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 have a Nest or Alexa, you can say “Hey, welcome to my bathroom” when someone comes in or give Disneyland-like instructions when they get on the ride.

More…

Leave a Reply