Closed mist0706 closed 4 years ago
This sounds like the same thing as #27 which is that the dbus socket is not in the expected place. Can you check if you have that as /run/dbus/system_bus_socket (inside the container)?
I have a branch at https://github.com/klali/ha-plejd/tree/dbus_path that lets this be specified, if you have that file I should merge that and make that path the default.
That path didn't exist in the container but did exist in the host OS so i tried a volume mapping with no success. The error message changed to this instead:
2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] adding match to "NameOwnerChanged" failed 2020-05-05 12:21:54 ERROR (MainThread) [root] got unexpected error processing a message: maximum recursion depth exceeded. Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/dbus_next/message_bus.py", line 545, in _on_message self._process_message(msg) File "/usr/local/lib/python3.7/site-packages/dbus_next/message_bus.py", line 638, in _process_message handler(msg, None) File "/usr/local/lib/python3.7/site-packages/dbus_next/aio/message_bus.py", line 91, in on_match_added self._finalize(DBusError._from_message(reply)) File "/usr/local/lib/python3.7/site-packages/dbus_next/message_bus.py", line 415, in _finalize handler(None, err) File "/usr/local/lib/python3.7/site-packages/dbus_next/aio/message_bus.py", line 87, in on_match_added self._finalize(err) File "/usr/local/lib/python3.7/site-packages/dbus_next/message_bus.py", line 415, in _finalize handler(None, err)
Actually reading through issue #27 i can see my dbus is available in /var/run/dbus/system_bus_socket but mounting it in the container doesn't help
So after mounting it in the container, can you run dbus-monitor --system and see if that works?
Are you running this as a user that has permissions to the dbus socket? The location of the socket file shouldn't really matter as long as it can be found.
So docker is running as root. I've always had issues with permissions in linux so this might be the case but root really should have access to everything right?
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
bash-5.0# dbus-monitor --system
Failed to open connection to system bus: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender="(null)" (inactive) interface="org.freedesktop.DBus" member="Hello" error name="(unset)" requested_reply="0" destination="org.freedesktop.DBus" (bus)
Okay so it seems i had to put the container into privileged mode, that was my mistake (See AppArmor policy message). After adding that it started working. Now instead it's unable to find devices but that's a completely separate issue i guess. Feel free to close
Yeah, that sounds like a separate issue, if running as the root user there should be full permissions to the bluetooth subsystem. Feel free to open a new issue (with logs) if you need help troubleshooting.
Hi,
I'm using the standard homeassistant docker container (not hass.io). After creating the custom components folder, cloning in the files and adding the configuration.yaml section i get the following error in the log:
When i run hcitool lescan inside the container i get the expected output:
What would be the next step be in troubleshooting? It seems to me like there is some dbus issue but it's beyond my debugging capabilities