Managing multiple Raspberry Pis with Home Assistant

I have a ton of Raspberry Pis around the house and in my server room. In fact, some of those run NUT servers which I can hook into via Home Assistant to monitor my UPSs. Seeing my NUT servers in one place is why I started using Home Assistant just a few weeks ago now.

My problem is I have no way to manage, update, and maintain all these Raspberry Pis. It takes forever to SSH into all of them and run updates.

Is there a hands-off way of doing this through Home Assistant automations? Then I could have a dashboard that tells me each machine’s CPU, RAM, uptime, current OS version, etc. I could even add a manual “upgrade” button if I wanted.

Me too! I’d similarly appreciate some way to “adopt” my PIs with Home Assistant and be able to track things in a HA dashboard like:

  • Is the PI currently running / last seen?
  • Resource utilization (average CPU utilization / RAM utilization / storage utilization)
  • Are there pending software updates?

(And as long as I’m dreaming, maybe a backup solution too?)

Is there an integration for this? Thanks!

1 Like

There’s some sort of HASS.Agent that might be exactly what we want:
https://hassagent.readthedocs.io/en/latest/

I don’t have time right now to look into it, but if anyone knows, would this solve the problem of monitoring and updating Raspberry Pis?

I just took a quick glance through the documentation for HASS.Agent and it seems to be a WINDOWS-specific client. I.e., you can install it on your Windows PC and remotely control/monitor your windows PC(s) from Home Assistant.

So while I think it can do some of the types of functions we’ve wished for it can only do them for a windows computer, not a Raspberry PI.

The search continues…

HASS Agent is for Windows, but there are a number of agents for Linux you could look into.

  • IoTuring is Python so runs on Linux, Windows, and Mac and has been updated fairly recently;
  • system-mqtt is like System Bridge but runs as a service on your non-HA servers and uses MQTT auto-discovery topics;
  • hass-sysmon can be installed as a linux service and interestingly POSTs to HA’s MQTT web service so I suspect it is very low overhead;
  • If (like me) you already happen to be running Telegraf agent, Telegraf2Hassio is a docker container that converts Telegraf’s metrics into discoverable HA sensors using MQTT. If you prefer collectd agent there is an MQTT plugin for that but I think you need to define your own sensors (no autodiscovery).

Or for an agentless approach, check out the SSH integration available in HACS. While this option could run your updater, you can also look into installing the “unattended-upgrades” package in Raspbian.