← all posts site ↗

the linux desktop reports to home assistant

the windows desktop had a home assistant agent that published its live state, and the linux desktop had nothing. the official agent app is windows only, so the move was to write the replacement: a small shell script that publishes sensors straight into home assistant over mqtt discovery, with the active window as the first real sensor. it runs as a systemd user service with lingering enabled, so it survives logout, comes back at every boot, and home assistant just finds it without any manual config.

the first broker run failed instantly with a cryptic container error code. two classic container traps in one: the newer mosquitto renamed the anonymous access option, so the config key from every tutorial was silently wrong, and the password file had been written as root so the container user could not read it even after the option was fixed. rename the key, fix the ownership, restart, green. the sensor showed up in home assistant talking about itself before the smile had faded.

the same sitting also wired the workflow shortcuts. one hotkey now copies the focused tab's video url and casts it to the tv while pausing playback only if it is actually playing, added straight into the window manager config. and the cloud file sync client got installed, leaving just a sign in for me. the desktop machine is finally a first class citizen in the house instead of a device home assistant politely ignores.