custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.91k stars 247 forks source link

lost connection after update to HassOs 4.14 #123

Closed mohannadalsharief closed 4 years ago

mohannadalsharief commented 4 years ago

running on RPI 3 and got an update to HassOS 4.14 where all my connections are gone

Ernst79 commented 4 years ago

Please enable debug logging and show your logs. Did you restart your RPI3 after the update?

mohannadalsharief commented 4 years ago

yes multiple times

Logger: custom_components.mitemp_bt.sensor Source: custom_components/mitemp_bt/sensor.py:131 Integration: mitemp_bt (documentation) First occurred: 9:10:59 PM (10 occurrences) Last logged: 9:20:01 PM

HCIdump thread: OS error: [Errno 19] error while attempting to bind on interface 0: No such device

Ernst79 commented 4 years ago

could you run the following command in SSH, and give the result

hcitool dev

Also try the following

sudo apt install pi-bluetooth
sudo reboot
mohannadalsharief commented 4 years ago

it says command not found, am i missing sth?

Ernst79 commented 4 years ago

I think that due to the HassOs update, some bluetooth things are missing.

mohannadalsharief commented 4 years ago

do you know how I can roll ack or what shall I do

Ernst79 commented 4 years ago

I see some others on the forum have rolled back to 4.13, but I don't have HassOs. But I think it is better if we solve this. It looks like you don't have hcitool. Did you try sudo apt-get install pi-bluetooth ? (perhaps without sudo on HassOs)

mohannadalsharief commented 4 years ago

sudo command not foun, not sure what is happening

Ernst79 commented 4 years ago

Try without sudo. apt-get install pi-bluetooth

I though HassOs is not allowing root access

Ernst79 commented 4 years ago

Also try to run this command again, as you would have to do with a new installation, according to the instructions.

setcap 'cap_net_raw,cap_net_admin+eip' `readlink -f \`which python3\``
Ernst79 commented 4 years ago

One of the people on the forum have fixed it by removing the custom component, configuring the built in component, wait till that one starts receiving hci events, and then, install the custom component again.

mohannadalsharief commented 4 years ago

Thanks for the help, is there clear steps to configure the built in component?

Ernst79 commented 4 years ago

I assume that you have tried the first suggestions and they didn’t work?

Instructions are here.

bluepy and btlewrap can be installed with pip3 install bluepy and pip3 install btlewrap. Perhaps try to install these first, and do a reboot.

mohannadalsharief commented 4 years ago

Now I am stuck waiting blutoothhd to connect ... I guess I will just roll back

Ernst79 commented 4 years ago

On which command are you stuck? Does hcitool lescan work?

mohannadalsharief commented 4 years ago

no it doesnt and using the built in component didnt work as well

Ernst79 commented 4 years ago

I see an issue has been reported on HassOs repo as well. For now, I think it is better to roll back.

https://github.com/home-assistant/operating-system/issues/910

maximcoder commented 4 years ago

I see an issue has been reported on HassOs repo as well. For now, I think it is better to roll back.

home-assistant/operating-system#910

whats the quick way to roll back to 4.13 ?

Ernst79 commented 4 years ago

You can revert to 4.13 with ha os update --version 4.13

There seems to be an issue with HassOs 4.14 with Bluetooth on Raspberry pi 3, as both the build in mitemp_bt component as well as the Bluetooth tracker do not work anymore after upgrading. I think it will be solved soon when there is a solution for this issue in the Home Assistant OS code. There seems to be a fix on its way, lets wait and see if that will solve this issue as well (I assume it will).

phoxy84 commented 4 years ago

Going back to 4.13 works.

Ernst79 commented 4 years ago

HassOs 4.15 is released, which should solve the issue.

phoxy84 commented 4 years ago

Installed 4.15 and can confirm that it works.