Author Topic: Control DirecTV receiver via serial  (Read 3453 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #15 on: October 05, 2008, 07:50:16 am »
what do you want to know as to how it works? I know our documentation can always use improvement.. but what are you confused about specifically?

-Thom

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2421
    • View Profile
    • ago control
Re: Control DirecTV receiver via serial
« Reply #16 on: October 05, 2008, 09:41:00 am »
I'm sorry, perhaps I am just dense or something but this is not making much sense to me. It looks like the whole generic serial device thing is meant to only emulate button presses on a remote control, and that is not what I want here.
no, thats wrong. A GSD is a quick way to create a DCE device that uses external commands, serial, usb converters or ethernet.
 
Quote
Is there really no way to just have it execute an external script anytime the channel needs changed, and pass that script just a single argument of the channel number? Thats all I need to get this working the same as it is right now with MythtTV.
hehe, you can use super-glue and mix whatever you want. It is just the basic principle concept behind LMCE is: everything is a DCE device. Otherwise devices could not uniformly interact. That is e.g. needed for AV pipes to work properly in your case.

If you don't aim for having your devices controllable by DCE, there is not much point about using LMCE. For a quick solution, if "you do not understand ruby", just use the ruby system() call (iirc) in the GSD to fire your external perl script.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #17 on: October 05, 2008, 06:57:01 pm »
The confusion for me right now is understanding when the GSD is used. For instance if I start an orbiter (on my desktop PC, controlling the LMCE PC) and press a number button, should the corresponding number in the GSD be activated? Is there any easy way to test the GSD functions manually? I've tried looking in log files (/var/log/pluto/[number]_Generic_Serial_Device.log) and have seen some activity, but nothing that appears to correspond with any event I initiate. I have filled out the 0-9,enter/go,power on/off commands in the GSD.
Now then I also don't have the capture card setup as a device in LMCE, mostly because there is no template for a PVR-350 (and there were unanswered questions about the device id in the forums). But theres confusion here too; do I really need to set it up in LMCE or is Myth the only thing that cares about it? Same goes for TV and audio system, which I am quite happy controlling directly via remote (at least for now). I do however want to use the remote that came with the PVR-350 and am not completely sure how to set that up.
So I am completely willing to do things the right way, but am having a hard time figuring out exactly what that is and how to achieve it.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #18 on: October 05, 2008, 07:04:30 pm »
have you tested each command to see if it properly sends to the reciever (using the test button?)

You should do this starting from the wizard > a/v devices screen, so that the system understands which device you are talking to, and therefore where to send the commands.

-Thom

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #19 on: October 05, 2008, 07:34:31 pm »
No I had not noticed that test button previous, it is exactly what I was looking for. Unfortunately nothing happens when I press it, though it reports that the command was sent to device #1 (the sat box was added as device #39?). I see nothing in the logfile for device 39.
I have also confirmed that the serial commands I formed do indeed work (send the bytes for a "2" keypress in perl and it acts as if i had pressed the "2" button on the remote).

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #20 on: October 05, 2008, 09:06:36 pm »
can you send me screen captures of your device template page, and your wizard > a/v devices page?

So i can have a point to start from?

Thanks
-Thom

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #21 on: October 06, 2008, 03:33:54 am »
Sure thing, I will email them shortly. Thanks for helping out, and puting up with my frustrations.

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #22 on: October 08, 2008, 06:45:23 am »
Still never made it any further with the channel changing, but I did manage to apply enough duct tape (since you like that term so much :) ) to turn it into a usable replacement for my prior setup. I ended up just using my existing perl script as an "external channel change program" in mythtv. Its not ideal, i know, but works for a system that will never be expanded beyond one core/hybrid (I love alone, in a 500 sq ft house). Someday I would like to revisit this and get it going the right way, but probably not until getting hardware that is better supported out of the box. I also managed to get the remote working that came with my PVR-350. After blundering around in the admin interface (and manually loading the lirc_i2c kernel module and copying lirc configs from my old setup) lirc fired up, but only 2 of the buttons did anything. So I tried changing lircd.conf, only to have my changes be overwritten :P Looked around on the wiki and saw that I needed to add a row to the _main.RemoteMapping table. So copied the existing default mapping, made it more generic to suit the low number of buttons, reloaded the router, and presto, remote works.
So here I am, with the same MythTV functionality I had before, but with the following extras:
1) SPDIF audio works. No matter how much i tweaked the old setup, it would never do anything but occasionally make some really bad noises when I tried using SPDIF (same hardware). Finally utilizing the DTS decoder on my audio system is incredible!
2) Better Audio / Video / DVD browsing / playback interfaces. The MythTV UI is great for TV, but man did they miss the mark when it comes to browsing mp3s.
3) Someday I can experiment with the home automation, security, telehpony, etc. No immediate plans for this.
4) The flickr screensaver is pretty :)
A big thanks to those of you that helped me or at least just tolerated my rantings. I'm sure you will be seeing more of me as I try to remove some of the duct tape I had to use to get this far, but for now I am happy.

posde

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3045
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Control DirecTV receiver via serial
« Reply #23 on: October 09, 2008, 08:13:17 pm »
Hello merkur2k,

nice to hear that you got some progress, even though not the way the system was intended.

Play a little bit more with it, and I am sure, one day it will Click for you, and you see why things did not work before. Good luck, and thanks your feedback regarding stuff working.

rgds
Oliver

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: Control DirecTV receiver via serial
« Reply #24 on: October 10, 2008, 02:01:21 am »
One further quick question I did have; is there any easy way to completely disable the generic serial device functionality? Its eating alot of cpu (5-10% constant) and occasionally interferes with my channel changing script.