Odianosen25 / Monitor-App

Appdaemon App for Andrew's Monitor Presence Detection System
74 stars 9 forks source link

wrong nearest_monitor if rssi unknown #48

Closed nibblerrick closed 4 years ago

nibblerrick commented 4 years ago

Hi,

I haven't paired my devices with monitor, so it can't detect a rssi, which is so far fine to me. I now set up two monitor-nodes and the monitor-app.

If e.g. I am on 2nd floor and start monitor on the 1st and 2nd floor on the first floor rssi reported is -99 (as expected) but on the 2nd floor rssi isn't detected at all. Confidence for 1st floor is 0 and for 2nd floor is 100. nearest_monitor reported is 1st floor. If I disable BT on the device confidence drops to 0 and rssi reported is -99. Device switches to not_home. If I reenable BT confidence on 2nd floor is 100 again and nearest_monitor is 2nd floor. As long as rssi is reported once the nearest_monitor is chosen off of the confidence.

So: is this expected behaviour, is this a bug or is there some configurationsetting I've overlooked?

Thanks in advance!

Odianosen25 commented 4 years ago

Hello @nibblerrick,

Yeah its a good catch and is a bug, will get it fixed in the next release. Thanks for spotting it out.

Regards

nibblerrick commented 4 years ago

Hi,

hadn't thought I really cought a bug :-) Then I'll have a look if the next release behavies as expected when it's ready, thanks

Nico

Odianosen25 commented 4 years ago

@nibblerrick ,

Just pushed an update to dev, you can try that now if you can. So what is expected is this

If confidence goes to 0, the rssi will report "unknown", so if there is one that has -99, that will be selected as the nearest monitor.

Though since you don't have the 2nd floor paired, could still lead to irrational "nearest monitor" state, so do kindly pair with it all. I am working a simple way to part devices, but that will be coming later.

Regards

Odianosen25 commented 4 years ago

Closing this issue, I believe this has been fixed. Do re-open if not