[mythtv-users] USB-serial cable for Directv control (stupid question)

David McMillan mythtv at davidmcmillan.com
Fri Jan 7 22:42:17 UTC 2011


On Fri, Jan 7, 2011 at 8:57 AM, William Powers <wepprop at gmail.com> wrote:
> On Jan 6, 2011, at 2:32 PM, jmk <jmk at foofus.net> wrote:
>> If you have a H21 or newer (not sure if H20 is supported), you may just
>> want to skip the USB cable altogether. Check out the following thread
>> regarding connecting it to the network and changing channels via its
>> "SHEF" (i.e. HTTP) interface:
>>
>> http://www.gossamer-threads.com/lists/mythtv/users/457380
>>
>> Joe
>>
> Some thoughts regarding my recent experience controlling an H24 box:
>
> 1. The serial tuning script experienced intermittent tuning (and thus recording) failures, which are quite insidious. My D11 boxes did not exhibit the same behavior. The fix was to increase the delay associated with the setup_channel command from .2 to .5 seconds. The current version of the directv.pl script (1.10) does not correctly assign this value via command line argument so you have to either modify the value in the script or fix the argument assignment code yourself.
>
> 2. The directv_http network script always tuned successfully then reported failure, leading to more insidiously failed recordings. My H24 was returning "OK." for the result of the tuning command, which the script compared to "OK" and declared failure, causing MythTV to skip the recording. I changed the compare statement in my copy of the script to read:
>
> if ( $check_ok =~ /OK/ )
>
> Your mileage may vary.
>
> As a result of all these contretemps, I wrote a bash wrapper script that attempts http tuning then checks the result via a serial get_channel command. If not successful, it then attempts serial setup_channel tuning with the half second delay and a large value for retry_count. At the end, regardless of what the tuning scripts report, it logs all of the results and reports success to the backend. Recording the wrong channel is easier to spot than no recording at all. I thought about having the script text me for a tuning failure but I'm not ready to go there yet.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

You can get the current channel tuned using  /tv/getTuned in the http
request.  It should return a JSON response.  It wasn't working with my
H24 at first, but that was because there was a menu option that
defaults to not allowing that information.  I haven't integrated this
into my channel change script yet but so far it seems a little faster
and more reliable that the ir-blaster.

I have also a cronjob to call the /remote/processKey?key=poweron to
ensure that the directv box is powered on.  I was never able to find a
lirc directv config for the HD-PVR blaster that had a "poweron"
command, only the power toggle.


More information about the mythtv-users mailing list