[mythtv-users] Change channel scripts

Mike Bennett mbppg at comcast.net
Tue Nov 9 18:32:03 UTC 2010



On 11/09/2010 10:34 AM, Andrew C. Stadt wrote:
> On 08/11/2010 10:50 AM, Mike Bennett wrote:
>>
>>
>> On 11/08/2010 08:28 AM, Michael PARKER wrote:
>>>
>>>> -----Original Message-----
>>>> From: mythtv-users-bounces at mythtv.org 
>>>> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of
>>>> Mike Bennett
>>>> Sent: 08 November 2010 00:30
>>>> To: Discussion about MythTV
>>>> Subject: Re: [mythtv-users] Change channel scripts
>>>>
>>>>
>>>>
>>>> On 11/04/2010 12:27 PM, Mike Bennett wrote:
>>>>> Okay I am having a weird issue with my change channel scripts. I have
>>>>> three turners and three Comcast DTA/100's connected via IR cable from
>>>>> the MCEUSB blasters to the IR port on the back of the DTA.
>>>>>
>>>>> I am having two different issues happening. The first issue it seems
>>>>> that about one out of every five recordings the channel does not
>>>>> change at all. Let me explain, the DTA will display when a button is
>>>>> pushed to change the channel and it get recorded by myth so I can see
>>>>> when the channel is changed because it pops up a box in the lower
>>>>> right hand corner to display the number buttons that are being 
>>>>> pressed
>>>>> just like using the remote. about every fifth or sixth recording does
>>>>> the. The second issue is only one of two channel presses shows up. 
>>>>> Ex.
>>>>> like if the DTA is on 7 and it then tries to change to channel 16 I
>>>>> will only see a 1 or usually the 6 show up so of course it recorded
>>>>> the wrong channel. This happens about the same frequency as the other
>>>>> problem but not at the same time.
>>>>>
>>>>> I have tried to change the interdigit time between press with the 
>>>>> same
>>>>> result and if I invoke the change channel script manually it works
>>>>> every time. There is no rhyme or reason when this happens, I have 
>>>>> seen
>>>>> it happen when there are lots of recordings close together or when
>>>>> there is only one show being recorded at all and it happens across 
>>>>> all
>>>>> tuners at different times. I'm not sure which logs to look at or 
>>>>> if it
>>>>> is a LIRC or Mythtv issue. I hoping someone can direct me in the 
>>>>> right
>>>>> direction. Oh yeah I have the front IR receiver on the DTA's covered
>>>>> so they are not getting any stray IR signals.
>>>>>
>>>>> Here is my change channel script:
>>>>>
>>>>>   #!/bin/sh
>>>>>   REMOTE_NAME=DTA
>>>>>   irsend SET_TRANSMITTERS 1
>>>>>   for digit in $(echo $1 | sed -e 's/./&  /g'); do
>>>>>           irsend SEND_ONCE $REMOTE_NAME $digit
>>>>>           sleep 0.4  # note, you may have to tweak the interdigit 
>>>>> delay
>>>>> up a bit, depending on your STB model
>>>>>   done
>>>>>   #irsend SEND_ONCE $REMOTE_NAME OK
>>>>>   exit 0
>>>>>
>>>> Bump, anyone have any idea?
>>>>
>>>> -- 
>>>> Regards,
>>>>
>>>> Mike Bennett
>>>> mbppg.com
>>>>
>>>> _______________________________________________
>>>> mythtv-users mailing list
>>>> mythtv-users at mythtv.org
>>>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>> Mike,
>>>
>>> Does any form of onscreen EPG/menu pop up when you press a key on 
>>> the remote?
>>>
>>> My old Cisco 4200DVB was, by default, set to pop up a "Now and Next" 
>>> menu when you entered a channel number. The presence of this menu 
>>> (well, presumably the h/w overhead required to display it) severely 
>>> impacted the reliability of my IR blaster/channel change script to 
>>> change channel. Once I disabled the "Now and Next menu", reliability 
>>> improved dramatically.
>>>
>>> The backend log would be a good place start debugging - you should 
>>> see the invocation of and return value from the channel change 
>>> script in there. If you see the channel change script being invoked 
>>> with the correct channel number and returning successfully, you can 
>>> be pretty confident that the MythTV end of things is working as it 
>>> should. Then it's just a matter of debugging the h/w.....
>>>
>>> Cheers,
>>>
>>> Mike Thanks Mike, unfortunately the DTA is a DUMB box no menus or 
>>> the ability to turn items on or off. I blue box does pop up that the 
>>> channel numbers display which is how I can tell when number are 
>>> correct or missing.
>> I will check the backend logs, it helps now that I know what I 
>> looking for so thanks. I have a feeling it is something with the 
>> DTA's just being a very low end settop box. Thanks for the info.
>>
> Do you only have the one DTA?  I was running into an issue with two 
> boxes controlled by the same CommandIR (different emitters) when it 
> was trying to change the channel on both at the same time - I had to 
> add a simple lock to the channel change scripts around the 
> SET_TRANSMITTER / SEND_ONCE commands.  I also had a secondary issue 
> with another satellite box which kept getting stuck in interactive tv 
> (even the remote which came with it couldn't always get it responsive 
> - in the end I had to add a quick power-cycle in its channel change 
> script.
>
> Cheers,
>
> Andrew.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
Three DTA's using MCEUSB blaster receivers the first blaster using above 
change channel script I set the transmitters to 1 on the second port it 
is set to 2 and on the second MCEUBS port one I use lircd1 shown below:

Channel script for the first blaster

#!/bin/sh
  REMOTE_NAME=DTA
  irsend SET_TRANSMITTERS 1
  for digit in $(echo $1 | sed -e 's/./& /g'); do
          irsend SEND_ONCE $REMOTE_NAME $digit
          sleep 0.4  # note, you may have to tweak the interdigit delay 
up a bit, depending on your STB model
  done
  #irsend SEND_ONCE $REMOTE_NAME OK
  exit 0

Channel script for the second blaster

  #!/bin/sh
  REMOTE_NAME=DTA
  irsend SET_TRANSMITTERS 2
  for digit in $(echo $1 | sed -e 's/./& /g'); do
          irsend SEND_ONCE $REMOTE_NAME $digit
          sleep 0.4  # note, you may have to tweak the interdigit delay 
up a bit, depending on your STB model
  done
#irsend SEND_ONCE $REMOTE_NAME OK
  exit 0


Channel script for the third blaster

  #!/bin/sh
  REMOTE_NAME=DTA
  irsend -d /var/run/lirc/lircd1 SET_TRANSMITTERS 1
  for digit in $(echo $1 | sed -e 's/./& /g'); do
          irsend -d /var/run/lirc/lircd1 SEND_ONCE $REMOTE_NAME $digit
          sleep 0.4  # note, you may have to tweak the interdigit delay 
up a bit, depending on your STB model
  done
#irsend SEND_ONCE $REMOTE_NAME OK
  exit 0


Interesting on the power cycle. Problem is with the DTA's, they are 
always on, no power button to turn them off unless you unplug them. This 
gives me an idea however, I might try to send the channel command twice.

Since I looked at the logs the backend never had any errors so it has to 
be with the DTA's just being a crap settop box. Thanks for making think 
a bit and maybe a way to fix this. I will report back if it works or not.

-- 
Regards,

Mike Bennett
mbppg.com



More information about the mythtv-users mailing list