Last active
August 29, 2015 14:19
-
-
Save kevarh/af8b4e1a93d1ccae15c5 to your computer and use it in GitHub Desktop.
HDHomerun Signal Strength Gather
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Should work on any OSX or Linux box, change the ip address to point towards your box. | |
# Will append to tvsignal.txt output that looks like the following. | |
# seconds,frequency,channel,type,signal strengh, signal quality,symbol quality, profile, stream rate,client ip | |
# 1429662591,539.000,5,8vsb,69%,51%,100%,mobile,2.485,10.0.1.25 | |
# 1429662601,539.000,5,8vsb,69%,52%,100%,mobile,1.569,10.0.1.25 | |
# 1429674477,195.000,3,8vsb,90%,46%,none,mobile,0.021,10.0.1.25 | |
# 1429674487,195.000,3,8vsb,90%,48%,none,mobile,0.011,10.0.1.25 | |
#The ip address of your HDHomerun box | |
IPADDR="10.0.1.3" | |
foo () | |
{ | |
curl http://$IPADDR/tuners.html?page=tuner0 2> /dev/null | \ | |
grep -A1000 Frequency | \ | |
sed -e 's/^.*<td>//g' -e 's/<[^>]*>//g' -e '/^\s*$/d' | | |
awk '{print $1}' | \ | |
tr "\n" "," | \ | |
sed -e 's/,$//g' | |
} | |
foo2 () | |
{ | |
echo "$(date +%s),$(foo)" | |
} | |
for x in `seq 10`; do foo2; sleep 10; done | tee -a tvsignal.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment