<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 4:11 PM, Tom Lichti <span dir="ltr">&lt;<a href="mailto:tom@redpepperracing.com" target="_blank">tom@redpepperracing.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Oct 31, 2014 at 3:47 PM, Justin Alcorn <span dir="ltr">&lt;<a href="mailto:justin@jalcorn.net" target="_blank">justin@jalcorn.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>On Fri, Oct 31, 2014 at 3:43 PM, Andrew C. (AFPup) Stadt<br>
&lt;<a href="mailto:acstadt@stadt.ca" target="_blank">acstadt@stadt.ca</a>&gt; wrote:<br>
&gt;<br>
<br>
&gt;&gt; My setup: TWC with Cisco STB. Ubuntu 14.04.1 and MythTV 0.28<br>
&gt;&gt;<br>
&gt; I used to do something like that though I was doing something like R.G.<br>
&gt; suggested to see if the tuner was in use, and if not then running the<br>
&gt; script.  I (accidently) discovered one day that my STB also supported the<br>
&gt; same ir command set as dish network boxes, and that the dish commands<br>
&gt; included a discrete power-on command (versus power toggle). So, just made my<br>
&gt; channel change command include a power-on command first.<br>
&gt;<br>
&gt; Just something to think about.<br>
<br>
</span>I spent a bunch of time trying to find a power-on command for my STB.<br>
No such luck.<br>
<div><div><br></div></div></blockquote><div><br></div></span><div>Even though I record my SA4250 via an HD-PVR, I can send the power-on through firewire, so that&#39;s what I do in my channel change script, as I did not find a discrete &#39;power on&#39; message via IR, it is a toggle. If I could find a power on only IR command, then I&#39;d use that.</div></div></div></div>
<br>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a></blockquote><div><br></div><div>This is the script I use to check my stb, its toggle power:</div><div><br></div><div> #! /bin/bash</div><div><br></div><div># Authored by Evuraan_AT_gmail_DOT_com</div><div><br></div><div># ABSOLUTELY NO WARRANTY, to the extent permitted by</div><div># applicable law.</div><div><br></div><div># YMMV.</div><div># Use at your own risk.</div><div><br></div><div><br></div><div>lirc_socket=&quot;/var/run/lirc/lircdSerial&quot;</div><div>pvr=&quot;/dev/videopvr150&quot;</div><div>t=&quot;$RANDOM-$RANDOM&quot;</div><div>out=&quot;/tmp/$t.mpg&quot;</div><div>mark=&quot;1727&quot;</div><div>blank=&quot;0&quot;</div><div>say=&quot;/usr/bin/logger -p info -t mythstb-check&quot;</div><div>POWEROFF=&quot;0&quot;</div><div>POWERON=&quot;0&quot;</div><div>#wakeup=&quot;/usr/bin/irsend SEND_ONCE DCT700 POWER&quot;</div><div>wakeup=&quot;/usr/bin/irsend -d ${lirc_socket} SEND_ONCE DCT700 POWER&quot;</div><div>#info=&quot;/usr/bin/irsend SEND_ONCE DCT700 info&quot;    </div><div>info=&quot;/usr/bin/irsend -d ${lirc_socket} SEND_ONCE DCT700 info&quot;</div><div><br></div><div><br></div><div><br></div><div>send_power_on() {</div><div>$say &quot;`date` STB seems to be turned off, last count was $blank, attempting to Power it on&quot; &amp;</div><div>$wakeup 1&gt;/dev/null 2&gt;/dev/null || :</div><div>sleep 2</div><div>}</div><div><br></div><div>scan_images(){</div><div>for i in `echo /tmp/$t*.jpeg`</div><div>do</div><div>if [ -s &quot;$i&quot; ]</div><div>then</div><div>#blank=&quot;`jp2a $i --invert --size=72x24 | sed -e &#39;s/./&amp; \n/g&#39;|grep -c &quot;M&quot;`&quot;</div><div>blank=&quot;`jp2a $i --invert --size=72x24 | sed &#39;s/W/M/g&#39; | sed -e &#39;s/./&amp; \n/g&#39;|grep -c &quot;M&quot;`&quot;</div><div> rm -f &quot;$i&quot; 1&gt;/dev/null 2&gt;/dev/null || :</div><div>else</div><div> :</div><div>fi</div><div>[ &quot;$blank&quot; -gt &quot;$mark&quot; ] &amp;&amp; export POWERON=&quot;100&quot;</div><div>[ &quot;$blank&quot; -le &quot;$mark&quot; ] &amp;&amp; export POWEROFF=&quot;100&quot;</div><div>done</div><div>if [ &quot;$POWERON&quot; -eq &quot;100&quot; -a &quot;$POWEROFF&quot; -ne &quot;100&quot; ]</div><div>then</div><div># its off</div><div>send_power_on</div><div>else</div><div># power is on, non blank frames</div><div>$say &quot;`date` STB seems to be turned on, last count was $blank&quot;</div><div>:</div><div>fi</div><div><br></div><div>}</div><div><br></div><div>purge_stuff(){</div><div>[ -f &quot;$out&quot; ] &amp;&amp; rm -f &quot;$out&quot; 1&gt;/dev/null &gt;/dev/null || :</div><div>}</div><div><br></div><div>#ivtv-tune -c 3 -d &quot;$pvr&quot; 1&gt;/dev/null 2&gt;/dev/null &amp;</div><div><br></div><div>cd /tmp</div><div>$info &amp;</div><div><br></div><div>dd if=&quot;$pvr&quot; of=&quot;$out&quot; bs=64K count=2  1&gt;/dev/null 2&gt;/dev/null</div><div><br></div><div>if [ -s &quot;$out&quot; ]</div><div>then</div><div>ffmpeg -i $out -f image2 -vcodec mjpeg /tmp/$t%d.jpeg 1&gt;/dev/null 2&gt;/dev/null</div><div>[ -s &quot;/tmp/${t}1.jpeg&quot; ] &amp;&amp; scan_images</div><div>else</div><div>$say &quot;`date` Unable to query $pvr, as it seems to be in use.&quot;</div><div>:</div><div>fi</div><div><br></div><div>purge_stuff &amp;</div><div><br></div><div><br></div><div>and it is called by the channel change script.</div></div><br></div></div>