[mythtv-users] HD Homerun Prime Scripting

Kirk Bocek t004 at kbocek.com
Mon Oct 17 23:32:30 UTC 2011



On 10/17/2011 2:07 PM, Ozzy Lash wrote:
> On Mon, Oct 17, 2011 at 1:07 PM, Kirk Bocek<t004 at kbocek.com>  wrote:
>>
>>
>> On 10/16/2011 10:12 PM, Ozzy Lash wrote:
>>>
>>> On Sun, Oct 16, 2011 at 11:31 PM, Ozzy Lash<ozzy.lash at gmail.com>    wrote:
>>>>
>>>> On Sun, Oct 16, 2011 at 12:12 AM, Kirk Bocek<t004 at kbocek.com>    wrote:
>>>>
>>>>> Here's my first shot at the script. I'm sending it to the list as an
>>>>> attachment. Not sure if it's going to get scrubbed or not. Let me know
>>>>> what
>>>>> you think. I'd love some feedback.
>>>>>
>>>>>
>>>>
>>>> I tried it out, although I commented out the UPDATE to the database.
>>>> (Good thing too, as I hadn't put the correct sourceid in, and it would
>>>> have updated the wrong source). It might be good to put in a flag to
>>>> turn off writing to the database.
>>>>
>>>> It also seems to me that you could get the channels from the database
>>>> by using a "select channum from channel where sourceid=X" where X is
>>>> the sourceid to be updated. (That is how I got my channel list).
>>>>
>>>> It did point up a few channels that I have wrong.  Some of them would
>>>> be fixed by the update from the script.  I did find a few where I have
>>>> multiple entries for the same channum which I need to fix.
>>>>
>>>> I'll play around with it some more, and see if I have any other
>>>> suggestions.
>>>>
>>>> Thanks,
>>>>
>>>> Bill
>>>>
>>>
>>> Ok, one thing that I notice is that I have a few channels that are
>>> available at 2 different virtual channels. I have them in my clear qam
>>> lineups at one channel number, but it seems the one liste by
>>> streaminfo is a different one.
>>>
>>> It seems that the script doesn't deal with this too well (it seems to
>>> take the highest programid and use that)
>>>
>>> Here is a sample from doing this by hand:
>>>
>>> lash at mythbackend:~/Downloads$ hdhomerun_config 192.168.11.3 set
>>> /tuner2/vchannel 223
>>> lash at mythbackend:~/Downloads$ hdhomerun_config 192.168.11.3 get
>>> /tuner2/program
>>> 3
>>> lash at mythbackend:~/Downloads$ hdhomerun_config 192.168.11.3 get
>>> /tuner2/streaminfo
>>> 1: 183 WCIU HD
>>> 2: 184 WPWR HD
>>> 3: 357 WWME-TV
>>> 4: 360 U Too
>>> 5: 358 Me Too
>>> 6: 359 This TV
>>> control
>>> tsid=0x434
>>>
>>> So it seems that channel 223 is marked as 357 (and,  if I look at my
>>> lineup, they are the same channel) But if I look at the debug output
>>> for your script I see:
>>>
>>> Channel 223:
>>> Freq is 711000000, mplexid 110
>>> ProgID = 6, Call Sign This TV
>>> For Source 1, mplexid is 110 ProgID is 3
>>> Channel 223 updated to mplexid 110, service 6
>>>
>>> I should move the channel, but I think the script should at least
>>> throw a warning that it didn't find the channel number in the
>>> streaminfo.
>>>
>>> Bill
>>
>> First off, is it Bill or Ozzy?
>>
>> Next, I missed the use of /tuner2/program to directly get the program id
>> number. My complex parsing of /tuner2/streaminfo is gone. This will avoid
>> the issue you saw with multiple channels.
>>
>> I added a $writeswitch variable. You shouldn't trust me. No one should.
>>
>> I added more error checking and error messages.
>>
>> I *really* want to add the code to add missing frequencies to dtv_multiplex.
>> If no one responds to my posts, I'm going to go ahead and put it in anyway.
>> Let's assume the code you discovered in scte65scan is okay. There are
>> actually a few more fields I see in my dtv_multiplex that are different from
>> the defaults defined in the table. I'd really like to know if they are
>> important.
>>
>> Let me know how this version works for you.
>>
>> Kirk Bocek
>>
>
> It's Bill.  Ozzy was my cat, and I use his e-mail address for mailing
> lists.  Sorry for any confusion.
>
>
> I'll give the new script a try later this evening.
>
> I should probably change my channels to match the channels in the
> streaminfo anyway.  I am sure that some day, they are going to put
> something different on those channels.  I think some of my duplicate
> channum  issues are probably due to that.
>
> Thanks for working on this.
>
> Bill

I thought I smelled catnip. :)

The script has to have the same virtual channel numbers between the two 
sources. There's no other way to match them up.

Thanks for the feedback. You've already caught some of my mistakes.

I'm doing this because it's providing value to me. But if it's helping 
me, it *must* be of use to someone else here. There must be more like us 
with a Prime and additional Clear QAM tuners on the same cable feed.

Looks like I may need to post my dtv_multiplex question over on the 
mythtv-dev list. Maybe I can get it answered over there.




More information about the mythtv-users mailing list