Closed Nihvel closed 4 years ago
Same problem here with my phone so this is useless for room presence solution. Tried first with an older Bluetooth adapater and didn't work at all but i bought a new Bluetooth 4.2 adapter with BTLE and this works but this only works for home presence and not for room presence.
Well the problem is (luckily) limited to the Mi Band. I've been monitoring how my Huawei phone behaves and the sensor does not have false alarms. When I'm home the bluetooth scanning works, finds the phone and shows it to 100. When I'm not home, to 0. When it's 100, it stays to 100. There are no "double scans" where it is seen an unknown or such. It's I guess how it is supposed to be. But I don't walk around the rooms with the phone, it is the Mi Band that does because I wear it.
I have a Xiaomi phone and it has no problem to log RSSI with my Google Home mini speakers for example. Also have a Nexus 7 tablet and it's same problem there. Yes it shows 100 for me so it finds the phone but it doesn't know which room i am in because it shows 100 not 40-60 or similar like my Google Home mini speakers. With that it can know which room i am in but trying to get this to work to monitor a room without Google Home speaker.
This probably won't be addressed as it's not Monitor's fault rather the Xiaomi mi band. Smartphones like Huawei, Xiaomi, Samsung... Their bluetooth is stable and Monitor works great
No monitor is not working xith Xiaomi phone either for me.
Hi Andrew, I've been playing around with Monitor for some months now. I believe I'm confident enough to know how it works but I am not sure if this that I show you is a bug or it's me to be the idiot (:
The log as soon as monitor is restarted:
I'm using the following "behavior" file:
Here's the issue: My gf and I have 2 Xiaomi Mi Band. Both of them are set to "Discoverable".
Monitor starts as a service using following command:
ExecStart=/bin/bash /opt/monitor/monitor.sh -x -b -tad &
This is the only monitor instance in the apartment.From the log you can see that at first the confidence is 100, both the Mi Band are seen. After a second this confidence level goes to 0. This happens as soon as the band is no more seen as its complete name + alias (
C1:E9:4D:54:A0:61 juri_mi4 Anhui Huami Information Technology Co., Ltd.
) but as**Unknown**
Beside this initial scan, which I believe should not happen , because the flag is set to
-tad
which as I understood it means that the scan runs only when a message is published to its MQTT topic, when I try sending a MQTT message to this topic it seems that nothing happens.I'm using MQTTBox client, I'm able to add a new entity to track simply by sending this message below which is part of what you wrote in the documentation:
topic: monitor/setup/ADD STATIC DEVICE message: 00:11:22:33:44:55 alias
This is a simple test that tells me that I am able to send MQTT messages to this topic.
So, now the confidence is 0 for both of them and I'm home. I believe that sending a
monitor/scan/depart
will run the scan and see my devices, but this doesn't happen.Moreover, I've been using this above command:
ExecStart=/bin/bash /opt/monitor/monitor.sh -x -b -tad &
For something like 3 months now. I have never, ever ran a scan by sending a MQTT message like above. It always runs scans by itself. It stays in background and constantly scans. This has the good effect that the sensor connected to Home Assistant gets updated constantly, the downside is I have no control over it. It happens very often that for some reason these Mi Band go in Standby. The scans start reporting 100, 0, 100, 0 ... and so on for, let's say, the whole night.This is an example of what I mean: https://imgur.com/a/Rq9l7Sh
When it is 0 I'm most probably out of home, and in fact the line is completely flat. When I'm home, it starts going 100 and 0, neverending.
I tried to be as clear as possible but please forgive me if I'm not. Obviously, ask me anything. I will be more than happy to run all the test that you'd require.
Thanks for your hard work!