I’m curious how do people reliably detect presence in a bathroom (including shower and toilet areas)? I couldn’t figure out a good way to detect when someone is in the shower. I might be able to do something with the toilet seat… if I’m sitting down. However, I doubt my wife is going to let me hook a pressure sensor under the toilet seat.
I was toying around with the idea of a discrete thermal sensor camera. However, I couldn’t find something that didn’t require building the entire device myself. I tried looking for something that’s already pre-built (or require minimal electronics experience); but, didn’t find anything.
If you close the door when it is occupied - a door sensor plus PIR - if movement and the door closed, leave the light on!
Unfortunately, in my house we often have the door ajar when in the shower. I have used a temp/humidity sensor to detect if humidity jumps from than ~3% then someone is showering.
Combining sensors in a group can be helpful - I have the “showering” sensor and a PIR in the same group - so if either is on, the group is on and hence the room is considered occupied.
Toilet … I am living the same hell - very unpopular when the lights go off, as the PIR is not good at detecting “times of quiet contemplation”
I have a 360 degree motion sensor (PIR) mounted on the ceiling directly above the shower glass door such that it can ‘see’ both sides and therefore both detects someone in the bathroom or in the shower
i use a doppler motion sensor (like this, connected to an esp8266) mounted in a suspended ceiling. this detects almost every motion in the shower, on the toilet and unfortunatly also sometimes in other rooms (doppler radar motion sensor can see through walls). bbut the doppler sensor works much better than a PIR sensor, which is irrritated by steam (from the shower) or the heater.
to minimize false positives i build logic in HA to only mark the bathroom occupied, if there was motion in the hallway first.
recently i switched to a people counter sensor (modeled after this), that works like a regular and advanced photo sensor (or photo electric barrier) and that i use for initial ocupancy-detection (further movements are detected by the doppler motion sensor, to not run into the 2 minute timeout to turn the lights off again). unfortunately the time-off-flight sensor based people counter is also irritated by steam, so if humidity is rather high in the bathroom, i fall back to the dopple motion sensor.
to see if the toilet is occupoied i use another time-of-flight sensor, that measures the distance from the ceiling to the toilet bowl. it’s pretty easy to detect if someone is sitting on the toilet or even deduce what kind of business they are conducting.
detecting presence in the bathroom is one of the most complex combination of automations in my setup, there are so many variables and use cases you have to think of …
Regarding sitting/standing by the toilet.
Perhaps a ultrasonic distance meeter on or behind the toilet.
That way if there is a value less than 1 m then someone is there, else the range is probably to far to read or a fixed value.
You might be able to improve on the logic of that, with say, node-red.
start a timer when the motion detector turns off… and if any time while the timer is running, it turns on, then reset the timer. and toss in a trigger node, which will extend the delay on tiggered, and then even a waiit untill node… options are endless
im current dealing with a not so happy WAF from the past year of learning all this, my whole house is on motion and lights. last month or so I’ve added thermostat, and 2 ifan03s in the ceiling fans…
So now im dealing with… if motion and time of day, someones home and the temperature is in a certain threshold along with the target temp being close. that I set proper fan speed… and if my wife is on the couch comfy,. and the fan turns off… i better run… so ive already added in , keep the fans on,. and at a certain speed (determined by the above temperaturelogic), Its all about being comfortable without having to think about it… or adjust it… problem is… im always thinking about how to improve it,. hah
Thanks for the tips. I think I’ll just add another motion sensor to my bathroom that has a humidity sensor… then, group it with my existing one. That’s should get it much more reliable.
Hi there.
Not sure this will help but i have a flow sensor on the shower flow pipe which closes a clean pair of contacts if water is flowing and if the time is after 6am it turns on a Sonos radio station via a speaker in the ceiling. I also have a small reed relay attached to a float switch in the cistern that can detect a toilet flush which i use to monitor water use
I had this same problem, till I realised that humidity spikes when someone is in the shower. You can use that detect shower presence, as for toilet that’s always a bit tricky.
I had this same problem, till I realised that humidity spikes when someone is in the shower. You can use that detect shower presence, as for toilet that’s always a bit tricky.
It seems like there would be a lag from the time someone starts to take a shower and the time the air humidity changes in the bathroom.
I use a motion detector to turn lights on and the Humidity sensor to tell if someone is in the shower. Humidity spikes pretty quickly within 2mins of shower starts so I use this condition to ensure lights stay on. When humidity drops the normal time since motion triggers lights off. Works perfectly.
I started out with motion sensors, but as mentioned above, that doesn’t work for when you’re in the shower and want the lights to stay on. I also installed humidity sensors, and that helps with showering, but not for other activities in the bathroom where you’re not moving enough to trip the sensor or are in an area where the sensor is obscured. The humidity sensors are good for controlling the exhaust fan, though!
What I’ve settled on for now is a combination of a motion sensor (Hue) and a door sensor (SmartThings). I have a boolean helper called is_someone_in_bathroom. It gets set to on when motion is detected. It gets set to off when motion is not detected for some time AND the bathroom door is open. Then I trigger automations based on the is_someone_in_bathroom helper. That also decouples the occupancy detection and the triggered action (lights, fan, etc.) for easier debugging.
The logic is essentially “if motion is detected in the bathroom after the door is closed and the door has not yet opened, assume someone is still in the bathroom until the door is once again open”.
Here’s the automation code I’m using for occupancy dectection: