Comments (2)
Probably need to disconnect, reconnect, and retry
from yalexs-ble.
Also backoff on
2022-08-19 15:10:59.338 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connected (attempt: 2, last rssi: -96)
2022-08-19 15:10:59.392 DEBUG (MainThread) [bleak_retry_connector] Found device 78:9C:85:19:63:C6 at /org/bluez/hci1/dev_78_9C_85_19_63_C6 with better RSSI -102
2022-08-19 15:10:59.392 DEBUG (MainThread) [bleak_retry_connector] Found device 78:9C:85:19:63:C6 at /org/bluez/hci2/dev_78_9C_85_19_63_C6 with better RSSI -96
2022-08-19 15:10:59.392 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connecting (attempt: 1, last rssi: -96)
2022-08-19 15:10:59.428 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connected (attempt: 1, last rssi: -96)
2022-08-19 15:10:59.437 DEBUG (MainThread) [bleak_retry_connector] Found device 78:9C:85:19:63:C6 at /org/bluez/hci1/dev_78_9C_85_19_63_C6 with better RSSI -102
2022-08-19 15:10:59.437 DEBUG (MainThread) [bleak_retry_connector] Found device 78:9C:85:19:63:C6 at /org/bluez/hci2/dev_78_9C_85_19_63_C6 with better RSSI -96
2022-08-19 15:10:59.437 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connecting (attempt: 1, last rssi: -96)
2022-08-19 15:10:59.470 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connected (attempt: 1, last rssi: -96)
2022-08-19 15:10:59.480 DEBUG (MainThread) [bleak_retry_connector] Found device 78:9C:85:19:63:C6 at /org/bluez/hci1/dev_78_9C_85_19_63_C6 with better RSSI -102
2022-08-19 15:10:59.480 DEBUG (MainThread) [bleak_retry_connector] Found device 78:9C:85:19:63:C6 at /org/bluez/hci2/dev_78_9C_85_19_63_C6 with better RSSI -96
2022-08-19 15:10:59.480 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connecting (attempt: 1, last rssi: -96)
2022-08-19 15:10:59.513 DEBUG (MainThread) [bleak_retry_connector] Front Door (M10CK0F) - /org/bluez/hci2/dev_78_9C_85_19_63_C6: Connected (attempt: 1, last rssi: -96)
2022-08-19 15:10:59.578 DEBUG (MainThread) [homeassistant.components.bluetooth.manager] hci1: FF:5D:95:70:D2:5B AdvertisementData(manufacturer_data={76: b'\x12\x027\x01'}) match: set()
2022-08-19 15:10:59.639 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281472934383424] [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Connection Rejected Due To Security Reasons)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 111, in _async_wrap_retry_bluetooth_connection_error
return await func(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 325, in unlock
async with lock:
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/lock.py", line 63, in __aenter__
await self.connect()
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/lock.py", line 107, in connect
response = await self.secure_session.execute(self._disconnected_event, cmd)
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 190, in execute
return write_task.result()
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 91, in _write
return await self._locked_write(command)
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/session.py", line 141, in _locked_write
await self.client.write_gatt_char(self.write_characteristic, command, True)
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/client.py", line 694, in write_gatt_char
assert_reply(reply)
File "/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Connection Rejected Due To Security Reasons)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1717, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1754, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/yalexs_ble/lock.py", line 58, in async_unlock
await self._device.unlock()
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 77, in _async_wrap_cancelable_operation
await self._operation_task
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 90, in _async_wrap_operation_lock
return await func(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/yalexs_ble/push.py", line 121, in _async_wrap_retry_bluetooth_connection_error
raise DisconnectedError(str(err))
yalexs_ble.session.DisconnectedError: [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Connection Rejected Due To Security Reasons)
from yalexs-ble.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yalexs-ble.