now we can install ESP32 in each room and connect it to HA, I’m looking for a minimal config integration to do room presence based on BT MAC address of our mobile phones/watches.
This should also include guidance what to put in the ESP32 if needed.
Goal is reliable BT room presence detections that can act as trigger in HA.
I would like to ask for the same.
I can see articles about ESPHome BLE tracker and verbose logs, iBeacon tracker of HA, binary sensor (able presence platform) and sensor (ble_rssi platform) under ESHPHome, but I cannot find out if and how to use them.
What I simply would like to achieve is to activate a BLE ibeacon based presence detector for multiple rooms, and if possible, the related entities should be generated under HA. At the moment if I use iBeacon tracker, it creates multiple entities for the same device (randomized MAC), or if I use binary/sensor under ESPHome, even if I register the relevant MAC address from the verbose log, the entities are created but never go to on state, more report the RSSI…
Is there a consensus how these can be used, what a re differences, advantages/disadvantages, and if they can be used with the Bluetooth proxy?
Hi Jules, since the introduction of ESPHome BT Proxy I was looking also in exteding it’s scope making it a room presence tool as well, I made a few topics looking for tips unsucesfully.
I kepp looking at this and I think I am half way to the solution now
Let me share my steps and maybe with all your thoughts we can have this working perfectly.
The idea:
When my iBeacon is connected to an ESP32 BT Proxy, in it’s attribute we can see “source” that is the name of the BT Proxy it is connected to.
If we know what proxy we are connected to, we know where we are (you must assign area to each BT proxy), that simple!
The steps:
Assign an area in home assistant to all your BT Proxy
Replace my beacon (sensor.c6a47b33_56f2_47c2_9884_6835e05caec2_1001_1000_estimated_distance) with yours.
Please note that I am not using the beacon itself, but I am using the entity ‘estimated_distance’, the reason for this is because I noticed that the beacon retain in it’s attributes the source proxy for a certain (long) time even after it’s disconnected while the estimated_distance entity is updating constantly.
You still can use the beacon itself as long as you are aware of what explained above.
Reboot your home assistant and then you will have the sensor just created and you can use it to track the room you’re in:
The problems:
At the moment I am still facing only one but huge problem: tracking is very inconsistent. Even if I have one or two ESPHome BT Proxy in every room, still several times my iBeacon (Android phone with companion app) seems disconnected from every BT Proxy and I really cannot understand this, as you can see from the screenshot above, sometimes it report me as “Sconosciuto” that means “Unknown”.
I try several settings in the BT Proxy configuration for window, interval, ecc… but none really changed anything. If we can manage to fix this issue we are done with our BT Proxies as room presence tool
I also tried to change the companion app BLE settings increasing the BT power but also in this case without success.
It’d be great if ESP32 had a better “traditional Bluetooth” support. I’m using a pair of raspberry zeros and a script known as Bluetooth Monitor to this purpose. On any door open/close or motion detected HA sends a SCAN command to the script and updates the Presence entities. But I admit, Raspberry Pis are a bit of an overkill for the purpose… if only we could do it ESP32…
I’d love to work with ESPHome as it is more integrated in HA, easier to upgrade ESP devices and I expect with ESPHOME I would have the option to combine functions in one ESP (e.g. presence detection and room temperature).
I created a helper to track home status per person and an automation to switch the helper based on the status of the ESP’s.
This all works perfect for home presence, but for room presence I notice that the presence is jumping from room-to-room too often. So, room accuracy is not accurate enough yet. All the lines in the screenshot on history show how many changes are registered.
I guess that if I play around with the “max distance” I could find an optimum between nervous/unreliable room detection vs false negatives on away detection. Nice exercise for coming Christmas break.
If anyone has a good idea how to get room presence in ESPHOME I’m very interested and happy to abandon ESPRESENCE.
Sounds like you are getting close to a really good system.
Re the distance thing, I made a comment on another thread about adjusting the “Factor” setting in ESPresence. This should help to dial in the distance calculation that the ESP is using. Personally I think that ESPresence needs to add a few more adjustable settings to allow the distance accuracy and trigger reliability to be a bit better, but in the meantime, you can try this:
For mine, device_id seems to return the MAC address of the ESP32 and then area_name reports “None” even after I have gone to the esp32 in “Devices” and use the pencil to set an area.
Hi Matt, this was something I did more than one year ago, at that time it was working returning me the area of the BT Proxy closer to the device, I don’t know if anything changed since then.
I gave up trying to use BT Proxy for room presence mainly for 2 reasons, it’s slow and unreliable in detecting room presence and simply ESPresense works much better for me.
It is different firmware just like Tasmota is different firmware but, they bothwork seamlessly with HA over mqtt. The biggest thing is you have to play around with the settings to weed out excessive signal overlap and base station placement is important too. For example you wouldt want 2 base stations sharing a common wall like one was in bedroom1 and the other was on the other side of the wall in bedroom2 or else youll have to much signal overlap and device/presence will bounce between the 2 rooms which isnt very useful.
just starting off with this and would greatly appreciate some help with which esp32 device to select for bt room presence detection. thank you in advance. maybe espressif type? I heard good things about them.
I bought these but no idea if they will even work so happy to buy something else.
HA-Green is on the way and can’t wait to get started!
Would the Aqara Presence Sensor FP2 achieve the same and be much easier to setup?
All I really want is an SMS when wife has arrived home and parked in the garage so I know I can park outside the garage door. When I turn up at home and I park outside it’s so annoying to have to move my car when she pulls up so she can use the garage…real life problems