ESPHome-Apple-Watch-detection icon indicating copy to clipboard operation
ESPHome-Apple-Watch-detection copied to clipboard

How is presence determined if within range of multiple ESP32s?

Open Zipties opened this issue 3 years ago • 1 comments

I am currently using ESPresense and I have switched over one of my nodes to this project to test it out. What I am a little confused about is if I am within the "present" RSSI range of more than one ESP32 how can I handle this? ESPresense attempts to uniquely identify devices which makes this somewhat simpler as I can set my RSSI value to cover more distance, and whichever node reports the highest signal determines what room the device is in.

I can of course set the present RSSI lower, but that doesn't leave me much room for error as my devices seem to maintain great signal well into adjoining rooms.

Is there any suggested optimization for households with more than one apple watch? With each node declaring present or not present instead of device trackers it seems a distant watch would trigger the not present value for a room that is occupied with another watch.

Zipties avatar Feb 09 '22 19:02 Zipties

Hi @Zipties - Detecting individual Apple Watches is something that I'd love to do. I wrote about this in the readme. But I think it's too complicated with yaml + lambda, and this should rather be an ESPHome plugin. I haven't got a clue how to write a BLE plugin, so will need a lot of investigation and some mentorship before I can pull that off.

At the moment, the logic for presence is: if any watch is below a rooms threshold then someone is present in the room.

Each room keeps its own present/not present state, to avoid the complexity of managing state across multiple ESPs (in yaml+lambda...) You could do something in NodeRED, or build a template entity in HA, that uses the strongest RSSI to determine which room you are in.

dalehumby avatar Feb 15 '22 21:02 dalehumby