Repository navigation
Autostart in background / Docker image #5
|
Hi! With "python -m TheengsGateway" from terminal works like a charm. If I close the window, publishing finishes (the TG runs on raspbian ). Is there an easy way for autostart and working in background without live terminal? Possible to dockerize this whole thing? |
Replies: 11 comments 40 replies
|
Hi, Here is some methods for this: I will be happy to have your feedback on these different methods (or another). |
|
Also just to know which models are compatible with TheengsGateway could you share your Raspberry Pi model please? |
|
This works for me on a Raspberry Pi 4: Install TheengsGateway as root (see later for why this is): Then create this systemd service script in Use your host, username and password for the MQTT broker. Then reload the service files and start and enable the system service: Check whether the gateway is running: Check the logs if something's wrong: It should also be possible to adapt this to run as a non-root user (and then you can install the TheengsGateway package as a non-root user too), but I'll have to try this first. |
|
host : ip_broker:1883 ? So I can write the script like this ? |
|
but I think it comes from further upstream of the script I have a Proxmox debian 11 light VM |
|
I just installed bluez I resumed the process it works on debian 10 or 11 ? then it is said to do but it's not rather |
|
It is possible to run Theengs in docker. Keep in mind, that you have to run it in privileged mode, mount dbus, config dir and with network: host. |
|
@pnieweglowski @1technophile I've created an HA add-on, but It doesn't seem to scan for BLE devices. |
|
In case it helps anyone in the situation I found myself in, koenvervloesem wrote :
I had already installed everything as user Pi and only later decided to create a daemon to start on boot. The adaptation required was to add User=pi in [service] i.e. I'm not sure if the Environment needed to be set but I'd already found that and set it to be sure. |






This works for me on a Raspberry Pi 4:
Install TheengsGateway as root (see later for why this is):
Then create this systemd service script in
/etc/systemd/system/TheengsGateway.service:Use your host, username and password for the MQTT broker.
Then reload the service files and start and enable the system service:
Check whether the gateway is running: