No more "lights out" in the bathroom

I think I found a solution to the problem where a motion detector turns off the lights if a person is not moving. OK, this only works in special cases, but to me, these were annoying special cases.

I know about mmWave sensors, but this is simpler and cheaper and does not require 10 hours of parameter tuning.

I was in the bathroom the other night, and the lights went off. I moved an arm to turn them back on, but then thought, "What a stupid computer!" How could I have left the room without opening the door?

So now if the bathroom, bedroom, or ANY room with a door is occupied and the door is shut. I disable the motion sensor until the door is again opened.

Until they invent a Star Trek teleporter, the door remaining shut pretty much means the person is still there. Of course, this only works if there is a door and you close it when you go in. Bathrooms are the main use of this.

If you don't have door sensors, Ikea sells Matter over Thread door sensors that run on rechargeable AAA batteries for $8. Aqara sells (I think) the best Zigbee door sensors, and Ring, the best Z-Wave door Senors. (I have all three)

What you're doing is known as 'wasp in a box' or a 'wasp'

Look through HACS you'll probably see a few automations.

For any closed space if you only have one entrance. Mathematically if you close it THEN sense motion. You can assume it's occupied until the door opens, or your human has learned Teleport and it was Super Effective.

I have wasp automation on all my rooms.

1 Like

A problem with these types of automation is that motion sensors can be sticky - still registering presence after someone leaves.

Which means you can't tell the difference between two scenarios:

  • Person leaving a room and shutting the door.
  • Person leaving the room, someone else entering and then closing the door.

Depending upon your "usage habits" you could just use a simply or: the light is on if motion is detected or if the door is closed.

But that doesn't work if you regularly leave the door shut with no one in the room.

1 Like

Use Good sensors.

There's no excuse for 'sticky'

Ive run my house like this for 5 yrs. Works fine I've literally never had a sticky sensor or. The other because I built my automation around people's habits. Not the other way around.

I knew I could not be the fit to think of this, so it even has a name. I wanted to hear about it and any problems. "Sticky" sensor, two people comming in togeter and leaving seporaly,... Thanks, you all gave me things to concider.

Another easy partial soltion is using multiple sensors: If one sees you the lights go on but the lights only go off is all sensors fail to see you.

In the 1980s as an engineering student we were asked to control lights by counting how many peole passed through a few doorways in a large lecture hall The professor said it can't work perfectly and he specically was going to look at how with dealt with the problems. A simple problem is if a child is carried in but walks out.

In this case, the ways that the door sensor solution can fail are infrequent and no worse that no doing the automation.

Currently the sensor can not see though the shower door and the light go out. This happens 100%. but odd corner case will be less frequent.

I also thought of water motion sensor. If you see movment in the bath and the hot water is in use some place in the house, don't be so quiick to turn off the lights. All tankless water heaters have flow senors already. But there are 100 ways to fool that too. But do any of the failure mode make it worse then not doing it? I don't know?

Finally, I have not tried yet but if there are adjacent rooms and each has a sensor (door, PIR or mmWave. It should be possible to use some logic that if there is a person in one room he likey left the adjacent room. I think we call this whole idea of using lots of facts that only party work but with enough, door opens, occupancy goes to falase and the haot water is in use and it is night time. Put enopiugh things together and we can make vary good guesses. We are stopping into the world of AI here. I think this is the b=nest big step in home automation. We SHOULD be able to get better data with multiple overlapping sensors. I brough up the bathroom case is the simplest example. What if you have 100+ sensors? You might ig you count the Hue light bulbs. No one can write hand-coded automation for 100+ sensors and keep it right.

Whilst I agree it may be possible to invest enough in sensors that it will allow you get a totally perfect read on everyone in the house. If you were able to do that, you wouldn't need "wasp" logic, you could just write, if number of people in bathroom > 0 turn on the light.

I agree with your sentiment:

Sometimes the perfect automation is no automation - the bathroom light in my house is the only light that isn't smart - still uses a dumb on/off switch **.

This really comes down to a few points:

  • I don't need to explain to guest how to use it (or that the light wont go off when they are in there).
  • It doesn't really bother me that I have to switch the light on/off when I go in there.
  • The light never turns off when I am in the shower....

** - I can see the utility in replacing it with a smart switch so that I can be sure ALL lights are off when I leave the house, however I doubt I have accidentally left it on more than once every couple of years, that use case just isn't important enough for me to bother.

To be clear there are some lights in my house that would be a pain to use, if I had to use switches to turn them on - my switch placement assumes that sensors will turn lights on (yeah that may be too much), anyway it's not that I am against sensors - it's that I don't think they are the right solution for all problems.

Just use ceiling mounted mains voltage mmWave sensors. They are cheap as chips and look and work great.