Author Topic: New Device Template instructions with PNP for LG LCD TV  (Read 4378 times)

rwilson131

  • Veteran
  • ***
  • Posts: 118
    • View Profile
New Device Template instructions with PNP for LG LCD TV
« on: January 26, 2008, 04:43:40 pm »
I have just finished posting instructions for adding LG LCD TV device template along with a pnp script if anyone is interested. 

http://wiki.linuxmce.org/index.php/LG_42LB5D

Thanks,
Rob

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #1 on: February 02, 2008, 07:36:25 am »
Rob--

Thanks for this excellent wiki entry.  I'm using it to develop an Olevia template.

rwilson131

  • Veteran
  • ***
  • Posts: 118
    • View Profile
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #2 on: February 03, 2008, 05:45:47 pm »
Great!

We need more TV Templates.  Now we just have to have a clear method of syncing these new templates.

Thanks and have fun,

Rob

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #3 on: February 03, 2008, 06:51:01 pm »
as soon as we have sqlcvs working, we'll have it.

-Thom

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #4 on: February 03, 2008, 09:15:04 pm »
Nice work Rob!
Clean, Simple, to the point!

The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #5 on: February 05, 2008, 01:56:07 am »
Gang--

I'm having an issue I was hoping you could help me with.  I've got the template for my Olevia TV complete.  I'm working on getting the PNP script working correctly. I've created the script and added it to the PNP section of my device template and in the /usr/pluto/pnp directory.

This TV is similar to Rob's in that I'm using Power Status to detect it, and so I need to turn it on first before sending the status command query.

I believe I've gotten the Script working correctly.  When I call it from the command line (giving dummy arguments for $1, $2, and $4, and the correct port for $3) it turns on the TV and correctly identifies the TV (I can tell by the echo'd string).  However, I am not able to have LMCE auto-detect this TV.  I started the wizard and clicked on the 'TV' button, which I thought would try the detect scripts, but after leaving it running overnight, the TV was still off, indicating to me that the script was never called.  I do see the TV listed on the TV setup page as one of the direct control TVs.  Any ideas on what to do next?  I thought the PNP scripts were called on a regular basis by one of the plugins.  Is this correct?

Thanks,
-Peter

ddamron

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 962
    • View Profile
    • My LinuxMCE User Page
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #6 on: February 05, 2008, 02:51:29 am »
PeteK,

Nice to see you back!

Without seeing the Template, it's hard to diagnose..
I assume you put the script in the pnp section of the template..
And that the script is calling the correct Device Template at the back..

When you added the script & Template, I assume you rebooted..

I thought the only time those scripts were called were on a config change detected through HAL..

Since the serial port still exists, there wouldn't be a change in HAL..

Try rebooting with the TV plugged in.. I don't think a router reload is enough.

I'm kinda shootin in the dark here..  Good Luck!

All the best,

Dan
The only intuitive interface is the nipple.  After that it's all learned.
My other computer is your windows box.
I'm out of my mind.  Back in 5 minutes.
Q:  What's Red and smells like blue paint?

A:  Red Paint.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: New Device Template instructions with PNP for LG LCD TV
« Reply #7 on: February 05, 2008, 07:47:15 am »
Thanks Dan, but unfortunately no luck on the reboot.  The PNP script name is in the template and the scrip is in what I think is the correct place /usr/pluto/pnp/  for where I have the TV (on the host).  Running the script at the command line returns correct.  Here's the contents of the script, but again, I just don't think it's being executed at all.

ete@dcerouter:/usr/pluto/pnp$ ls -l 20_Olevia2XX_5XXT_TV.sh
-rwxr-xr-x 1 root root 940 2008-02-04 00:32 20_Olevia2XX_5XXT_TV.sh


pete@dcerouter:/usr/pluto/pnp$ cat 20_Olevia2XX_5XXT_TV.sh
#!/bin/bash
#Play and Play script for Olevia TV's Models Numbers:2XXT/5XXT Possibly more
#Power Up is very slow so it requires several seconds to get feedback
#Device Template Number:1917 on my local Machine.

#The TV only responds to the "Power Status Qery" command when the power is on, so we'll send the Power On command first, then send the Query command.
#We give it a delay to allow the TV to power up
echo "Olevia TV Detection script queue $2"
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 115200 -t "\BE\05\27\01\EB" -i 7
echo "Waiting for powerup"
#Now query to check for the TV power status reply
/usr/pluto/bin/TestSerialPort -p $3 -P N81 -b 115200 -t "\BE\05\90\00\53" -i 1 -s "\06\05\90\01\9C"
if [[ "$?" -ne 0 ]]; then
echo "It's not an Olevia TV"
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 0
else
echo "It is a Olevia TV"
/usr/pluto/bin/MessageSend dcerouter -r 0 $1 1 806 224 $2 13 "$4" 44 1917
fipete@dcerouter:/usr/pluto/pnp$ 

PS, I tried attaching a picture to this post, but I get a mesage complaining about upload path not found.