Which is the best way to build a room presence detection system?

Keep in mind that a PIR sensor costs less than a buck while this thing costs about 30-40 bucks.

I just used 2 VL53L0X to detect motion at the entry point at the top and bottom of my staircase.

I modified WLED codebase to support these sensors and to turn on / off an LED strip.

I considered using two of these at top and bottom to be able to track number of people on the stairs but thought it was more hassle than I need for now.

ESPHome also supports this sensor (https://esphome.io/components/sensor/vl53l0x.html). I did get a single sensor working on a NodeMCU running ESPHome and reporting the distance back to homeassistant, but I’m unsure if ESPHome can handle multiple of these on the same device because the sensors use the same I2C address and you need to change the address of 2nd sensor on boot if you want to read data from these on the same microcontroller.

Alternatively, you could look at VL53L1X, which has two ‘zones’ for being able to track direction of travel.
Though there is no ESPHome support for this (according to their site). I have ordered one myself to play around with but it hasn’t arrived yet.

See their example here: https://www.youtube.com/watch?v=c91Ve-g0J2U

Still seems like this is not going to work for tracking multiple people passing under the sensor at the same time.

2 Likes

If you flash your RF Bridge with OpenMQTTGateway or Tasmota, the number is limitless.

Hi, would you mind sharing some details on that “cheap crow alarm system” you have?

Well, honestly they don’t manufacture it anymore but i believe you can still find it online 2nd hand or unused on some sites. This is my panel and keypad…. I recently bought a non used one for 20 USD (panel only) for backup. I guess AAP NZ still sells this under AAP Elite S Brand and Model. This is the kind of alarm panel which has been used without any computer connection, only telephone lines… So, You need to add an AAP IP-Module on top of that.You also need to add an AAP IP-Module on top of that… It is also sold under Crow Brand. It supports 16 zone PIR and magnetic contact (all wired) sensors; if you want wireless sensors, that is still possible with an additional FW2 module card and FW2 Crow sensors(The price goes up of course in this setup).

After all setup, you need to upload a special firmware from AAP on IP-Module. I wrote a custom component for that in order to be able to use it on HA. You can find details for the custom component here.

All in all, the alarm can work standalone and HA connected. All sensor states are shown online on HA, including remote arming the alarm system and personally i am very satisfied for the performance and stability.

@burningstone Your automation based on starting a timer is exactly what the Tuya smart life app supports natively. The problem with it is that when the timer ends, it simply triggers the turning off (or whatever you configure) of the lights/switches even if there was some motion between the starting of the timer and the end of the timer.

Instead of that approach, I just created a trigger based on the time difference between the last-update time of the binary sensor for the motion sensor and the current time (from the time sensor, not now()). That way you can trigger your automation after a determined duration of motion sensor idleness. See the config here: Tuya motion sensor is not supported in Home Assistant

Good to see how you’ve augmented your motion sensor triggers with BLE triggers though. That could help with genuine absence of motion even when people are present (a big problem).

I don’t do it like this, it’s just an example on how I would do it with native HA automations.

No, the automation I suggested will restart the timer if motion is detected again after the timer started.
It will also restart the timdr if one of the “override” entities is still on when the timer finishes.

Oh ok got it…

Just in case anyone is interested, I wrote a “detailed” guide on how to setup room-based presence detection with Room-Assistant here.

5 Likes

I am looking at Room Assistant right now and it is quite promising, but you do need a reasonable distance between your rooms, otherwise you end up randomly jumping from one room to another.
I find motion detectors unreliable for presence detection. Too often I find myself sitting quietly on the couch reading a book (no tv on) and having to wave my hands around madly to get the light to turn back on. Of course, I could extend the delay in turning off the lights, but then that defeats the purpose of having automation and it costs me more, and is more annoying, than just using a switch to turn lights on and off.
I think a multi-device approach is likely best. Bluetooth, Motion and maybe some other device.

1 Like

For me it works quite good, but we have thick concrete walls that separate the rooms so I have almost no false positives and these I handle with distance parameters and priority in room assistant.

1 Like

@Burningstone I am looking at your github to get ideas.
I do like Room Assistant now I am testing it on my Dev Home Assistant with two Raspberry Pi’s. The only thing is, we tend to hang the keys on a hook in the hallway.
I don’t think iPhones can do BLE as a beacon, and my partner has an iPhone. Happy to be corrected if I am wrong there.

I think with the phone you can use bluetooth classic but I never tested this.

There are also Xiaomi Mi Fitnessbands that do BLE as well or if you wear slippers, you can cut a small hole and put the Nut mini in there, there was once a user who did this and his results were pretty decent.

Yes, I can use bluetooth classic. I think this means I cannot use BLE at same time, but that could work okay.

Has anyone looked at Happy Bubbles? I know the creator of the project has abandoned it now, but he open-sourced both the hardware and software.


This looks like it could be interesting if someone wants to revive it. ESP32’s are a lot cheaper than Raspberry Pi’s.

Motion sensors and Bluetooth won’t cut it in my opinion. Motion sensors don’t know you’re there if you are sitting on a couch. Bluetooth requires you to have your phone or some tracker with you. I don’t think the tech is there yet for the consumer market. However, I think these Grid-Eye sensors are the future.

It’s an infrared array sensor that will pick up your presence if on the couch or walk into a room without your phone.

1 Like

I have seen systems based on similar technology and they are ridiculously expensive for home use.
The Grid-Eye sensors appear to still rely on infra-red technology and the sensor seeing you, and seeing some kind of movement to differentiate between inanimate objects and living/moving objects.
Bluetooth needs a device with you, but as long as that device is in the room and not moving a system similar to happy bubbles can detect the device in the room. Unfortunately reliant on a device.
Geofencing can do home and away presence in a broad sense, but accuracy is questionable.

The bane of my existence at the moment is presence and room detection. Maybe the old light switch on the wall really is the best way to do things.

1 Like

You can buy these sensors for $40. It is infrared but its like a thermal camera it doesn’t require movement. Where have you seen these systems?

In my opinion they do! You can have a MiBand or put a tracker in your slippers, to make them less “invasive” and easy to have them with you all the time. It works fine for me for more than a year now.

There is also the cheaper Omron D6T, which comes in 1, 4 and 8 array versions. The single cell is about half the price of the grid-eye. There also appears to be an ESPHome custom component that someone has started to develop.

Think I might give this a go as an upgrade from my Xiaomi PIR Zigbee sensors in some rooms… I think a single cell would be enough in say a living room pointed at the sofas or for bed presence.