-
-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Ikea Idasen desk pairing failed using builtin Bluetooth #101452
Comments
Hey there @abmantis, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) idasen_desk documentation |
"BleakError: No backend with an available connection slot that can reach address D0:99:A6:D0:C7:B0 was found" I think that either the desks are too far from the Bluetooth radio or the radio cannot have active connections (or is already connected to other devices and cannot connect to a new one). |
Ah okay, that could explain the issue. I'm justing the built-in bluetooth of the RPI 4 which is one floor down from where the desks are. But i was curious because the integration could find the 2 desks, they have not previously been connected to another bluetooth device. Maybe the error i'm getting could also be made a bit more user friendly in Home assistant? And maybe this is kind of offtopic for this issue, is there some kind of documentation on how to place a new bluetooth antenna/sensor somewhere else in your house? |
They were probably spotted at some point by the RPI radio. Regarding improving bluetooth coverage, check ESPHome Bluetooth Proxy. |
I think I have a similar issue, but a different error entry in my log. I too get "Failed to connect" error when I try to setup the integration which auto-discovered the desk perfectly. I've reset the desk (hold the pairing down button for +10 secs) before entering pairing mode again, but to no avail. I've also tried physically placing my HA server right below the desk controller. Thank you so much for taking the time to make this integration happen and please let me know if I can be of any assistance. Here's my log:
|
It seems to be failing to pair. I got that error when the desk was not in
pairing mode.
Is the light blinking every couple seconds? Before you try to add it?
…On Thu, Oct 5, 2023, 13:50 rickeydk ***@***.***> wrote:
I think I have a similar issue, but a different error entry in my log.
I too get "Failed to connect" error when I try to setup the integration
which auto-discovered the desk perfectly.
I've reset the desk (hold the pairing down button for +10 secs) before
entering pairing mode again, but to no avail.
I've also tried physically placing my HA server right below the desk
controller.
Thank you so much for taking the time to make this integration happen and
please let me know if I can be of any assistance. Here's my log:
Logger: homeassistant.components.idasen_desk.config_flow
Source: components/idasen_desk/config_flow.py:66
Integration: IKEA Idasen Desk ([documentation](https://www.home-assistant.io/integrations/idasen_desk), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+idasen_desk%22))
First occurred: 14:42:02 (1 occurrences)
Last logged: 14:42:02
BleakError
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/idasen_desk/config_flow.py", line 66, in async_step_user
await desk.connect(discovery_info.device, monitor_height=False)
File "/usr/local/lib/python3.11/site-packages/idasen_ha/__init__.py", line 54, in connect
raise ex
File "/usr/local/lib/python3.11/site-packages/idasen_ha/__init__.py", line 50, in connect
await self._idasen_desk.pair()
File "/usr/local/lib/python3.11/site-packages/idasen/__init__.py", line 126, in pair
await self._client.pair()
File "/usr/local/lib/python3.11/site-packages/bleak/__init__.py", line 629, in pair
return await self._backend.pair(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 473, in pair
assert_reply(reply)
File "/usr/local/lib/python3.11/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.AuthenticationFailed] Authentication Failed
—
Reply to this email directly, view it on GitHub
<#101452 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHN52LWPYGQGGVXAHHX7X3X52UIVAVCNFSM6AAAAAA5TYWR32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBYHAZTKOJSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yup! I press the pairing button for 3 seconds and then the blue LED blinks once, then waits about 2 seconds, before it blinks again. It repeats that pattern for a while. It's the same way I pair it to my phone to use the Desk Control app. |
I was now able to reproduce this issue when using HA in my laptop, using its builtin Bluetooth. When using ESPHome Bluetooth Proxy it works fine. I'll have to dig a bit more. |
I am getting another error when trying to pair. The desk is next to the HA server.
Actually, I also see this
|
I have simmillar errors. Desk is near HA with Ugreen CM390 adapter. BleakError Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/idasen_desk/config_flow.py", line 66, in async_step_user await desk.connect(discovery_info.device, monitor_height=False) File "/usr/local/lib/python3.11/site-packages/idasen_ha/__init__.py", line 54, in connect raise ex File "/usr/local/lib/python3.11/site-packages/idasen_ha/__init__.py", line 50, in connect await self._idasen_desk.pair() File "/usr/local/lib/python3.11/site-packages/idasen/__init__.py", line 126, in pair await self._client.pair() File "/usr/local/lib/python3.11/site-packages/bleak/__init__.py", line 629, in pair return await self._backend.pair(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 473, in pair assert_reply(reply) File "/usr/local/lib/python3.11/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.AuthenticationFailed] Authentication Failed |
I'm having the same issue as above, with similar lines in my logs. |
You're a genius @abmantis ! Connecting and pairing manually with I was worried I'd have to do that each time after Home Assistant restarts, since the desk cover entity becomes unavailable after rebooting, but reloading the integration was enough to bring the entity back. Another unexpected behavior I noticed is if I use service: Once again, thank you for taking the time to make this. |
Glad to know it works as a workaround. I am not sure if this is an issue with the integration, HA or Bleak, as it works fine with ESPHome Proxies. I'll have to dig a bit. Regarding the position, yeah, that is a known issue with the underlying mechanism that controls movement, and I am not sure it will be possible to fix since there is a delay between sending the command for it to stop and it actually stopping. Maybe we can improve it, but it is not top prio for me at the moment. |
Unfortunately, this seems to be a limitation of the underlying bluetooth library that HA uses (bluez): hbldh/bleak#1434 The recommended way is to use an ESPHome Bluetooth Proxy, since it does not have that limitation and works better overall. As a workaround for those not using ESPHome BT Proxy, you can just open The HA docs need to be updated with this, I guess. |
I got this working by adding the device using bluetoothctl as well. |
I had the same issue with the integration. But pairing via I also tried For me, keeping |
Yes, the desk keeps going offline, and needs an integration reload to work again. Keeping |
I worked around this with an automation that keeps calling |
Would you be able to share this automation please? @d0ugal |
Sure, so it is actually a script that I use but you could just copy the sequence steps into an automation. script:
study_desk_set_position:
alias: "Study desk Set Position"
mode: restart
fields:
new_height:
example: "50"
sequence:
- condition: >-
{{ state_attr('cover.study_desk', 'current_position')|int != new_height }}
- repeat:
while:
- condition: template
value_template: >
{{ state_attr('cover.study_desk', 'current_position')|int != new_height and repeat.index <= 5 }}
sequence:
- service: cover.set_cover_position
data_template:
entity_id: cover.study_desk
position: >-
{{ new_height }}
- delay: 5
- wait_template: >
{{ not is_state('cover.study_desk', 'closing') and not is_state('cover.study_desk', 'opening') }} Then you can call it with something like; - service: script.study_desk_set_position
data:
new_height: 20 The script sets the position, waits for 5 seconds to give it a chance to start moving and then the wait template checks that it has stopped moving. Then if it is still out of position it will retry up to 5 times. Its a bit confusing but hopefully it makes sense, I had to extract this out and reduce it from what I have as my desk is fully automated (it alternates between sitting and standing every hour with a few condition and light flashes to warn me its about to move etc. |
@home-assistant rename Ikea Idasen desk pairing failed using builtin Bluetooth |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This is still an issue |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
I just updated to 2023.10 and tried to pair my ikea idasen desks. The integration auto discovers both desks, but when i want to configure them i just get a "failed to connect" error.
What version of Home Assistant Core has the issue?
core-2023.10.0
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
Ikea Idasen Desk
Link to integration documentation on our website
https://www.home-assistant.io/integrations/idasen_desk
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: