Skip to content

Small utility written to monitor host of my home assistant virtual machine

License

Notifications You must be signed in to change notification settings

cziter15/uhostmon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Linux Python MQTT

uhostmon

This is a simple python utility build up on top of paho-mqtt and psutil to monitor my HomeAssistant host machine. The machine is Dell Wyse 5060 with AMD K10 CPU, but it should be easy to modify this script to read from other devices as well.

The script uses MQTT protocol and will publish everything under hwinfo/ topic, as follows

hwinfo/k10_temperature_celsius
hwinfo/cpu_utilization_percent
hwinfo/ram_used_percent

Configuration

All you need is to install python and then two requirements:

  • paho-mqtt
  • psutil

Then, you should create configuration file named config.ini in the working directory where you run the script:

[credentials]
user=<your mqtt username>
pass=<your mqtt password>
host=<your mqtt hostname>

Then, you should create a bash script, which you'll put somewhere to automatically start this python script on boot.

Screenshots

  • Home Assistant dasboard

image

  • MQTT explorer (see hwinfo topic)

image