fix: remove container bluez, use host BlueZ via D-Bus, set DBUS_SYSTEM_BUS_ADDRESS
This commit is contained in:
@@ -4,6 +4,9 @@ set -e
|
||||
|
||||
CONFIG_PATH="/data/options.json"
|
||||
|
||||
# Use the host BlueZ via D-Bus (requires host_dbus: true in config.yaml)
|
||||
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/run/dbus/system_bus_socket"
|
||||
|
||||
# Read add-on options from the HA-provided JSON file using Python (already installed).
|
||||
PORT=$(python3 -c "import json; d=json.load(open('${CONFIG_PATH}')); print(d.get('port', 8765))")
|
||||
TRANSPORT=$(python3 -c "import json; d=json.load(open('${CONFIG_PATH}')); print(d.get('transport', 'ble'))")
|
||||
|
||||
Reference in New Issue
Block a user