SABnzbd download indicator
06-23-2022




Control panel for the download server.
A gadget with ESPDuino and 4 LEDs indicates the status of the SABnzbd process.
The LEDs show if it is downloading, repairing or unzipping.
On the PC where SABnzbd runs (which is a separate server for me, which is upstairs in the attic) I run the following Bash script:
Start automatically by placing in /etc/profile.d a file downloadindicator.sh (made executable with < b>chmod +x downloadindicator.sh) with the following content:
Download
Arduino code (ESPDuino)
Case
A gadget with ESPDuino and 4 LEDs indicates the status of the SABnzbd process.
The LEDs show if it is downloading, repairing or unzipping.
On the PC where SABnzbd runs (which is a separate server for me, which is upstairs in the attic) I run the following Bash script:
#!/bin/bash
while :
do
IsPar2=$(pidof par2)
if [ $IsPar2 ]; then
echo "Par!"
IsPar2="1"
else
IsPar2="0"
fi
Unzip=$(pidor unrar)
if [ $Unzip ]; then
echo "Unzip!"
Unzip="1"
else
Unzip="0"
fi
#Here is the API key of your SABNZbd:
url="http://192.168.0.104:8080/sabnzbd/api?mode=queue&output=json&apikey=75c7061c803441apikeyded356951b8d"
status=$( curl -s "${url}" | jq .queue.status )
if [ "$status" == '"Downloading"' ]; then
echo "Downloading!"
status="1"
else
state="0"
fi
#Invoke ESPDuino:
Url="http://192.168.0.87/set?par2=${IsPar2}&unrar=${Unzip}&download=${status}"
wget --spider $Url
sleep 10 #Must be less than 15 seconds because after 15s the error lamp will turn on
done
Start automatically by placing in /etc/profile.d a file downloadindicator.sh (made executable with < b>chmod +x downloadindicator.sh) with the following content:
#!/bin/bash
/home/marcel/status &
If you log in once with SSH, the script will also run, which is a disadvantage because then you have to run it twice.Download
Arduino code (ESPDuino)
Case
Appliances
All my appliances are working installations.If you want to replicate an appliance and you need help, feel free to contact me.
View 32 appliances