agittins / agittins/bermuda

Feature Request: leverage presence / PIR sensor for more accurate room identification

Aperta
#627 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
2k
Fork
70
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**Is your feature request related to a problem? Please describe.**
Room identification in case of proxy coverage overlap is often inaccurate.

**Describe the solution you'd like**
I would like to enhance room location by combining the output / state of a Bermuda device (e.g. smartphone) and the relevant mmwave presence / PIR motion sensor(s). I am not an expert, so I am freely using BLE / RSSI / proxy words in ways that are probably scientifically inaccurate. :)

Situation "today":
-------------------
Bermuda assumes that the strongest RSSI corresponds to the proxy in the room I am physically in:
- I am in Room 1, which is close (in BLE terms) to Room 2 and Room 3; each of these rooms has both a BLE proxy and either a mmwave presence or a PIR motion sensor.
- Bermuda currently shows me in Room 2, because the signal from the proxy in Room 2 is stronger than the one in Room 1 (where I actually am).

Situation "tomorrow":
------------------------
I would like to use the output of a mmwave sensor (present/not present) or PIR motion (motion/no motion) to further filter the output of Bermuda so that it identifies the right room I am in (assuming I have the BLE-emitting device with me).
Ideally, the integration would have a per-proxy configuration, allowing the user to select the relevant such sensor for each proxy from a list (that I am fairly certain Home Assistant can present, potentially even filtering it down by the room I set the BLE proxy to be in).
Bermuda would then associate the respective proxy with the selected sensor and use the output of the respective presence/motion sensor to decide which room I am actually in, rather than assuming that I am in the one of the proxy with the strongest RSSI.
E.g. (same context as above):
- Bermuda initially "sees" me in Room 2, as that's the proxy with the strongest RSSI from those three "visible" in the location.
- Bermuda would check the presence / motion sensor for Room 2, which would say "nope, nobody's here".
- Bermuda would discard the Room 2 (proxy) as the most likely location and would go to the next strongest RSSI proxy. Let's say this is the one in Room 3.
- The same thing happens again (I am not physically in Room 3, so that one gets discarded as well). Bermuda moves on to the proxy in Room 1.
- Presence / motion sensor in Room 1 says "oh someone's here" and Bermuda picks Room 1 as the valid location.
- If no presence / motion data available to confirm the room, fall back to the "best RSSI" default (place me / my device in Room 2).
Obviously, this doesn't account for the case when someone _else_ is in Rooms 2 or 3 (which would trigger the respective presence / motion sensors) before Bermuda gets a chance to eliminate them as _my_ potential location.

**Describe alternatives you've considered**
I thought of building this all in Node-RED, but can see some blockers / inconveniences:
- the flow would need to identify programmatically the "nearest" (in BLE terms) proxies; not sure how (or if) this can be done - I thought of a manually-built "distance matrix", but upon creating it, it got fairly large and is victim to subjective choices (e.g. if 'next room' is at a distance of "1", the room 'one floor up and one room aside' is at 3? at 4? Would I measure the RSSI in each room compared to e.g. the center of the house/apartment? Should I compensate for various signal losses? How to ensure reliable measurements... and so on.)
- once nearest proxies are identified, the flow would need to compose their names based on some criteria (that'd assume their names are illustrative of the location they are in - they currently aren't) and submit those names to further steps for additional checks (not sure if that's possible at all)
The "distance matrix" idea is similar (independent, but same thought pattern) to the one described in https://github.com/agittins/bermuda/issues/518 (albeit that proposal is much smarter than what I can come up with).

**Additional context**
This could partially solve the Floor / 3D dilemma. Taking my example above, Room 1 (where I actually am) is on the floor _above_ Rooms 2 and 3. However, I am near the wall on which both Room 2 and 3 BLE proxies are, while the BLE proxy in Room 1 is on the opposite wall. The RSSI from either Room 2 or 3 proxies could conceivably be better than the one from Room 1 - especially if e.g. my body is between the proxy and the phone.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.