RCON Game Server Sensor and Dashboard

Wanted to share a project I’ve recently been working on that I figured others here might be interested in. I recently started hosting a Palworld game server, conveniently provided in a docker container by jammsen on Github. While interactions with the server are provided through docker and some amount of webhooks via RCON, I wanted to natively integrate this into my Home Assistant instance. RCON is a management protocol for game servers, most notably used by Minecraft and other popular games.

I wrote a Go based HTTP webserver that proxies requests to the actual RCON server connected to the game. This allowed me to expose both sensors and other automations in Home Assistant to interact with the game server, including: saving, shutdown, and a current player list. The webserver source code is available on Github, as well as a Docker image with the compiled binary with configuration exposed via environment variables.

My REST sensor configuration and lovelace card YAML can be found in this Github Gist. I also have hacs installed, which was key in being able to make these sensor displays look at least decently appealing.