I'm running a Plex Media Server for my family on my Orange Pi One. I noticed some temperature spikes during Plex operations, so I wanted to make a temperature monitor to have an idea about the SOC temperature at a glance.
CircuitFirst, install WiringOP. Follow the instructions on this page. Delete the downloaded files after running "./build".
Create a file named temp-monitor.sh. Fill it with the code that's on the "Code" section here. After you save the file, make it an executable file by typing "chmod +x temp-monitor.sh". The lines that begin with "#" are comments, which means they are not processed. You can remove the "#" characters before the "echo" lines so you can have some output when you run the script manually.
The bash script will flash all the LEDs, check the SOC temperature, and light up an LED or LEDs according to the temperature. We will make this script run once every minute.
The CRON Job That Runs The ScriptAdd the last line in the screenshot below to your /etc/crontab file. Change "erhan" with your username and make sure the path to your script file is correct. The line will make our script run once every minute.
I used hot glue to stick the circuit on the Pi. Make sure to use a lot of hot glue to avoid metal parts touching.
Enjoy.
Comments