home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.26k stars 29.86k forks source link

Bluetooth tracker LE setting up error #16698

Closed Molodax closed 2 years ago

Molodax commented 6 years ago

Home Assistant release with the issue:

0.78.0

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.):

hassio (HassOS 1.10) rpi 3

Component/platform:

Bluetooth tracker LE https://www.home-assistant.io/components/device_tracker.bluetooth_le_tracker/

Description of problem: Error in setting up the platform.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

device_tracker:
  - platform: bluetooth_le_tracker

Traceback (if applicable):

2018-09-18 19:57:05 WARNING (SyncWorker_13) [homeassistant.components.device_tracker.bluetooth_le_tracker] No Bluetooth LE devices to track!
2018-09-18 19:57:05 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform bluetooth_le_tracker

Additional information: Nothing more in log. I also have Mi Flora Plant component that works with Bluetooth LE.

d0ugal commented 2 years ago

I discovered today that only 531 user installation uses bluetooth LE, indeed we are a niche.

That is low. It might be higher if it were more reliable 😀

mcanteri commented 2 years ago

That is low. It might be higher if it were more reliable 😀

For sure! I don't know about the other experiences but I can see now from my watchdog that it fix the problem at least 10 times a day, so without it I was trying restart the core, reboot and so on, crazy 😀

LordBoos commented 2 years ago

I already moved from this mess of a component to a cheap aliexpress ESP32 devboard powered by ESPHome. I use it to track 5 MiFloras without any issues.

mcanteri commented 2 years ago

I already moved from this mess of a component to a cheap aliexpress ESP32 devboard powered by ESPHome. I use it to track 5 MiFloras without any issues.

I think that with the component you mention you manage a bluetooth network retrieving data from each element, not just a presence of a BT (like smartwatch or phone), so the purpose is different.

LordBoos commented 2 years ago

I already moved from this mess of a component to a cheap aliexpress ESP32 devboard powered by ESPHome. I use it to track 5 MiFloras without any issues.

I think that with the component you mention you manage a bluetooth network retrieving data from each element, not just a presence of a BT (like smartwatch or phone), so the purpose is different.

Yes, but you can use ESPHome to track devices, signal strength or retrieve data from/of BLE devices.

mcanteri commented 2 years ago

Yes, but you can use ESPHome to track devices, signal strength or retrieve data from/of BLE devices.

Both BT and BLE ? It is similar to Tasmota ? I still don't use that integration, so I don't know much of it.

serhat-ozkara commented 2 years ago

And I have switched to room assistant and never looked back.


From: mcanteri @.> Sent: Tuesday, October 12, 2021 12:18:33 PM To: home-assistant/core @.> Cc: Serhat Özkara (ETIYA) @.>; Comment @.> Subject: Re: [home-assistant/core] Bluetooth tracker LE setting up error (#16698)

Yes, but you can use ESPHome to track devices, signal strength or retrieve data from/of BLE devices.

Both BT and BLE ? It is similar to Tasmota ? I still don't use that integration, so I don't know much of it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/16698#issuecomment-940825706, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APISFHNB6SFL7MX3CUWWFD3UGP4OTANCNFSM4FVZ5J4Q. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

[https://etiya-corporate-images.s3.amazonaws.com/Signature/Logo.png] [https://etiya-corporate-images.s3.amazonaws.com/Signature/Web.png]http://www.etiya.com [https://etiya-corporate-images.s3.amazonaws.com/Signature/Facebook.png]https://www.facebook.com/Etiya-249050755136326/ [https://etiya-corporate-images.s3.amazonaws.com/Signature/LinkedIn.png] https://www.linkedin.com/company/etiya?trk=tyah&trkInfo=tas%3Aetiya%2Cidx%3A1-1-1 [https://etiya-corporate-images.s3.amazonaws.com/Signature/Instagram.png] https://www.instagram.com/etiya_/ [https://etiya-corporate-images.s3.amazonaws.com/Signature/Youtube.png] https://www.youtube.com/channel/UCWjknu72sHoKKt2nujuU2kA [https://etiya-corporate-images.s3.amazonaws.com/Signature/Twitter.png] https://twitter.com/etiya [https://etiya-corporate-images.s3.amazonaws.com/Signature/Null.png]

Serhat Özkara Acting Manager, Software Development

M:+90 553 489 12 90 @.**@.>

Yasal Uyari : Bu elektronik posta asagidaki adreste bulunan Kosul ve Sartlara tabidir; http://www.etiya.com/gizlilik<www.etiya.com/gizlilik>

ÇIKTI ALMADAN ÖNCE ÇEVREYE OLAN SORUMLULUGUMUZU BIR KEZ DAHA DÜSÜNELIM. PLEASE CONSIDER THE ENVIRONMENT BEFORE PRINTING ANY DOCUMENT.

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

tuxflo commented 2 years ago

I think this is still a thing, so I wouldn't mark it as stale.

magnussp commented 2 years ago

Still getting the Error during Bluetooth LE scan: Unexpected error when scanning: Set scan parameters failed: I/O error so defiantly still an issue.

luci-11 commented 2 years ago

Still present on Home Assistant OS 7.5 - core-2022.3.5 with supervisor-2022.03.5. Error just says: ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy bluetooth_le_tracker

luci-11 commented 2 years ago

Hi guys, As said in one of the previous posts I'm on hass.io and I did some tests. After connecting to the 22222 I managed to get ble scanning work at least on the system, not in HA with the hciconfig hci0 reset. At the beginning hcitool lescan was resulting in Set scan parameters failed: I/O error but after the command, ble scan is working again. Please try to handle this "workaround" because at the end the LE scan is working below HA, so maybe it can be fixed some way :)

bahamut657 commented 2 years ago

It seems also to support nomore parameter device_id (running 2022.6.7)

bdraco commented 2 years ago

fixed via #75013 in 2022.8.0 (unreleased)

Nafania commented 2 years ago

fixed via #75013 in 2022.8.0 (unreleased)

i have same issue Home Assistant 2022.9.1

Logger: homeassistant.components.device_tracker
Source: components/device_tracker/legacy.py:313
Integration: Device tracker ([documentation](https://www.home-assistant.io/integrations/device_tracker), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+device_tracker%22))
First occurred: 3:07:56 PM (1 occurrences)
Last logged: 3:07:56 PM

Error setting up platform legacy bluetooth_le_tracker
Logger: homeassistant.components.bluetooth_le_tracker.device_tracker
Source: components/bluetooth_le_tracker/device_tracker.py:133
Integration: bluetooth_le_tracker ([documentation](https://www.home-assistant.io/integrations/bluetooth_le_tracker), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+bluetooth_le_tracker%22))
First occurred: 3:07:56 PM (1 occurrences)
Last logged: 3:07:56 PM

No Bluetooth LE devices to track!

any debug info that i can provide to help investigate?

Hardware is raspberry pi 4 with in built bluetooth

erkr commented 2 years ago

hi @Nafania I had exactly the same errors in my clean new setup. A tip above, adding this to configuration.yaml, fixed it for me:

bluetooth:

device_tracker:
  - platform: bluetooth_le_tracker
    track_new_devices: True

I think it's a bug that it doesn't run when the list of tracking devices is still empty and the option track_new_devices is false

Nafania commented 2 years ago

hi @Nafania I had exactly the same errors in my clean new setup. A tip above, adding this to configuration.yaml, fixed it for me:

bluetooth:

device_tracker:
  - platform: bluetooth_le_tracker
    track_new_devices: True

I think it's a bug that it doesn't run when the list of tracking devices is still empty and the option track_new_devices is false

Thank you ! I've tried this, it fills know_devices well and start tracking them but just for first run, seems like after that it stops to work and no devices get any new status. After HA restart it starts work again. I've read somewhere that ble tracker broken since some HA version.

erkr commented 2 years ago

Yep it looks like that, mine also scans only once during start up🥹

Hohenloherin commented 1 year ago

Facing a problem which seems related to this:

`Logger: homeassistant.components.device_tracker Source: components/device_tracker/legacy.py:308 Integration: Geräte-Tracker (documentation, issues) First occurred: 13:21:04 (1 occurrences) Last logged: 13:21:04

Error setting up platform legacy bluetooth_le_tracker`

In my config.yaml I already included the above code what @erkr adviced.