core icon indicating copy to clipboard operation
core copied to clipboard

Motionblind bluetooth - Operation failed with ATT error: 0x0e (Unlikely Error)

Open Kevin-vdk opened this issue 1 year ago • 9 comments

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

Kevin-vdk avatar Oct 05 '24 18:10 Kevin-vdk

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 close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign motionblinds_ble Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove 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)

home-assistant[bot] avatar Oct 05 '24 18:10 home-assistant[bot]

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)

LennP avatar Oct 05 '24 20:10 LennP

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.

Kevin-vdk avatar Oct 06 '24 06:10 Kevin-vdk

@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

LennP avatar Oct 06 '24 08:10 LennP

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.

bdraco avatar Oct 06 '24 13:10 bdraco

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

LennP avatar Oct 06 '24 14:10 LennP

Thank you for the quick response. I have installed your fix and I'll let you know if I run into any problems.

Kevin-vdk avatar Oct 06 '24 16:10 Kevin-vdk

@LennP You're fixed worked perfect. I haven't had any error messages since.

Kevin-vdk avatar Oct 08 '24 17:10 Kevin-vdk

Good to hear!

LennP avatar Oct 08 '24 19:10 LennP