This is a small utility service created to monitor parameters of my Dell Wyse 5060 thin client, serving as the host for a Smart Home (Home Assistant) virtual machine. The virtual machine operates on the Windows platform, and additionally, we utilize this unit as a TV set-top box, leveraging its capability to run Kodi. With only passive cooling (fanless), it's advisable to keep an eye on the APU temperature and CPU usage for this machine and it was my motivation to write this code.
To compile, please use PyInstaller:
python -m PyInstaller --onefile monitor.py --windowed
It will output an executable file in dist directory.
Place configuration file (config.ini) next to the executable:
[credentials]
user=<username for mqtt>
pass=<password for mqtt>
host=<host for mqtt>
To install the service, follow these steps:
- Build the executable.
- Create configuration file.
- Move the executable file (and config) to a stable and secure path to prevent accidental removal.
- Open a command prompt with administrative privileges.
- Navigate to the directory where you extracted HWMon.
- Run
monitor.exe install
to install the task.
The task should appear in Windows Task Scheduler.
To remove the task:
- First, locate the
monitor.exe
in Task Manager and kill the process. - Run
monitor.exe uninstall
or remove the task in Task Scheduler UI.
It will probably grow in the future but for now, the tool publishes three things to MQTT:
Topic | Value | Unit |
---|---|---|
prefix/ram_used_percent | Random Access Memory (RAM) in use | % |
prefix/gpu_temperature_celsius | GPU temperature (APU temperature on Dell Wyse 5060) | °C |
prefix/cpu_utilization_percent | CPU usage (close to the value you'll see in Task Manager) | % |
prefix
is now hardcoded as hwmon
(I'll add this to config as an option soon)