I have reviewed this git project and think it's a superior solution. Try it!
This script has been tested on Raspberry Pi OS, Buster (Legacy) and Bullseye only. This installation is simpler that the Waveshare provided instructions.
The supplied program will control the fan but for it to work you must slide the FAN switch on the HAT to the P0 position.
To use the script you can download the zip file and unzip it or, copy and paste the RAW version setup-poe-hat.sh and paste it into an editor. I reccomend you use nano setup-poe-hat.sh
in a Pi terminal or ssh session.
Then run bash setup-poe-hat.sh
When finished it will delete itself and any files needed only for installation. This script can be rerun. It will do a new install of the Waveshare software.
When complete a systemd service named poe-hat.service
will run and start on every boot.
to remove run these commands
sudo systemctl disable poe-hat.service sudo systemctl stop poe-hat.service rm -rf ~/.poe-hat
Hey everyone, I built a thing, might be of interest for some of you: https://github.com/klamann/raspi-poe-mon
I wasn't happy with the information the example library was giving us (oh, the fan is on? thanks, I didn't notice ๐), so I decided to make better use of the limited screen space ;)