Author Topic: Mythtv and HD-PVR control of cable box.  (Read 8658 times)

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Mythtv and HD-PVR control of cable box.
« on: April 07, 2012, 03:54:06 am »
I am running Linuxmce 8.10 final. I have a hybrid and 2 media directors, 1 a PC, the other a HTPC.
I have a single tuner HDHomeRun and a gc100 controlled by the core located at the HTPC.

I recently purchased an HD-PVR 1445. It is located at and controlled by the core.
I have recompiled driver hdpvr to recognize the device ID , 4903. It is setup in Mythtv and provides video and audio. The component input is from a verizon fios stb.
The stb is set up as an AV device controlled by a usb-uirt. The usb-uirt is controlled by the core. I can manually send ir commands to the stb from the Infrared codes button on the orbiter,
through the usb-uirt, and it changes channels.
 
My problem is how to get Mythtv to control the channel change. Any help would be greatly appreciated.

ardirtbiker

  • Guru
  • ****
  • Posts: 308
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #1 on: April 07, 2012, 03:59:42 pm »
Have a look at this http://wiki.linuxmce.org/index.php/TuneToChannel.sh

Wnen you set up your 'Input Connections' in MythTV for your HDPVR there will be an field to enter an External command to change channels... you will enter the information there.

Dennis
« Last Edit: April 07, 2012, 04:04:17 pm by ardirtbiker »

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #2 on: April 07, 2012, 06:37:12 pm »
I think thats just what I've been looking for. I'll try it tonight and see. Thank you very much.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #3 on: April 07, 2012, 11:59:44 pm »
This should never have to be done manually. MythTV_Plugin literally sets up this information as part of its initialization process.

-Thom

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #4 on: April 08, 2012, 12:42:58 am »
Thom-
     Sorry, I had to turn off Mythtv Plugin auto config because I have a single tuner HDHomeRun. It sees it as a two tuner card and causes Mythtv to error. I didnt think of it until I read your post. I let Myth Plugin auto-config then turn it off and enter mythtv-setup and delete the second tuner. I left it off and thats probably why it didnt pick up the new equipment. Thanks for alll the great work you do on the project.

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #5 on: April 08, 2012, 04:35:31 am »
Mythtv , HD-PVR and STB now work together very well. I've unchecked the "Don't Auto-Configure" box in Mythtv-Plugin and don't have the issues I did before.

However , the saturation and brightness issues are horrible. I found the v4l2-ctl commands to correct the picture but they revert on every channel change.

I wrote a script to fix the picture, but haven't found a way to have it called. I'm sure this has been covered some where. I just can't find it.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #6 on: April 08, 2012, 04:59:44 am »
There is a mythtv sync script in /usr/pluto/bin, which sets values. Are those values being set in that script?

I am sorry, I am away from an lmce setup at the moment, so I can't help.

-Thom

ardirtbiker

  • Guru
  • ****
  • Posts: 308
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #7 on: April 08, 2012, 03:18:26 pm »
Thom,
      Ive never had my HDPVR autodetected (dont know if its because it has to be plugged in AFTER ive set up my MD).

about the sync script...  Will these settings correct the video 'oversaturation and color issues' on the latest firmware for the Hauppauge HDPVR?   I tried the latest firmware, but the video color is all wrong (mostly pink...eeeekkkk!!!).     However the latest firmware changes channels much better and is quicker.

The latest firmware is version 1.7.1.30059 as indicated here:http://www.hauppauge.com/site/support/support_hdpvr.html


in the script, will there be fields where I enter commands such as those found here:http://www.mythtv.org/wiki/Hauppauge_HD-PVR#Bitrate_and_Picture_Controls

Thanks,
Dennishttp://www.mythtv.org/wiki/Hauppauge_HD-PVR#Bitrate_and_Picture_Controls

« Last Edit: April 08, 2012, 03:20:15 pm by ardirtbiker »

mkbrown69

  • Guru
  • ****
  • Posts: 213
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #8 on: April 09, 2012, 04:39:06 am »
Kramden,

There's a firmware issue on current versions of firmware for Linux.  The fix will end up in up in a 3.3 Kernel.  Take a good read of <http://www.mythtv.org/wiki/Index.php/Hauppauge_HD-PVR>.

Note this part in particular:

 Note: 29-Aug-2011: The latest version of the firmware, 1.6.29207, dated July 27, 2011, causes oversaturation and color issues with the encoding of the analog signal. Until this is resolved, you do not want to upgrade to this version. Version 1.5.7, from June 17, 2010 appears to work. Hauppauge has acknowledged the issue and provided a link to the earlier firmware for non-Windows systems on their support page: Hauppauge HD-PVR support
A patch has been submitted upstream to fix this issue and it has been merged into Linux kernel v3.3-rc5.

This appears to be the fix:

Until a patch that sets the new defaults is committed to the kernel, you can use v4l2-ctl --set-ctrl brightness=0x80 --set-ctrl contrast=0x40 --set-ctrl hue=0xf --set-ctrl saturation=0x40 --set-ctrl sharpness=0x80 to set the proper defaults.

You might be able to put that into a channel change script.

Hope that helps!

/Mike

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #9 on: April 09, 2012, 07:12:10 pm »
Mike,
   I have that in a script, and it does correct the picture. However it must be run after every channel change. It also requires root privileges. I must sudo the script.
I am working on getting the TuneToChannel.sh to call my script. I am away from home now but I am going to try to setuid the script if Kubuntu  allows it, or find out how to sudo in the script without a password. This is not how it should be done, I'm sure. But ...


Edit: Slaps forehead in disgust. Inside Mythtv there are recorder controls for brightness, color, etc. They barely have the range but they do get the picture acceptable. So the external script is not needed.
« Last Edit: April 10, 2012, 01:59:29 am by Kramden »

ardirtbiker

  • Guru
  • ****
  • Posts: 308
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #10 on: April 10, 2012, 10:46:07 pm »
Please note there is actually a NEWER firmware ... 

snip from this page http://www.hauppauge.com/site/support/support_hdpvr.html

Windows driver for HD PVR

HD PVR driver version 1.7.1.30059
This version is for Windows 7, Windows Vista or Windows XP. It is also for HD PVR users with third party Mac or Linux applications.

Please note: this loads firmware onto HD PVR (it must be run on a Windows PC). The third party Linux or Mac application is still needed.

Dennis

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #11 on: April 11, 2012, 05:36:07 pm »
Thank you , yes that is the firmware that I have installed. The issue probably wont be corrected until we get to a 3.3 kernel driver. With the mythtv recorder controls almost to their limits I get an acceptable picture. With LinuxMCE patience is paramount.

ardirtbiker

  • Guru
  • ****
  • Posts: 308
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #12 on: April 12, 2012, 12:28:04 am »
and its rough because Im somewhat impatient!   Always on the run... always got more to do than time to do it!

Im gonna re-try this latest firmware and try the scripts to get a reasonable picture..


Dennis

Kramden

  • Regular Poster
  • **
  • Posts: 21
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #13 on: April 16, 2012, 01:43:22 pm »
@ardirtbiker
 Dennis, I have upgraded to 10.04. I checked the driver that ships with latest snapshot and it doesn't support my 4903 id. I went to http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers and followed instructions for developer's approach of driver package. The new driver builds with kernel 2.6.32 with a warning about the old kernel.
 It is working for me in LiveTV. No need to correct the picture. Mythtv is giving me errors about unable to connect to backend server and all tuners in use but no recording. I'll work on that. But the main thing is its working without requiring correction.

ardirtbiker

  • Guru
  • ****
  • Posts: 308
    • View Profile
Re: Mythtv and HD-PVR control of cable box.
« Reply #14 on: April 17, 2012, 01:41:51 am »
alright... thanks for the info.   Ive not yet gotten to that... been working on setting up FTA satellite...

Dennis