Running the Bridge
The bridge keeps a single WebSocket connection to Home Assistant and shares it with every
watcher on your machine. Running it as a background service means commands like
ha bridge watch entity and status-bar modules reuse one connection
instead of each opening their own.
How it works
Section titled “How it works”The bridge listens on a Unix socket, by default at
$XDG_RUNTIME_DIR/go-automate/home-assistant.sock. Watchers connect to that socket
rather than to Home Assistant directly. The service runs:
go-automate ha bridge serveSee the Bridge Protocol reference for the socket details.
Systemd user service
Section titled “Systemd user service”The Arch package installs a user service called
go-automate-home-assistant-bridge.service and enables it globally for future logins. If
it is not running in your current session yet, enable it manually.
-
Reload the user systemd daemon:
Terminal window systemctl --user daemon-reload -
Enable and start the service:
Terminal window systemctl --user enable --now go-automate-home-assistant-bridge.service -
Check the service status:
Terminal window systemctl --user status go-automate-home-assistant-bridge.service
To follow the logs:
journalctl --user -u go-automate-home-assistant-bridge.service -fInstalling the service manually
Section titled “Installing the service manually”If you built from source, install the unit yourself:
-
Copy the unit file from the repository to your user units directory:
Terminal window mkdir -p ~/.config/systemd/usercp .scripts/linux/go-automate-home-assistant-bridge.service ~/.config/systemd/user/ -
Reload, enable and start it:
Terminal window systemctl --user daemon-reloadsystemctl --user enable --now go-automate-home-assistant-bridge.service
Running it in the foreground
Section titled “Running it in the foreground”For quick troubleshooting you can run the bridge directly instead of as a service:
go-automate ha bridge servePass --socket to use a custom socket path:
go-automate ha bridge serve --socket /tmp/go-automate-ha.sockNext steps
Section titled “Next steps”- Watch entities through the bridge.
- Wire watchers into a status bar.