Hi,
I would like to run Theengs gateway in a docker container, but I get couple of errors while running gateway in a docker and nothing gets published to MQTT.
I am running docker in Ubuntu core 24 running in Raspberry pi 4. I’ve installed docker as well as bluez and pi-bluetooth using snap. After installing these, followed instructions from the website:
- sudo docker pull theengs/gateway
- sudo docker run --rm
–network host
-e MQTT_HOST=xxx.xxx.xxx.xxx
-v /var/run/dbus:/var/run/dbus
–name TheengsGateway
theengs/gateway
What I get out is this:
Creating config at /root/theengsgw.conf …
{
“host”: “XXX.XXX.XXX.XXX”,
“pass”: “”,
“user”: “”,
“port”: 1883,
“publish_topic”: “home/TheengsGateway/BTtoMQTT”,
“subscribe_topic”: “home/+/BTtoMQTT/undecoded”,
“presence_topic”: “home/presence/TheengsGateway”,
“presence”: false,
“general_presence”: false,
“publish_all”: true,
“publish_advdata”: false,
“ble_scan_time”: 60,
“ble_time_between_scans”: 60,
“tracker_timeout”: 120,
“log_level”: “DEBUG”,
“lwt_topic”: “home/TheengsGateway/LWT”,
“discovery”: true,
“hass_discovery”: true,
“discovery_topic”: “homeassistant/sensor”,
“discovery_device_name”: “TheengsGateway”,
“discovery_filter”: “[IBEACON]”,
“scanning_mode”: “active”,
“adapter”: “hci0”,
“time_sync”: “”,
“time_format”: “0”,
“ble”: true,
“enable_tls”: false,
“enable_websocket”: false
}
INFO:BLEGateway:Starting BLE scan
ERROR:asyncio:Future exception was never retrieved
future:
Traceback (most recent call last):
File “/opt/venv/lib/python3.11/site-packages/bluetooth_adapters/dbus.py”, line 146, in _get_dbus_managed_objects
reply = await bus.call(msg)
^^^^^^^^^^^^^^^^^^^
File “/opt/venv/lib/python3.11/site-packages/dbus_fast/aio/message_bus.py”, line 384, in call
await future
File “src/dbus_fast/aio/message_reader.py”, line 19, in dbus_fast.aio.message_reader._message_reader
File “src/dbus_fast/_private/unmarshaller.py”, line 777, in dbus_fast._private.unmarshaller.Unmarshaller._unmarshall
File “src/dbus_fast/_private/unmarshaller.py”, line 638, in dbus_fast._private.unmarshaller.Unmarshaller._read_header
File “src/dbus_fast/_private/unmarshaller.py”, line 376, in dbus_fast._private.unmarshaller.Unmarshaller._read_to_pos
File “src/dbus_fast/_private/unmarshaller.py”, line 339, in dbus_fast._private.unmarshaller.Unmarshaller._read_sock_without_fds
EOFError
INFO:BLEGateway:Connected to MQTT broker
INFO:BLEGateway:Subscribed to home/+/BTtoMQTT/undecoded
ERROR:BLEGateway:[org.freedesktop.DBus.Error.AccessDenied] An AppArmor policy prevents this sender from sending this message to this recipient; type=“method_call”, sender=“(null)” (inactive) int erface=“org.freedesktop.DBus” member=“AddMatch” error name=“(unset)” requested_reply=“0” destination=“org.freedesktop.DBus” (bus)
I tried to search help and I ran into couple of threads, but I couldn’t find anything that would work for this.
Any suggestions?