u/Comprehensive-Ask26

Sidebar Temperature and Fan Installer
▲ 17 r/pihole

Sidebar Temperature and Fan Installer

I'd previously posted the steps I was taking to add the temps and fan speed back to the sidebar here, but have gone through building an actual installer script to make it easier on not only myself, but anyone who wants to use it.

It will find any fan that is being exposed through /sys/class/hwmon/hwmon*/fan*_input, the intent being to get the standard cpu fan or a POE+ hat fan. I don't have a POE+ hat to be able to test.

It then creates a service and a timer to grab the temps and fan speed and update a JSON file. The sidebar then auto-refreshes every 15 seconds to pull in those values so it can display real time stats on the dashboard.

The full documentation and instructions can be found at the below repo if anyone wants to use it or check the code. If you decide later you change your mind you can run the script with an uninstall and it will remove everything.

https://github.com/stretch-98033/raspberrypi-scripts/blob/main/README.md

Then when new updates are released and the dashboard gets reset, I just have to run sudo ./install-pihole-hwmon-sidebar.sh install to add the temps and fan speed back.

Before anyone asks, yes I built this with Codex 5.5 on High reasoning, testing and debugging as many scenarios as I could think of before posting this. I used web linux and security skills and prompted it to check for vulnerabilities 3 different ways to try and catch anything.

This sub has not only taught me a lot, it's opened me up to home-labbing and I couldn't be more grateful. I was just hoping to give back to the community for a change

Hope it helps!

u/Comprehensive-Ask26 — 17 hours ago