Distributed Room Proximity / Presence for Home Assistant via Bluetooth

Since I started using Home Assistant I’ve been looking to create Automations based on room presence. At first, I tried to find an already existing room presence solution and came across a promising couple of them. Unfortunately, neither fit the bill. One used an unofficial Google Home API that was shut down. The other was a bit more promising but at the end of the day only worked as a binary sensor.

For the last couple of days I’ve been working on a DIY proximity based room presence detection solution that works with Home Assistant.

It uses Raspberry Zero W devices to track the proximity of phones, smartwatches, etc. via bluetooth. The relative proximity is determined by querying the RSSI (signal strength) of the tracked device using a combination of rfcomm and hcitool commands executed via a Node.js script.

Once the signal strength is retrieved, a proximity value ranging from 0 (closest proximity) to -100 (undetectable) is calculated and pushed to a MQTT Broker (Mosquitto) running in Home Assistant. From there, you can setup sensors to determine the presence in a room (or relative distance) of a particular user. These sensors can be useful for triggering Automations based on presence (like turning lights on when someone walks into a room, turning an AC off when a room is empty, and more).

You can find the project with through instructions here: https://github.com/jxlarrea/ha-bt-proximity

Hope some of you find this useful!

3 Likes

Hello @jxlarrea,

Nice work and I noticed you did mention in your GitHub that there were other systems that could do something similar. In particular you did reference that of @andrewjfreyer, but you compared it to the presence system which is the old one and not monitor.

You can check out the monitor which does similar and more of what yours does. That’s what I use presently and it’s quite nice at it.

Kind regards and good one again.

1 Like

I have the monitor installed on some rpi zero w for home/away and that works. I like to expand into presence detection in each rooms around the house. The rssi tracking isn’t working so well for me. Did you also have this setup as well? If so, how is the rssi tracking working for you?