Hello All, I just got my hdhome run prime last week and finally got it all set up. I end up writing a very ugly bash script to down load the lineup and scan each channel for CCI status and thumb nail the channel. It will then make a simple html report with the info, and since doing a little google search didn't turn up anything like this I figure I'd share it. <br>
<br>it needs the following programs to run<br> hdhomerun_config<br> firefox<br> ffmpeg<br> xml_grep<br><br>here's the usage<br><br>cci_scan <ip address of the prime><br><br>anyhow its a ugly script so take it for what it is...<br>
regards<br>Eric<br><br><br>#!/bin/bash<br>if [ $1 = $2 ]; then<br> echo "Usage"<br> echo "cci_scan <hdhome run ip>"<br> exit 0<br>fi<br>htf=cci.html<br>file="vchan.txt"<br>wget $1/lineup.xml<br>
xml_grep GuideNumber lineup.xml --text_only > $file<br>rm lineup.xml<br>echo "<html>" > $htf<br>echo "<body>" >> $htf<br>echo "<h1> CCI Scan `date` </h1>" >> $htf<br>
x=0<br>lns=`wc -l $file`<br>y=`expr "$lns" : '\([0-9]*\)'`<br>while [ "$x" -lt "$y" ]<br>do<br> let x=x+1<br> a=`head -n $x $file | tail -n 1`<br> echo "<hr />" >> $htf<br>
echo "<p><b>Channel" $a "</b></p>" >> $htf<br> echo $a<br> hdhomerun_config $1 set /tuner2/vchannel $a<br> sleep 3<br> rp=`hdhomerun_config $1 get /tuner2/vstatus`<br>
echo "<p>" >> $htf<br> sleep 0.2<br> hdhomerun_config $1 save 2 test.mpg > /dev/null 2>&1 &<br> sleep 4<br> killall hdhomerun_config > /dev/null 2>&1<br> ffmpeg -i test.mpg -vframes 1 -an $a.jpg > /dev/null 2>&1<br>
echo "<a href="$a".jpg>" >> $htf<br> echo "<img src="$a".jpg width=100 height=100 /></a> " >> $htf<br> echo $rp "</p>" >> $htf<br>
done<br>echo "</body>">> $htf<br>echo "</html>" >> $htf<br>rm $file<br>rm test.mpg<br>firefox $htf<br>exit 0<br><br>