Sensors for Room-by-Room Presence Detection

Hello,
Please do let me know if this topic belongs in the mailing list, as I am aware this forum is very new and might be intended for a different purpose. In any case, I am very interested in various ways to optimize the presence detection capabilities in HA as it seems like something the platform excels in.
I’ll use as my example the classic use-case wherein lights are configured to turn on and off automatically when you are in the room.
Based on my experience with geofencing and presence detection based on device detection such as the router components, such methods are useful for determining who is home but would not work well as a means of detecting presence on a room by room basis (unless you have a really really big house with really really big rooms…)
AFAIK, that leaves either some kind of camera or sensor hardware to actually determine which spaces are occupied and which ones are not. My ultimate goal with this thread is to determine which methods are most effective, easy to set up and affordable enough to have multiple sensors in various locations of the house. Webcams for example, may be cheap, but they can be resource intensive and may work best in certain locations like the front door and a baby room.
I’m picturing the most scalable sensor options to be a combination of standard PIR triggers and Ultrasonic Distance sensors, both of which are dirt cheap when purchased as standalone components. Standalone sensors however would require custom configuration via an arduino-type network like Mysensors.org. Without proper guidance such a setup could be quite time consuming, so if others have configured custom sensors like the Ultrasonic Distance Modules via Arduino/Mysensors.org and Home Assistant please do share your stories!

The problem with per room presence detection is that it has to be very accurate to be useful. Especially being detected as not there while you are is annoying. You don’t want your lights to turn off while you’re in a room or forcing you to wave your hand. You could setup a huge timeout before marking the room unoccupied but that makes presence detection only useful for entering rooms.

An easy approach would indeed be PIR/distance sensors.

[quote=“balloob”]An easy approach would indeed be PIR/distance sensors.
[/quote]

That was my thinking as well, since it would need to be both accurate and affordable enough to set up in the area of 5+ sensors per home. Following that logic then I’m thinking this would be a great use-case for the MySensors component. I must admit, I’ve had all the hardware for a Mysensors setup for over a year and have yet to find anything that I couldn’t just as easily accomplish with a direct wifi connection (via Arduino Yun/Electric Imp, ESP8266 etc…) So I’m curious to see how/if such a setup would be worth all the extra legwork…
I’ve gone ahead and set up a serial gateway per the instructions on mysensors.org/build/serial_gateway.

Then I added the Mysensors component to configuration.yaml- home-assistant.io/components/sensor.mysensors/.
Then finally I wired up a PIR sensor to an Arduino-
.
Now once I confirm that my RPi recognizes the serial port for the gateway, how do I tell home assistant to listen to the motion detection events?

I have an existing alarm system with a number of PIR, I was able to use them also as sensors by connecting them to the GPIO of RPI. However as balloob has mentioned, this is not the ideal setup as you don’t know who is activating the sensors.

I be testing using a Mi band strapped to my wrist with a python script running bluetooth probe every few seconds. could have used my phone, but I often leave it behind in another room when i am in the house.

I wonder if this would be a good case for testing out Pebble’s
" Smartstrap" SDKhttps://developer.getpebble.com/docs/c/Smartstrap/… In theory, it should be possible to use the SDK software to reconfigure the Bluetooth connection to work independently from the phone without needing any extra hardware. The fact that they included a hardware serial port however was one of the main reasons I got the new Pebble Time, so it would be interesting to see how much can actually be squeezed onto a watch strap…

The problem with relying on wearables for presence detection of course is it only works for one person. In my household for example, I’m able to control almost anything with my smartwatch, but my wife isnt sold on the wearables thing just yet so the only way for her to manually control my automated lighting, smartlocks etc… is either through her phone (which is rarely ever charged…) or through some kind of manual button trigger that I’ve set up beforehand…

This is something that looks extremely promising: indiegogo.com/projects/xand … -cameras#/

The upfront cost is a bit high, but if it works as well as they claim, it could be worth it.

2 Likes

Have you guys tried out the LD2410B/C sensor?