I’m thinking about the best way to switch lights on and off in the bathroom. Switching off after X minutes of no motion means there will often be cases of lights going off when someone is sitting on the toilet or showering (unless adding another motion sensor for the shower).
My idea is to switch on whenever motion is detected, but then also have a door sensor to aid in switching lights off. That is, something like this:
Switch on when motion is detected OR when door is opened if lights are off.
Switch off after 1 minute of no motion, unless motion detected after door is closed (that is, someone entering the bathroom, rather than just closing from outside).
If motion detected after door is closed, leave lights on until door opens again. I.e. switch lights off X seconds after door is opened again, UNLESS new motion is detected before that time period (such as if someone is opening an unlocked door, then lights should not be switched off, to let someone play with it, like children who are not locking the door).
I will most likely use SharpTools as a dashboard. But if I create riles there they will run in the cloud. Is the above possible using local automations? WebCoRE is also run in the cloud? Or does someone have better ideas for when to switch lights off?
I also realize that if motion is detected BEFORE the door is closed, the sensor may not detect motion again until after the sensor reset period (by default 60 seconds for the Aqara Motion Sensor, I think). Then the above scenario would not work…
Yeah, but you can be in the toilet for more than X minutes without the sensor detecting motion. That’s why I thought a combination with a door sensor would be better for presence detection. I guess I could just set the no motion time to 5 minuets and if someone stays longer without motion they will just have to wave.
Motion sensor is placed on bathroom ceiling to include shower area, toilet sometimes turns off early but never the bathroom. Using single smart lighting rule rather than 2 automations and coupled with illuminance sensor but the end result is the same
you need a presence sensor , there are several ultrasound sensors available.
But now I have an issue with washing machine, when it washes, the sensor sees the motion and keeps lights on
I think these automations could be greatly simplified, and will work more reliably, if you increase this time to something like 10-15 minutes. I usually use 15 minutes of no-motion, from a single or multiple motion sensors, for all of my occupancy automations. This allows some buffer for sitting still for a bit, ducking around a blind corner, etc.
I had the same puzzle as you to wrap my head around initially. Here is what i did:
In plain sight of bathroom entrance and toilet area i placed a motion sensor that detects when someone enters and if someone is catching a break from the kids with some toiletyoga.
In my shower i placed a temp & humidity sensor to detect when humidity rises in case anyone is not in plain sight of the motion sensor because they a taking a shower.
In order to execute everything locally i had to use a special Hue bridge integration in order to trigger scenes in Hue.
Here is my automations to make lights work, including the bathroom:
Mode/Location settings
Mode → Morning
If 06.00 everyday, then change location to Morning.
Mode → Day
If 1 hour after sunrise, then change location to Day.
Mode → Evening
If 1 hour before sunset, then change location to Evening.
Mode → Night
If 23.00 everyday, then change location to Night.
Bathroom Light automations:
Bathroom Light Morning&Evening
If Motion Sensor active & Location == Morning,Evening, then Bathroom Light Group On (Trigger Scene Dimmed)
Bathroom Light Day
If Motion Sensor active & Location == Day, then Bathroom Light Group On (Trigger Scene Bright)
3 … And so on with the other locations.
To turn off Bathroom:
If Motion Sensor inactive for 5min & TempHumidity Sensor is == or below 75%, then Bathroom Light Group Off.
This is a terrible lot of automations to suit my needs. But i couldn’t think of a better way to accomodate the settings for what i want without using webcore and maintain local execution.