Closed nemihome closed 2 weeks ago
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
bluetooth documentation bluetooth source (message by IssueLinks)
Found a workaround. Not sure how this is connected to the reboot because this is nothing which have changed but anyway it would be nice if bluetooth dependency is not checked if deactivated. It is not really needed for the Shellys which are connected via network.
/etc/dbus-1/system.d/Bluetooth.conf
<policy user="homeassistant">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.GattCharacteristic1"/>
<allow send_interface="org.bluez.GattDescriptor1"/>
<allow send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>
There was also a policy for the group which is used already because of group assignment to the user but with less allow lines. Seems to be the allows for the group are not enough.
<!-- allow users of bluetooth group to communicate -->
<policy group="bluetooth">
<allow send_destination="org.bluez"/>
</policy>
Found a workaround. Not sure how this is connected to the reboot because this is nothing which have changed but anyway it would be nice if bluetooth dependency is not checked if deactivated. It is not really needed for the Shellys which are connected via network.
Its currently needed for Bluetooth in Shelly devices support https://www.home-assistant.io/integrations/shelly/#bluetooth-support , and since Home Assistant doesn't have a way to list a dep as conditional based on a config entry setting, its not possible at this time. It is not likely a feature we would add since it would significantly increase development complexity and dependency resolution, increasing risk.
Hey there @balloob, @bieniu, @thecode, @chemelli74, mind taking a look at this issue as it has been labeled with an integration (shelly
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
shelly documentation shelly source (message by IssueLinks)
The problem
Im Using Home Assistant Core. I installed Shelly integration successfully with several Shelly devices. After reboot I got bluetooth integration not available errors in log although I have deactivated bluetooth for all Shelly devices in the Shelly integration. This could be related to a kernel update. I'm not sure. I think I have rebooted before without problems.
Currently I'm using a system user home assistant for running the service with a group homeassistant. Due to the fact that I thought maybe this is an authorization problem I assigend all existing groups to homeassistant for test purposes. The error is still coming up after that.
If I start homeassistant service with root user as service user bluetooth is working (and also the Shelly devices) but this is a major security risk. Currently the only thing which is obvious for me that root has some rights which the homeassistant user is lacking.
But if all groups are assigned and the user is a system user (id < 1000) what can be missing?
Second question: Why are the dependencies checked even if bluetooth is totally deactivated in Shelly itegrationI don't need bluetooth integration and if this check could be deactivated I would have no problem.
The check makes no sense for me if bluetooth is not even activated. Before it did work even after several service restarts of home assistant but if this is related to a kernel update it makes sense that this is connected to a reboot.
I'm using Ubuntu 22.04 LTS Kernel 6.5.0-28
What version of Home Assistant Core has the issue?
core-2023.7.3
What was the last working version of Home Assistant Core?
core-2023.7.3
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Shelly
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response