Room Presence Detection Concept

Room Presence Detection Concept

What?

The goal is to create a presence detection system that is moderately reliable and precise, enabling the tracking and monitoring of a user’s movements within the house.

Why?

As my Home Assistant system has expanded over the years, the number of integrations, sensors, and devices has also increased. With various sensors and devices scattered throughout key areas in my house, I can now leverage them to create a comprehensive understanding of the activities in specific areas or rooms.

Certain sensors and devices, like a PIR motion sensor, have the capability to broadly discern a person’s activity or presence in a room, whereas others, such as facial recognition or device tracking (Bluetooth beacons), demonstrate a superior level of accuracy and reliability.

Employing a blend of both can establish a kind of “rating” to assess a room, offering a more precise evaluation of a person’s presence in the end.

Being able to precisely ascertain a person’s location within a room throughout the house will significantly assist in configuring specific automations, including those related to lighting, media, and security/alarm systems.

How?

As stated earlier, leveraging a mix of sensors and devices can assist in formulating a “rating” for each room based on triggered events or ongoing activities. Within a room, each device/sensor will be given a certain value depending on the reliability of the users presence.

For instance, here are the devices and sensors in my office along with their respective ratings.

High Medium Low
PC Logged In Seat Sensor Motion
BT Tracking (Phone and/or Watch) Nest Hub Active Door
Facial Recognition TV On Lights
Xbox On

High

These devices and sensors offer a high level of assurance regarding a user’s presence in the office. The exclusive use of the PC by myself, without involvement from others in the household, serves as a distinct indicator of my presence in the office. Similarly, the Bluetooth tracking of my phone and/or watch, with the beacon positioned under my desk and configured for a limited range, provides reliable confirmation. Facial recognition stands out as the most dependable among the three methods.

Medium

These devices and sensors can confirm the presence of an individual in the office without providing a definitive identification of that person. While the likelihood of someone other than myself using the TV and/or Xbox is extremely rare, it is not entirely certain, as these devices could potentially be operated or triggered by my wife through Home Assistant via a dashboard or button. The same uncertainty applies to casting to the Google Nest Hub, as there have been instances where my wife accidentally selected the Nest Hub while attempting to stream elsewhere in the house.

Low

These sensors are the most basic and are more susceptible to producing false positives. For instance, my cats frequently wander around the house, unintentionally pushing open my office door and triggering a PIR sensor. Lights can be easily activated or deactivated through inadvertent button presses on the Home Assistant app while scrolling or attempting to close the application.


To convert this into a kind of “rating” system, each category (High, Medium, Low) will be assigned a predetermined score. By employing logic and elements within Home Assistant, we can establish a sensor that assigns a value indicating the potential presence of a person in a room.

  • High elements are given a “score/rating” of “1000”
  • Medium elements a “score/rating” of “100”
  • Low elements “score/rating” of “1”

So the logic would be something along the lines of …

  • If a room score is between “1000 and 3999” then set “Office Presence” to “Sam Occupying”
  • If a room score is between “100 and 499” then set “Office Presence” to “Possibly Sam Occupying”
  • If a room score is between “1” and “99” then set “Office Presence” to “Unknown”

This is what I’ve managed to conjure up so far in regards to my idea of a room presence detection system.

There are plenty of other elements to consider such as the frequency of checks and triggers but I’d love to hear what you guys think and get your input.

Is this the right way to go? Would it be best to set this up using Node-Red or some sort of scripting?

Let me know what you think!

1 Like

I like the concept. I may be off, but the factor of 10 jump in weighting “feels” very large and may make it very challenging to utilize the lower weighted inputs.

Some other factor (eg. two/2, hint hint) might reduce those challenges

1 Like

Strike me on first read that a lot of what you described can be achieved using the Bayesian sensor. Only down side if you would need a sensor per person per state (eg person a at computer, person a in room, person b in room etc).