Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with connecting after restarting HA #274

Open
jonathanalmstrom opened this issue Jun 13, 2023 · 2 comments
Open

Issues with connecting after restarting HA #274

jonathanalmstrom opened this issue Jun 13, 2023 · 2 comments

Comments

@jonathanalmstrom
Copy link

I have issues when I restart the computer running HA with the plejd addon. It connects the bluetooth dongle (external) to virtual box but then it throws error codes when trying to connect to plejd.
After many reboots and pulling the bluetooth adapter in and out it starts working but I dont know what fixes the issue.
Now i rebooted again and the problem came back.
Does anyone know how to fix this so I can reboot the computer without this problem coming back?

2023-06-13 12:51:45 INF [device-comm] Bluetooth reconnecting...
2023-06-13 12:51:47 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-06-13 12:51:47 INF [plejd-ble] Starting reconnect loop...
2023-06-13 12:51:50 INF [plejd-ble] Reconnecting BLE...
2023-06-13 12:51:50 INF [plejd-ble] init()
2023-06-13 12:51:55 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at methodReturnHandlers. (/plejd/node_modules/dbus-next/lib/bus.js:343:27)
at handleMessage (/plejd/node_modules/dbus-next/lib/bus.js:101:11)
at EventEmitter. (/plejd/node_modules/dbus-next/lib/bus.js:151:9)
at EventEmitter.emit (events.js:314:20)
at /plejd/node_modules/dbus-next/lib/connection.js:116:14
at Socket. (/plejd/node_modules/dbus-next/lib/message.js:63:9)
at Socket.emit (events.js:314:20)
at emitReadable
(_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
2023-06-13 12:51:55 INF [plejd-ble] If you continue to get "operation already in progress" error, you can try power cycling the bluetooth adapter. Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
2023-06-13 12:51:55 WRN [plejd-ble] Failed reconnecting. Failed to start discovery. Make sure no other add-on is currently scanning.
Error: Failed to start discovery. Make sure no other add-on is currently scanning.
at PlejBLEHandler._startGetPlejdDevice (/plejd/PlejdBLEHandler.js:436:13)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2023-06-13 12:51:55 INF [device-comm] Bluetooth reconnecting...
2023-06-13 12:51:57 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-06-13 12:51:57 INF [plejd-ble] Starting reconnect loop...
2023-06-13 12:51:59 INF [device-comm] Plejd got turn on command for Köksbord (FC13DF04CE08_0), brightness undefined
2023-06-13 12:52:00 INF [plejd-ble] Reconnecting BLE...
2023-06-13 12:52:00 INF [plejd-ble] init()
2023-06-13 12:52:05 INF [plejd-ble] BLE init done, waiting for devices.
2023-06-13 12:52:07 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-06-13 12:52:07 INF [plejd-ble] Starting reconnect loop...
2023-06-13 12:52:07 INF [device-comm] Bluetooth reconnecting...
2023-06-13 12:52:12 INF [plejd-ble] Reconnecting BLE...
2023-06-13 12:52:12 INF [plejd-ble] init()
2023-06-13 12:52:17 ERR [plejd-ble] Failed to start discovery. Operation already in progress
DBusError: Operation already in progress
at methodReturnHandlers. (/plejd/node_modules/dbus-next/lib/bus.js:343:27)
at handleMessage (/plejd/node_modules/dbus-next/lib/bus.js:101:11)
at EventEmitter. (/plejd/node_modules/dbus-next/lib/bus.js:151:9)
at EventEmitter.emit (events.js:314:20)
at /plejd/node_modules/dbus-next/lib/connection.js:116:14
at Socket. (/plejd/node_modules/dbus-next/lib/message.js:63:9)
at Socket.emit (events.js:314:20)
at emitReadable
(_stream_readable.js:557:12)
at processTicksAndRejections (internal/process/task_queues.js:83:21)
2023-06-13 12:52:17 INF [plejd-ble] If you continue to get "operation already in progress" error, you can try power cycling the bluetooth adapter. Get root console access, run "bluetoothctl" => "power off" => "power on" => "exit" => restart addon.
2023-06-13 12:52:17 WRN [plejd-ble] Failed reconnecting. Failed to start discovery. Make sure no other add-on is currently scanning.
Error: Failed to start discovery. Make sure no other add-on is currently scanning.
at PlejBLEHandler._startGetPlejdDevice (/plejd/PlejdBLEHandler.js:436:13)
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)
2023-06-13 12:52:17 INF [device-comm] Bluetooth reconnecting...
2023-06-13 12:52:19 ERR [plejd-ble] Discovery timeout elapsed, no devices found. Starting reconnect loop...
2023-06-13 12:52:19 INF [plejd-ble] Starting reconnect loop...

@gittan443
Copy link

I got this issue also. When I was running on unsupported (Ubuntu / Docker) this never happend. Migrated to supported platform HassOS, and now it happens all the time. I have to reboot often and reseat bluetooth adapter.

@Vonken
Copy link

Vonken commented May 17, 2024

I have the same issue. Restarting my Raspberry Pi usally works but have to do this now and then like after a power-outages.

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

No branches or pull requests

3 participants