[mythtv-users] HDHR Prime disable not-subscribed

Josh Rosenberg mythtv at desh.info
Wed Nov 28 22:02:42 UTC 2012


On Wed, Nov 28, 2012 at 4:48 PM, Josh Rosenberg <mythtv at desh.info> wrote:
> On Wed, Nov 28, 2012 at 2:21 PM,  <mythtv-users-request at mythtv.org> wrote:
>> Has anyone written a script that will:
>>
>> 1. Iterate through channels provided by Schedules Direct
>> 2. Tune each channel with HDHR Prime
>> 3. Check HDHR log for "not-subscribed" error
>> 4. Disable not-subscribed channels in Schedules Direct lineup
>>
>> Doing this manually would involve Live TV, a lot of clicking and waiting,
>> and hopping between a couple tabs in a web browser. I'm not looking forward
>> to it. If there are no existing scripts to do this (or easier means to
>> accomplish the same thing), I could use some guidance on the best way to
>> write this script--I might be able to do it completely independent of
>> MythTV.
>>
>> Tom
>
> This is far from the smoothest way, I'm sure.  But it's what I do.
> It's basically your steps 2 and 3.
>
> for n in {2..1350}; do echo $n; done | shloop -e 'hdhomerun_config
> XXXXXXXX set /tuner2/vchannel \i; sleep 3; hdhomerun_config XXXXXXXX
> get /tuner2/vstatus'
>
> Where XXXXXXXX is your HDHR ID, shloop is
> http://www.perlmonks.org/bare/?node_id=154018 , and 1350 is your
> highest channel number.  It outputs a list of everything that you can
> save, grep, and use to manually edit your SD lineup.  Don't do it
> while all 3 tuners are in use.  One advantage its clunkiness provides
> over your 4 steps is that this can also be used to add new (or
> newly-subscribed) channels.
>
> If someone wants to automate the whole process, or even just make
> slight improvements, I too would appreciate it!
>
> Josh

It has been pointed out to me that using shloop here is
extraordinarily silly.  Here's an improvement already:

for n in {2..1350}; do hdhomerun_config XXXXXXXX set /tuner2/vchannel
$n; sleep 3; hdhomerun_config XXXXXXXX get /tuner2/vstatus; done

I would also urge you to consider not just the auth field (subscribed
or not) but also the cci field when making your Schedules Direct
decisions.  Occasionally the cgms field has data too; I don't know
what that means, but it can be worth looking at it to figure out.

Josh


More information about the mythtv-users mailing list