Skip to content

Room occupancy detection

Since I’m saturating my home with HomeKit sensors, I’m really focusing on the smart home automation piece.

I just figured out how to detect the occupancy as I want for the bathrooms in my house:

If motion is detected in the bathroom -> Turn on the lights

When motion is no longer detected And the door is open -> Turn off the lights

If the door is open -> Turn off the lights

I came up with these automations because the motion sensors aren’t exactly right when you’re in a room a bit and you don’t move enough to keep the motion sensor detecting movement. The conditional rule of turning off the lights only if the door is open was something I had to add with the Home + app. I have the lights off when the door is open because it only makes sense that when someone comes out of the bathroom they no longer need lights on. This setup works great for bathrooms, because … well … you always close the door when you’re there.

Where I struggle are our rooms that don’t have doors, like our study, or have doors that I never close. Again, just using motion sensors is not reliable enough to keep the lights on. I would also like to use the occupancy to control TVs, monitors, wall-mounted iPads and anything else I think about in the future.

Initially I thought of using something to detect the proximity of Bluetooth from our iPhones or Apple Watch. My wife and I don’t always carry our phones around the house with us and sometimes we don’t have our watches tied. I’ve also been thinking about some kind of seat pressure sensors, but I think it will probably go a little too far.

I’m curious what other sensors / inputs I could use, as compatible as possible with homekit / homebridge, to safely detect occupancy in a room? I would also like to hear about semi-automation related to anyone.