Daikin Madoka BRC1H bluetooth custom component

It is running in docker and I think that bleak-lescan has provided a good insight:

  File "/usr/local/lib/python3.8/site-packages/bleak/backends/bluezdbus/scanner.py", line 90, in start
    self._bus = await client.connect(self._reactor, "system").asFuture(loop)
twisted.internet.error.ConnectError: An error occurred while connecting: Failed to connect to any bus address. Last error: An error occurred while connecting: 2: No such file or directory..

Failed to connect to any bus address
What I have learned afterwards is that dbus is not running inside docker, and bleak is using DBus.

To make DBus being available in docker you have to link /var/run/dbus/system_bus_socket inside the container and also run docker in privileged mode. I don’t like the latter as homeassistant is a complex system.

For the reference, I have added this to my dockerfile:

volumes:
  - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
privileged: true

With this I managed to make it work. Many thanks!

I still don’t get any debug info though, I will try to investigate in that end to try to improve the tool.

1 Like