Motionblind bluetooth - Operation failed with ATT error: 0x0e (Unlikely Error)
The problem
After trigger motionblind bluetooth gives ATT error. I am not sure what the problem is. I have attached the trace information for more information. trace automation.raambekleding 2024-10-05T12_52_38.914408+00_00.json
What version of Home Assistant Core has the issue?
core-2024.10.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Motionblinds bluetooth
Link to integration documentation on our website
https://www.home-assistant.io/integrations/motionblinds_ble
Diagnostics information
home-assistant_motionblinds_ble_2024-10-05T18-03-26.060Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @lennp, @jerrybboy, mind taking a look at this issue as it has been labeled with an integration (motionblinds_ble) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of motionblinds_ble can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign motionblinds_bleRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
motionblinds_ble documentation motionblinds_ble source (message by IssueLinks)
How often does this happen?
If it happens only occasionally, I don't think there is anything we can do to fix it. Also, it is the underlying bleak library that is causing the issue:
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Unlikely Error)
Unfortunately, It happens with every trigger. The trigger is part of an automation with two roller blinds. Only one of the two performs the correct action.
I’m not familiar with the bleak library.
@bdraco could you assist here? Does the 0x0e unlikely error have to do with the device not receiving an ack to the message?
I noticed setting response=False to client.write_gatt_char solved it for me sometimes, but is this a solution or can this be solved another way?
https://github.com/LennP/motionblindsble/blob/a10eb0e11c7018a214c252ab166664362326aa0d/motionblindsble/device.py#L745
I think it can also mean it’s disconnecting in the middle of the transaction. If response=false solves it for you that’s probably an ok solution.
I think it can also mean it’s disconnecting in the middle of the transaction. If response=false solves it for you that’s probably an ok solution.
Hmm alright but quite odd that it happens consistently for one motor and not the other. I remember having faced this issue before during development, although it was quite rare, and response=False fixed it if I remember correctly
@Kevin-vdk could you give this fix a try, just like you did here #124158:
docker exec homeassistant python -m pip install --force-reinstall --no-cache-dir --no-deps git+https://github.com/LennP/PyPi-MotionBlinds_BLE@test_unlikely_error_fix
Thank you for the quick response. I have installed your fix and I'll let you know if I run into any problems.
@LennP You're fixed worked perfect. I haven't had any error messages since.
Good to hear!