Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Crashes with traceback #14

Open
scstraus opened this issue May 26, 2021 · 6 comments
Open

Crashes with traceback #14

scstraus opened this issue May 26, 2021 · 6 comments

Comments

@scstraus
Copy link

Any idea what would cause this? Am I missing some dependency?

2021-05-24 21:16:45 ERROR (MainThread) [homeassistant.helpers.entity] Update for cover.switchbot_
curtain fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_sta
te
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/switchbot-curtain/cover.py", line 164, in update
    self._device.update()
  File "/usr/local/lib/python3.8/site-packages/switchbot/__init__.py", line 189, in update
    devices = bluepy.btle.Scanner().scan(scan_timeout)
  File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 852, in scan
    self.start(passive=passive)
  File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 790, in start
    self._mgmtCmd("le on")
  File "/usr/local/lib/python3.8/site-packages/bluepy/btle.py", line 312, in _mgmtCmd
    raise BTLEManagementError("Failed to execute management command '%s'" % (cmd), rsp)
bluepy.btle.BTLEManagementError: Failed to execute management command 'le on' (code: 17, error: Invalid Index)
@gzone156
Copy link

gzone156 commented Jun 1, 2021

Same issue here. All controls works, but I have the log full of those errors.

@scstraus
Copy link
Author

scstraus commented Jun 1, 2021

I had to move onto a Pi. Apparently it didn't like my bluetooth hardware or something.

@gzone156
Copy link

gzone156 commented Jun 1, 2021 via email

@scstraus
Copy link
Author

scstraus commented Jun 1, 2021

On the original machine it didn't work at all.

@gzone156
Copy link

Still present for me, how can I help solving this issue?

@nsaripalli
Copy link

I had this issue as well and spent some time debugging it. It seems to be some sort of driver issue. I had a Bluetooth dongle connected to my raspberry pi which worked great until it didn't, but realized that my dongle wasn't even an option as a controller option within bluetoothctl. The solution for this was to just buy a new Bluetooth dongle. This is the one I got and it seems to be working fine now: https://www.amazon.com/dp/B007Q45EF4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants