Skip to main content
Contributor I
March 3, 2021

Play Sonos Radio in Bathroom when Philips Hue Light is switched on

  • March 3, 2021
  • 12 replies
  • 2788 views

Hi,

I have a Sonos Play One and Philips Hue spots in the bathroom.

 

I want to be able to autoplay a Sonos Favorite (Radio Stream) whenever the bathroom lights are switched on and of course, when lights are off the music stops.

I can’t seem to find a way. I have a Hue Bridge, Google Assistants (Sonos speakers) around the house. Tried IFTTT and Yonomi with no luck.

Anyone?

This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

12 replies

NissarK84Author
Contributor I
April 1, 2021

Hey guys,

Just wanted to give you an update on this, to help out people in the same situation.

 

I finally got it to work :)

 

I purchased a Philips Hue Sensor, which I placed in the bathroom. The sensor is set up using standard settings through the Philips Hue app, where if motion is detected, then the lights turn on. If no motion detected for 30 mins, the lights go off. I also have a Philips Hue Dimmer V2, which allows me to change scenes and also manually turn off the lights. So far so good.

 

Then I used the Alexa app and IFTTT to setup the following:

IFTTT:

  • Created an applet called Sonos On, where it basically plays a Sonos Favorite on the Sonos One speaker placed in the bathroom, that I had setup within the Sonos S2 app. It is just a local music radio station that I found through Sonos Radio and marked as Favorite.
  • Created an applet called Sonos Off, where it basically pauses any music playing in the Sonos One speaker placed in the bathroom.

Alexa:

  • Enabled the Philips Hue and Sonos Skills to link my Philips Hue and Sonos accounts to Alexa
  • Setup a room called Bathroom
  • Added the Sonos One speaker placed in the bathroom to this room
  • Added the Philips Hue Sensor placed in the bathroom to this room
  • Created a Routine called Sonos On,  where I set it up stating if motion detected in the Philips Hue Sensor placed in the Bathroom, then run the IFTTT applet called Sonos On, but only during the timeframe 07:00AM - 07:00PM. I have also added a suppress function, meaning the routine does not run if motion is detected within the first 30 minutes after the routine has run once (more on this later). This basically plays my Sonos Favorite (local Radio Station), if motion is detected and does not play / restart the stream if more motion is detected within the first 30 minutes.
  • Created a Routine called Sonos Off, where I set it up stating if no motion detected in the Philips Hue Sensor placed in the Bathroom for 30 minutes, then run the IFTTT applet called Sonos On, but only during the timeframe 07:00AM - 07:00PM. This basically pauses the music that has been playing within the defined timeframe, if no motion detected.

This basically means, that now the lights turn on when anyone opens the bathroom door, and music plays. The light goes off and music stops if no motion detected in 30 minutes, however, I have the possibility to turn off the lights before those 30 minutes have passed using the dimmer switch, while the music can either turn off on its’ own after 30 minutes or I have to tell Alexa / Google Assistant to do it.

 

Problem:

  • If I “manually” turn off the music either through Alexa / Google Assistant / Sonos App before the 30 minutes have passed, then because I have a suppression set for 30 minutes, the routine will not run no matter how much motion is detected by the sensor. However, if I remove the suppression of 30 minutes from my Sonos On Routine, then what happens is, each time the motion sensor detects a movement well, the Sonos On Routine runs again, giving a silent period of 2-5 seconds. I don’t know how to overcome this!

Questions:

  • Using suppression mode: is it possible to pause the music, when the lights are turned off manually using the dimmer switch?
  •  Not using suppression mode: How do I avoid getting the routine to run all over every time motion is detected by the sensor?

I hope some of you can shed a light and let me know if anything I have done is wrong here.

 

Thanks!

 

Sorry for the long post!

 

Br,

Nissar

melvimbe
April 1, 2021

Problem:

  • If I “manually” turn off the music either through Alexa / Google Assistant / Sonos App before the 30 minutes have passed, then because I have a suppression set for 30 minutes, the routine will not run no matter how much motion is detected by the sensor. However, if I remove the suppression of 30 minutes from my Sonos On Routine, then what happens is, each time the motion sensor detects a movement well, the Sonos On Routine runs again, giving a silent period of 2-5 seconds. I don’t know how to overcome this!

Questions:

  • Using suppression mode: is it possible to pause the music, when the lights are turned off manually using the dimmer switch?
  •  Not using suppression mode: How do I avoid getting the routine to run all over every time motion is detected by the sensor?

I hope some of you can shed a light and let me know if anything I have done is wrong here.

 

Thanks!

 

Sorry for the long post!

 

Br,

Nissar

 

I don’t know if this is possible, but it sounds like you want music to turn on if motion is detected and the lights are off currently.

 

CASE 1 - Motion detected; lights are off

ACTION -  Command to turn on music, then turn on lights

 

CASE 2 - Motion detected; light are currently on

ACTION - do nothing

If someone in the room manually turned off music, then motion will not trigger music unless they turned off lights too.  The only flaw of this is that if someone leaves the room without turning off the lights, and someone else comes in, it won’t know that it’s a new person.  You wouldn’t need a suppression mode. And I would think you can then trigger music off when the lights are turned off?

If you can’t use manually turning lights off as a trigger, the you could use a smart button.  Amazon used to make echo buttons if you can get one of those.  if not, something like this would work, though probably cheaper options.  Instead of a manual switch for the lights, have this button there to trigger a routine that shuts off lights and the music.

 

Danny