mduran80 / daikin_madoka

Home Assistant custom component integration for the BRC1H thermostat (madoka)
MIT License
42 stars 10 forks source link

Error: No backend with an available connection slot that can reach address xxx was found #26

Open Leobaillard opened 1 year ago

Leobaillard commented 1 year ago

Hi,

Using the latest version of the integration, with a device successfully paired, I get this error in HA logs:

No backend with an available connection slot that can reach address xxx was found

The thermostat shows as "unavailable" in HA. The message appears a lot in the logs. I tried removing the integration and the devices, re-pairing it, re-installing the extension, but the outcome is the same.

HA version: 2022.12.5

rawframe commented 1 year ago

I get 'unavailable' also in front end. Reverted the core to a know working version but still not working. I assume the problem is with the newer 9.4 OS. I am going to try downgrading the OS.

Log says:

[org.bluez.Error.Failed] le-connection-abort-by-local 18:51:32 – (ERROR) daikin_madoka-main (custom integration) - message first occurred at 18:42:46 and shows up 233 times [org.bluez.Error.Failed] le-connection-abort-by-local 18:51:31 – (ERROR) runner.py - message first occurred at 18:43:54 and shows up 226 times Waiting on integrations to complete setup: daikin_madoka 18:51:13 – (WARNING) bootstrap.py - message first occurred at 18:43:12 and shows up 9 times Unexpected error importing daikin_madoka/cast.py 18:48:12 – (ERROR) loader.py - message first occurred at 18:42:38 and shows up 3 times

2022-12-14 18:42:38.975 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing daikin_madoka/cast.py 2022-12-14 18:42:46.813 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] le-connection-abort-by-local 2022-12-14 18:42:53.546 ERROR (MainThread) [pymadoka.connection] Characteristic XXXXXXX not found! 2022-12-14 18:43:01.456 ERROR (MainThread) [homeassistant.helpers.integration_platform] Unexpected error importing daikin_madoka/significant_change.py 2022-12-14 18:43:12.796 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: daikin_madoka 2022-12-14 18:43:14.066 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] le-connection-abort-by-local 2022-12-14 18:43:19.941 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] le-connection-abort-by-local 2022-12-14 18:43:25.961 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] le-connection-abort-by-local 2022-12-14 18:43:54.162 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Unlikely Error) 2022-12-14 18:43:54.559 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] le-connection-abort-by-local 2022-12-14 18:43:56.586 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] Operation already in progress 2022-12-14 18:43:56.596 ERROR (MainThread) [pymadoka.connection] [org.bluez.Error.Failed] br-connection-canceled

there are hundreds of these final messages.

Hope you can do your magic... must be annoying that HA is always bringing new problems! Better than always trying to fix when HA makes changes, does someone want to help convert his code to run on another rpi or esp32 with mqtt ?

Thanks in advance

rawframe commented 1 year ago

Rolled back to last working setup: OS Version: 9.0 Home Assistant Core : 2022.10 1

But did not work still and got this error when trying to access and reconnect devices:

ssh bluetoothctl Waiting to connect to bluetoothd.. .dbus[213]: arguments to dbus_connection_get_object_path_data() were incorrect, This is normally a bug in some application using the D-Bus library. failed in file dbus-connection.c line 5921.

mduran80 commented 1 year ago

Hi,

I don’t have much time lately, but will try to have a look at it. In the meantime, you can try to remove the device using bluetoothctl while HA is running. It will request the pair confirmation immediately and you can associate it again. Sometimes registering again solves the problem.

Cheers

El El jue, 15 dic 2022 a las 2:11, rawframe @.***> escribió:

Rolled back to last working setup: OS Version: 9.0 Home Assistant Core : 2022.10 1

But did not work still and got this error when trying to access and reconnect devices:

ssh bluetoothctl Waiting to connect to bluetoothd.. .dbus[213]: arguments to dbus_connection_get_object_path_data() were incorrect, This is normally a bug in some application using the D-Bus library. failed in file dbus-connection.c line 5921.

— Reply to this email directly, view it on GitHub https://github.com/mduran80/daikin_madoka/issues/26#issuecomment-1352429442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT54XMH7TGSSBZ7QYG3WNJV2NANCNFSM6AAAAAAS6JXSNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mduran80 commented 1 year ago

I just updated my HA and after removing the device using blutoothctl and repairing, everything is working as expected.

On Thu, 15 Dec 2022 at 08:17, Manuel Durán González @.***> wrote:

Hi,

I don’t have much time lately, but will try to have a look at it. In the meantime, you can try to remove the device using bluetoothctl while HA is running. It will request the pair confirmation immediately and you can associate it again. Sometimes registering again solves the problem.

Cheers

El El jue, 15 dic 2022 a las 2:11, rawframe @.***> escribió:

Rolled back to last working setup: OS Version: 9.0 Home Assistant Core : 2022.10 1

But did not work still and got this error when trying to access and reconnect devices:

ssh bluetoothctl Waiting to connect to bluetoothd.. .dbus[213]: arguments to dbus_connection_get_object_path_data() were incorrect, This is normally a bug in some application using the D-Bus library. failed in file dbus-connection.c line 5921.

— Reply to this email directly, view it on GitHub https://github.com/mduran80/daikin_madoka/issues/26#issuecomment-1352429442, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT54XMH7TGSSBZ7QYG3WNJV2NANCNFSM6AAAAAAS6JXSNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Leobaillard commented 1 year ago

Did you also remove the integration before doing so?

mduran80 commented 1 year ago

Nope, just the bluetoothctl pairing

El El jue, 15 dic 2022 a las 12:31, Léopold Baillard < @.***> escribió:

Did you also remove the integration before doing so?

— Reply to this email directly, view it on GitHub https://github.com/mduran80/daikin_madoka/issues/26#issuecomment-1352927817, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT3ORREF4KFFVCINOLTWNL6QJANCNFSM6AAAAAAS6JXSNA . You are receiving this because you commented.Message ID: @.***>

Leobaillard commented 1 year ago

I tried on my end, but I'm getting the same issue after re-pairing the device and rebooting HA.

rawframe commented 1 year ago

Thanks @mduran80

There was new HA update yesterday and after installing this everything returned back to normal. Still would be great to remove the HA dependency issues and migrate the software to esp32 with mqtt.

BeFygo commented 1 year ago

Thanks @mduran80

There was new HA update yesterday and after installing this everything returned back to normal. Still would be great to remove the HA dependency issues and migrate the software to esp32 with mqtt.

Hi @rawframe, I'm a fan of the idea to migrate this software to MQTT independent from HA. I already made an attempt to create a docker image for multiple device compatibility, communication works with CMD lines but did not get MQTT working properly.

If this migration project start I can help with testing/troubleshooting, unfortunately I have only basic ESP programming skills.

Leobaillard commented 1 year ago

I'm still experiencing this problem on my end. I uninstalled the integration, unplugged the BT controller, restarted my HA host, updated HA, unpaired everything, restarted the HVAC module, repaired everything, but still no luck. I get the same error message. Is there anything I can test to find more info for you maybe?

Thanks for your support!

mduran80 commented 1 year ago

Are you using ESPHome at the same time?

BeFygo commented 1 year ago

@Leobaillard I'm also still experiencing this problem.

I have tested and experimented with this issue with 3 different computers, 2 usb bluetooth dongles, x different operating systems and kernels.

My latest findings are that restoring my backupfiles keeps braking the connection between the integration and bluetooth. If I install a fresh Home Assistant (latest version) and setup only the basics to run madoka it works like a charm.

@mduran80 Is there something in the ".storage" folder of HA that interacts with madoka?

mduran80 commented 1 year ago

Not sure, it has been a long time since I wrote it. I will have a look at it when I get home, it could be HA storing it itself.

El El jue, 26 ene 2023 a las 13:20, BeFygo @.***> escribió:

@Leobaillard https://github.com/Leobaillard I'm also still experiencing this problem.

I have tested and experimented with this issue with 3 different computers, 2 usb bluetooth dongles, x differten operating systems and kernels.

My latest findings are that restoring my backupfiles keeps braking the connection between the integration and bluetooth. If I install a fresh Home Assistant (latest version) and setup only the basics to run madoka it works like a charm.

@mduran80 https://github.com/mduran80 Is there something in the ".storage" folder of HA that interacts with madoka?

— Reply to this email directly, view it on GitHub https://github.com/mduran80/daikin_madoka/issues/26#issuecomment-1404924350, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT27YJCL6NFDYHQKXTTWUJTYTANCNFSM6AAAAAAS6JXSNA . You are receiving this because you were mentioned.Message ID: @.***>

Leobaillard commented 1 year ago

Are you using ESPHome at the same time?

Yes I have ESPHome running (not using any bluetooth stuff, but still, I'm using it).

BeFygo commented 1 year ago

Not sure, it has been a long time since I wrote it. I will have a look at it when I get home, it could be HA storing it itself. El El jue, 26 ene 2023 a las 13:20, BeFygo @.> escribió: @Leobaillard https://github.com/Leobaillard I'm also still experiencing this problem. I have tested and experimented with this issue with 3 different computers, 2 usb bluetooth dongles, x differten operating systems and kernels. My latest findings are that restoring my backupfiles keeps braking the connection between the integration and bluetooth. If I install a fresh Home Assistant (latest version) and setup only the basics to run madoka it works like a charm. @mduran80 https://github.com/mduran80 Is there something in the ".storage" folder of HA that interacts with madoka? — Reply to this email directly, view it on GitHub <#26 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFK3CT27YJCL6NFDYHQKXTTWUJTYTANCNFSM6AAAAAAS6JXSNA . You are receiving this because you were mentioned.Message ID: @.>

I noticed that there was still some data referenced to madoka in core.device_registry after deleting the integration

BeFygo commented 1 year ago

So what worked for me (for now)

Is after a update and this issue (like always for me) start to occure:

mduran80 commented 1 year ago

Are you using ESPHome at the same time?

Yes I have ESPHome running (not using any bluetooth stuff, but still, I'm using it).

Please try disabling ESPHome. I just found this and could be related:

https://community.home-assistant.io/t/having-an-issue-with-bluetooth-proxy-with-homekit-controller-sensor/471532/4

Leobaillard commented 1 year ago

Are you using ESPHome at the same time?

Yes I have ESPHome running (not using any bluetooth stuff, but still, I'm using it).

Please try disabling ESPHome. I just found this and could be related:

https://community.home-assistant.io/t/having-an-issue-with-bluetooth-proxy-with-homekit-controller-sensor/471532/4

I disabled ESPHome, disabled the devices that I use with it, removed any Madoka integration/configuration, rebooted the HA host, added back the integration (the device is still paired with the adapter), but the problem persists unfortunately...

Leobaillard commented 1 year ago

Sorry for pulling this back up, but I still haven't found any solution and, with the hot days coming, it would be awesome to be able to manage the AC through Home Assistant! Thanks!

BeFygo commented 1 year ago

Sorry for pulling this back up, but I still haven't found any solution and, with the hot days coming, it would be awesome to be able to manage the AC through Home Assistant! Thanks!

Have you tried this ?https://github.com/mduran80/daikin_madoka/issues/26#issuecomment-1405278078

Ps: remember to read the full page for Bluetooth on home assistant website, because there are allot of things that can go wrong there.

Leobaillard commented 1 year ago

I had done this indeed. However, I updated everything, re-paired the device and added the integration back, and it works now! Thanks!