If you are running Home Assistant OS (HAOS) as a VM on Promox, you may want to display the hardware sensor data (CPU load, CPU temp, disk utilization, etc.) of your Promox host inside Home Assistant. To do this we will install the Glances server on the Proxmox host, then use the Home Assistant integration to pull in that data so we can view it.
If you install the Glances add-on inside the HAOS VM, it won’t have access to the physical hardware sensors. So that’s why we are installing Glances on the Promox server itself and just use the Glances Integration to pull in the data.
There are two Proxmox add-ons for Home Assistant. This is complimentary to the Glances Integration. The Proxmox integrations don’t display all the CPU temperature sensors and a number of other sensors, but it does show VMs, LXC containers, etc. I suggest using the HACS Proxmox integration, as unlike the official Proxmox integration, it will allow you to control various aspects of the Proxmox host such as restarting VM, rebooting, etc.
You can check out the lm-sensor documentation for additional details on sensors that might not be enabled by default on your server. Glances leverages this package for sensor reporting.
Update December 2, 2023: Thanks to reader feedback I added a step to load the drivetemp kernel module so Glances can report SATA drive temperature. I also added a link to the lm-sensor package (above) for more sensor information.
Update November 25, 2023: Thanks to reader feedback I modified the procedure to force Glances authentication when browsing to port 61208. I also added a credential reset section at the end.
Update June 23, 2023: Proxmox VE 8.0 is based on Debian bookworm, which initially causes a python compatibility issue with Glances. However, thanks to tteck, he provided a solution which I’ve incorporated into this guide. If you upgrade to Proxmox VE 8.0, and had Glances working on a prior version you will need to re-install. After I re-installed, the Home Assistant Glances add-on was immediately able to resume communications to Glances and the stats were restored.
1. In the Proxmox web UI click on your physical server in the left pane, then click on Shell in the middle pane. Note: If you are using Proxmox VE 8.0 (based on Debian bookworm), you need to run the “rm” command below or Glances will not install. This command will not affect the operation of Proxmox VE 8.0.
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
The command below performs the Glances installation:
curl -L https://bit.ly/glances | /bin/bash
2. Wait a minute or two for everything to install. Then start Glances with the following command:
glances -w --username --password
3. Enter a username and password for the Glances service. Answer Yes to save the password. Press CTRL-C to stop the Glances service. Write down this password as Glances saves it in config file.
4. In order to monitor the drive temp of SATA drives, we need to load the drivetemp kernel module at boot.
echo "drivetemp" >> /etc/modules modprobe drivetemp
5. Run the following command:
6. Copy and paste the following text into nano. If you configured a username other than glances, modify line 6 as needed.
[Unit] Description=Glances After=network.target [Service] ExecStart=/usr/local/bin/glances -w -u glances Restart=on-abort RemainAfterExit=yes [Install] WantedBy=multi-user.target
7. Press CTRL-X to exit and Y to save. Run the following command to make a symlink.
systemctl enable glances.service
8. Now we can start the service:
systemctl start glances.service
9. Go to Home Assistant Settings -> Devices & Services and click on Add Integration. Search for Glances.
10. On the configuration screen enter the IP address of your Promox server, and the username/password that you configured earlier. Leave the rest of the settings at the default values. Click Submit. If all goes well you will get a prompt for selecting the area.
11. Click FINISH.
12. If you go to the Integrations page you can click on the Device and see the default sensors card with all the sensor and their status.
13. This is just a sample of the built-in sensors. You can of course then customize your card to show whatever sensors you want.
Resetting the Password
If you need to reset the credentials for Glances, you can run the following commands:
rm ~/.config/glances/glances.pwd glances -w --username --password systemctl restart glances.service
Installing Glances on your Proxmox host allows your Home Assistant server to monitor the hardware health of the host server. Installation is a little tedious, but not too difficult. This allows your Home Assistant dashboard to show a plethora of sensor data such as CPU temperature, storage utilization and more.