Author Topic: Command "Tune to Channel" use in Device Template  (Read 1249 times)

ardirtbiker

  • Guru
  • ****
  • Posts: 248
    • View Profile
Command "Tune to Channel" use in Device Template
« on: March 20, 2011, 06:42:19 pm »
Gentlemen (and/or Ladies)  ;D

I have been using the 'directv.pl' script in mythtv (to change channels on my satellite box) for some time now.   However this is limited control of my stb.

I built a template for my DirecTV HR20, and read about changing channels using the TuneToChannel.sh script

This script invokes command #187 (Tune to Channel).   I assume I need to write a script inside this command to send the recieved channel to my STB (via RS232).  

I am not sure how to 'capture' the channel sent by the TuneToChannel.sh script within Command #187.  Do I read the command line parameters passed?  If  so, where can i read up on how this is done?

Thanks,
Dennis

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #1 on: March 20, 2011, 06:47:25 pm »
You're doing this all backwards. Stop it. *thwap*

If you have a device template made, and it knows how to control the device, LinuxMCE has already made the plumbing to make TuneToChannel.sh work.

-Thom

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #2 on: March 20, 2011, 06:48:30 pm »
have you made a GSD or an IR device?

*thwap-you-again-for-good-measure*

-Thom

ardirtbiker

  • Guru
  • ****
  • Posts: 248
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #3 on: March 20, 2011, 07:32:05 pm »
< humbly bows to Thom >

It is a GSD.

in my template I have defined codes for the 'SendUserCommand' as defined in the "DIRECTV Set-Top Box Information for the Installer" (DTV-MD-0058) document.
  
This includes the Ch Up and Ch Down commands.  


My setup is such:  Component out of STB to HDPVR... Audio output from MD sound card to input 3 of my Kenwood Receiver, and TV out on my video card directly to Component in on my TV  (I am not controlling my TV at this point and is NOT defined in the MD).

So, since what I was trying to do isnt correct,  At this point, am I supposed to use the "TuneToChannel.sh" script in MythTV?   If so, what 'code' in my STB template does the script use to change the channel directly?   Or does it do some other magic?    

At this point, I can 'standby' and 'active' my STB from LMCE by testing the code... do I just need ch Up and Ch down?   Somehow I need to link the TuneToChannel.sh script which runs MessageSend (command 187 Tune To Channel), but if this code is empty in my template it wont know how to change the channel will it?

Sorry, but I program life safety systems... and I am probably trying to look at it in that perspective!!!!

Dennis (sometimes a menace)
« Last Edit: March 20, 2011, 07:36:11 pm by ardirtbiker »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #4 on: March 20, 2011, 08:46:53 pm »
Again, you are making it 50,000,000,000 times harder on yourself than you ever should. LOOK AT OTHER TEMPLATES OF THE SAME TYPE...

Just make sure the basics are implemented at least.. number keys, channel up, channel down, as many commands as you can find equivalents for, test them, make sure they are okay,

AND LET LINUXMCE DO THE REST.

Seriously.

The system is smart. So long as it knows how to control your devices, and how they're hooked up (setup wiz, Web admin, whatever), it will do the right thing.

ardirtbiker

  • Guru
  • ****
  • Posts: 248
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #5 on: March 20, 2011, 09:39:14 pm »
Otay!!!!   Will give it a shot and see the magic!  ;D

Dennis

ardirtbiker

  • Guru
  • ****
  • Posts: 248
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #6 on: March 21, 2011, 01:13:38 am »
just magic!!!!


however, this whole thing about going directly to the STB instead of using the Directv.pl script didnt resolve the issue that has been bugging me...

When I changed channel, my HDPVR would cycle while the channel changed... if I were changing from an HD channel to a SD channel, it would fault and either crash Myth or Myth would display an error and dump me to its menu.

If I changed my STB directly with the STB remote, the channel changed perfectly...   


SO...  I guess somehow Myth is not set up right, or this is a normal operation of the HDPVR during channel change.

any input?


Dennis

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5498
  • DOES work for LinuxMCE.
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #7 on: March 21, 2011, 02:38:08 am »
make sure, of course, that your HDPVR has been upgraded to the latest firmware using the windows tools. This resolves the issue.

I also make sure that the DirecTV box ALWAYS outputs 720p or always 1080i.

I would also kindly ask you to please submit your device template to sqlCVS, using the web admin > sqlcvs diff
(1) make a trac ticket, in http://svn.linuxmce.org/
(2) go to the web admin > sqlcvs diff.. and submit all of the tables in ir and dce... be sure in your comments to reference your trac ticket # so we can match it up.
(3) let us know.

Thanks.

-Thom

ardirtbiker

  • Guru
  • ****
  • Posts: 248
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #8 on: March 21, 2011, 03:20:03 am »
Will do Sir!

it may not be right away as I wish to test it further.


Dennis

ardirtbiker

  • Guru
  • ****
  • Posts: 248
    • View Profile
Re: Command "Tune to Channel" use in Device Template
« Reply #9 on: March 26, 2011, 05:10:20 pm »
To the LMCE developers:

Trac Ticket #1039 (new feature_request) submitted today.  sqlCVS-Diff completed as well (I hope...it said it completed successfully)

Dennis