Daikin Madoka for AC looses connection

Hi people, I’m using the Daikin Madoka integration from mduran80 on GitHub for connecting my HA to our Daikin AC with BRC1HHDW remote bluetooth control. With an USB dongle from Asus (BT500) I succeeded to set up a connection and integrate the AC unit in HA. After a few days the integration on my dashboard says that the device is unavailable. Restoring a backup from a day early solves the problem. In the mean time I have had the issue for another 4 times. When I look in my log I see the following errors:

Logger: pymadoka.connection
Source: runner.py:120
First occurred: 7 februari 2023 om 16:26:48 (2369 occurrences)
Last logged: 10:22:09

[org.bluez.Error.Failed] le-connection-abort-by-local
[org.bluez.Error.Failed] Operation already in progress
[org.bluez.Error.Failed] br-connection-canceled
Characteristic 2141E111-213A-11E6-B67B-9E71128CAE77 not found!
No backend with an available connection slot that can reach address B8:F2:55:19:07:AB was found

Further in the logs I find another error message:

Logger: homeassistant.components.bluetooth.scanner
Source: components/bluetooth/scanner.py:301
Integration: Bluetooth (documentation, issues)
First occurred: 7 februari 2023 om 23:28:55 (1 occurrences)
Last logged: 7 februari 2023 om 23:28:55

hci0 (04:42:1A:55:C4:D0): Failed to restart Bluetooth scanner: hci0 (04:42:1A:55:C4:D0): Failed to start Bluetooth: [org.bluez.Error.InProgress] Operation already in progress
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py”, line 219, in _async_start
await self.scanner.start() # type: ignore[no-untyped-call]
File “/usr/local/lib/python3.10/site-packages/bleak/init.py”, line 156, in start
await self._backend.start()
File “/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/scanner.py”, line 191, in start
self._stop = await manager.active_scan(
File “/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/manager.py”, line 368, in active_scan
assert_reply(reply)
File “/usr/local/lib/python3.10/site-packages/bleak/backends/bluezdbus/utils.py”, line 20, in assert_reply
raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.InProgress] Operation already in progress

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py”, line 346, in _async_restart_scanner
await self._async_start()
File “/usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py”, line 301, in _async_start
raise ScannerStartError(
homeassistant.components.bluetooth.scanner.ScannerStartError: hci0 (04:42:1A:55:C4:D0): Failed to start Bluetooth: [org.bluez.Error.InProgress] Operation already in progress

And finally another error message:

Logger: homeassistant.helpers.integration_platform
Source: loader.py:761
First occurred: 7 februari 2023 om 15:28:33 (9 occurrences)
Last logged: 7 februari 2023 om 15:32:07

Unexpected error importing daikin_madoka/media_source.py
Unexpected error importing daikin_madoka/logbook.py
Unexpected error importing daikin_madoka/group.py
Unexpected error importing daikin_madoka/energy.py
Unexpected error importing daikin_madoka/hardware.py
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/integration_platform.py”, line 40, in _async_process_single_integration_platform_component
platform = integration.get_platform(platform_name)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 744, in get_platform
cache[full_name] = self._import_platform(platform_name)
File “/usr/src/homeassistant/homeassistant/loader.py”, line 761, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File “/usr/local/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘custom_components.daikin_madoka-main.cast’

I cannot find a working solution for this problem. Is anyone familiar with this?

My setup:
Dell laptop with HA in a VM on Virtualbox
Home Assistant 2023.1.7
Supervisor 2023.01.1
Operating System 9.5
Frontend-version: 20230110.0 - latest

The device became unavailable again with a new error message in the log:

Logger: pymadoka.connection
Source: runner.py:120
First occurred: 08:26:40 (569 occurrences)
Last logged: 15:11:47

  • No backend with an available connection slot that can reach address B8:F2:55:19:07:AB was found
  • [org.bluez.Error.Failed] Operation already in progress
  • [org.bluez.Error.Failed] br-connection-canceled
  • [org.bluez.Error.Failed] le-connection-abort-by-local

We are experiencing the same problem.

We use RP3b and the integrated bluetooth. The only time this has worked without needing constant reloads was about 1 year ago but I was not sure if it was to do with the underlying OS or HA.
This is problem makes the whole integration unusable which is a shame given the effort the creator put into it.

Have you found the problem and solution? Thanks