HDHomeRun Tuner Restart
Based on scripts by jgsouthard at forums.sagetv.com.
If you have an older or flakier SiliconDust HDHomeRun tuner, this script will check to see if it is on the network, check to see if it's in use, and if it's not in use, initiate a soft reboot. If it is not on the network, the script can also power cycle the HDHomeRun using either a WeMo or a smart outlet/switch running the Tasmota firmware.
Your smart outlet will need to be assigned a static IP address by your router for the script to find it. If you are using a Tasmota device, you can dim the status LEDs by going to http://192.168.1.###/cm?cmnd=Backlog%20LedPwmMode%201%3BLedPwmOff%2031%3BLedPwmOn%2063 (replace 192.168.1.### with the IP of the device).
Use RestartTuners.bat
Requires hdhomerun_config.exe, which should be at C:\Program Files\Silicondust\HDHomeRun if you've installed the HDHomeRun Software for Windows.
Set the script to run at a regular interval using Windows Schedule tasks. Shortly before the top of the hour tends to work well.
If you are using a WeMo device and are not using the Tasmota firmware, you will need to install both Cygwin and Curl. Otherwise, the GNU wget.exe included in this repository is sufficient for controlling Tasmota devices.
Use RestartTuners.sh
Before using, install hdhomerun_config by running, from the home directory:
sudo apt update && sudo apt install -y git build-essential
git clone https://github.com/Silicondust/libhdhomerun.git && cd libhdhomerun && make
sudo install -m 755 ~/libhdhomerun/hdhomerun_config /usr/local/bin/Set the script to run at a regular interval using crontab -e. Shortly before the top of the hour tends to work well.