andrewjfreyer / monitor

Distributed advertisement-based BTLE presence detection reported via mqtt
1.67k stars 194 forks source link

Cycling Bluetooth Hardware on hci0 #327

Closed jun3280net closed 4 years ago

jun3280net commented 4 years ago

Hi there, I really love the ingenuity of this solution for monitoring devices. I was really hoping to test this out on my setup as I'm just starting to get into HA automations/Node Red - but it keeps cycling in my log.

Perhaps its the way my system is setup. I am running a Linux Mint VM (in a Windows 10 box). On Linux Mint I have Home Assistant with Supervisor installed. Everything runs great. Within Mint Bluez 5.5, the bluetooth sees the various devices. Monitor seems to detect my static device briefly before cycling.

Any ideas what is contributing to the log below? Thanks in advance

[-] 0.2.200 21-06-2020 01:57:32 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:57:38 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:57:43 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:57:49 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:57:53 PM [CMD-MQTT] presence/Hassio-VM/jdub_bt { ... confidence : 0 ... } [-] 0.2.200 21-06-2020 01:57:53 PM [CMD-NAME] 00:00:00:00:00:00 JDub_BT TCT mobile ltd [-] 0.2.200 21-06-2020 01:57:54 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:57:59 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:58:04 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment... [-] 0.2.200 21-06-2020 01:58:09 PM [CMD-INFO] cycling bluetooth hardware on hci0. please wait a moment...

jun3280net commented 4 years ago

I bought a Plugable USB BT Dongle for the VM. It appears to be working a bit better - but only for a couple minutes. Any idea as to what might be causing this behavior? The confidence should not change, as I have not moved the phone while troubleshooting this. Is there anyway to confirm whether Monitor is fighting over the Bluetooth resource? Thanks

image

And it seemed hung after that. I restarted Monitor - and now it shows this (seems like something else is taking control of the BT device) :

image

Chasing down what might be competing for the device:

image

jun3280net commented 4 years ago

Turns out the issue was related to Linux Mint - as it uses Blueberry as a bluetooth manager by default. Using Mint's Software Manager, uninstall Blueberry. Then using Software Manager, install Blueman. That fixed the aforementioned issues for me.

vitaliy-sk commented 3 years ago

Same issue on Home Assistant OS 5.10

[-] 0.2.200 31-01-2021 09:07:02 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:07:29 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:07:57 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:08:24 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:08:58 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:09:31 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:09:56 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
[-] 0.2.200 31-01-2021 09:10:28 PM [CMD-INFO]   cycling bluetooth hardware on hci0. please wait a moment...
Screenshot 2021-01-31 at 21 14 29
townsmcp commented 3 years ago

Same here to on RPI4, 2021.2.3. I have installed the following on HA: https://github.com/Limych/addon-presence-monitor