I’m excited to present to you my Linux system monitor - a Python script that collects system information and sends it to Home Assistant via MQTT.
This script is designed to work seamlessly with both Raspberry Pi and Ubuntu systems. It supports auto-discovery, updates, and can be installed with a single bash command, making it incredibly easy to start monitoring your system’s health and performance.
I first presented this script about 4 years ago, and since then it has matured significantly. If you’re using an old version, it’s definitely worth taking a look at the new features and considering an upgrade.
Here are some of the key features:
Easy to start: You can start monitoring your system in just a few minutes.
Comprehensive monitoring: Monitor cpu load, cpu temperature, free space, used memory, swap usage, uptime, wifi signal quality, voltage, and system clock speed.
Automatic HASS configuration: Supports discovery messages, so no manual configuration in Home Assistant configuration.yaml is needed.
Automated installation and configuration: You can install it and schedule it with a service or cron with just one command from shell.
Configurable: You can select what is monitored and how the message(s) is sent (separately or as one CSV message).
Easy update: You can update the script by calling it with command line argument --update.
It’s cool, installed without a hitch on my rpi with pihole on it.
I also installed on a rpi running picoreplayer, which is based a very light distro called core linux. It is very common way of running a music player (squeezelite based) on a pi. It was a bit of a mission, so I’ll do a write up and put it somewhere convenient. I could do it in the wiki section here - what do you prefer?
Thank you for trying the script. I am glad you like it. Regarding the write up, I have enabled the github wiki, so please post it where its convenient for you.
thanks will be useful for dumbs like me not able to properly copy/paste a password
The flag to indicate a new version is always on on my system, I have just done a git pull in the directory, it told me that it updated 3 files and then restart service but it still says that an update is avalaible
One user for all is ok, each system will use its host name as unique name.
Regarding the update sensor, pls run this in your repository folder and show me the output:
git remote update && git status -uno
Sorry it’s in french but it states that my branch is up-to-date with origin/master:
root@fixe:/usr/rpi-mqtt-monitor# git remote update && git status -uno
Récupération de origin
Sur la branche master
Votre branche est à jour avec 'origin/master'.
rien à valider (utilisez -u pour afficher les fichiers non suivis)
root@fixe:/usr/rpi-mqtt-monitor#
If you update now git status should work fine.
The problem was that my script didn’t know french and its checking the output of that command i asked you to run.
Regards,
Just excellent app ,
It works straight within home assistant.
i just had to change in config.py cpu_thermal_zone = ‘x86_pkg_temp’ to get it working on Debian 12 on a mini PC Beelink S12 pro.
i’m just getting an error when running the CLI command :
$ sudo rpi-cpu2mqtt.py -v
sudo rpi-cpu2mqtt.py : commande introuvable
thank’s again
Nice! Any way to get USB hard drive to the list? Also mine says uptime: 210:00, this is not days? And was I dot. See how many application updates there are either?