Author Topic: 10 sec pause on live TV command  (Read 5711 times)

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
10 sec pause on live TV command
« on: January 18, 2009, 08:10:32 am »
I have my LCD hooked up to my MD via RS232, when I hit the live TV button on my orbiter there is about a 10-15 second delay before it switches the tv input, any idea why the delay is there? All the other commands are instant, and if I go to the resend AV commands and hit the different inputs they are all instant, there is only a delay when using the live TV button on the orbiter.
-Krys

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: 10 sec pause on live TV command
« Reply #1 on: January 18, 2009, 08:58:30 am »
I have my LCD hooked up to my MD via RS232, when I hit the live TV button on my orbiter there is about a 10-15 second delay before it switches the tv input, any idea why the delay is there? All the other commands are instant, and if I go to the resend AV commands and hit the different inputs they are all instant, there is only a delay when using the live TV button on the orbiter.
-Krys

I think there in template you can specify timeout for on/off commands. Check your settings. This setting is meant for devices that are slow and won't receive any further rs232 commands until they fully turn on....

HTH,

regards

Bulek.
Thanks in advance,

regards,

Bulek.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: 10 sec pause on live TV command
« Reply #2 on: January 18, 2009, 06:37:14 pm »
BuleK is correct.  The first command that is issued is an 'on' command, which will have a delay if the TV is in fact off and needs to power up fully before receiving further commands.  I would check the ruby code in the 'on' command for your device.  A better implementation would be for the 'on' command to check to see if the TV is on before issuing the command and delaying.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: 10 sec pause on live TV command
« Reply #3 on: January 18, 2009, 07:24:43 pm »
there is no delay set in the on command in the ruby codes, and as far as I can tell there is no place to set the delay in the template like there is for IR devices (or I just cant find it

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: 10 sec pause on live TV command
« Reply #4 on: January 19, 2009, 02:37:44 am »
Hi,

go into Edit A/V properties in template. you'll have a line like that :
Quote
Delays: Power: 2000 miliseconds, Mode: 1000 miliseconds, Other: 0.5 miliseconds [change/explain]

and there you can check what is your delay for power command...

HTH,

regards,

Bulek.


Thanks in advance,

regards,

Bulek.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: 10 sec pause on live TV command
« Reply #5 on: January 19, 2009, 06:34:21 pm »
Hi,

go into Edit A/V properties in template. you'll have a line like that :
Quote
Delays: Power: 2000 miliseconds, Mode: 1000 miliseconds, Other: 0.5 miliseconds [change/explain]

and there you can check what is your delay for power command...

HTH,

regards,

Bulek.




I would also advise him to check the commands themselves as some, such as the Denon receiver, have a pause in the ruby code for multi-step poweron.  It may be stackup of a couple of timing delays that's causing this.

Pete K

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: 10 sec pause on live TV command
« Reply #6 on: January 19, 2009, 09:45:42 pm »
Is it possible for the system to know that the TV is already on and not bother trying to send the on command? I thought one of the benefits of serial (rs232) was two way communication?

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: 10 sec pause on live TV command
« Reply #7 on: January 19, 2009, 09:46:32 pm »
A better implementation would be for the 'on' command to check to see if the TV is on before issuing the command and delaying.

I assume I could do this with some sort of "if" statement?
maybe something like what I use for mute?
   if(@mute)
          <$"ke 01 00\r"$>
        else
          <$"ke 01 01\r"$>
        end
        @mute=!@mute
but change it out

   if(@off)
          <$"ka 01 01\r"$> # Power on command
        else
          <$"-- 01 --\r"$> # What would I put here?
        end
        @mute=!@mute # and here?
« Last Edit: January 19, 2009, 09:50:38 pm by krys »

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Re: 10 sec pause on live TV command
« Reply #8 on: January 20, 2009, 04:15:59 am »
The problem with the method you're following is that it assumes that LMCE is in complete control of the TV, which is not true in real life.  In real life, someone may have come along and turned off the TV while LMCE thought it was on.   The next time you try to use it (for example by pressing the 'menu' button on the remote), you want LMCE to recognize it is off, turn it on, and wait for any required delay before proceeding with further commands (changing inputs, etc).

I'm not sure what the TV you're using does, but my Olevia responds to the 'power status' command with a status reply when it's on, but not when it's off.  So the correct functionality would be for the on command to:

Code: [Select]
Send a 'Power Status' command;
while (some_short_timeout)
   {
      if (TV replies with 'Power Status ON')
     {
          exit;
     }
 }
 Send 'TV On' command;
 Wait_for_timeout_period;   

There's a good implementation of a TV GSD here:

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

I'm not very experienced at using ruby, so I still have to figure out how to do the above as a GSD, but I'll be doing so shortly

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: 10 sec pause on live TV command
« Reply #9 on: January 20, 2009, 03:43:07 pm »
yes  I am familiar with that wiki, I have been trying to find the author because a few of the commands (the ruby internal commands) cause an error when starting my device. I will check to see if I can find a power status command for LG's.

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: 10 sec pause on live TV command
« Reply #10 on: January 20, 2009, 05:19:29 pm »
I run into the same issue with my IR only tv, and slightly worse. I think my delay is more like 7 or 8 seconds, but it's still bad enough for me not to use it.  Delay to switch, another 8 second delay to switch back if I pull up a menu (ie use my gyro mouse to control volume).  If LMCE has been idle, I'll switch my TV to the LMCE input then start going through LMCE menus sometimes it will think it's on the wrong input and toggle the input to the wrong HDMI.

I thought going with an RS232 TV when I'm ready to buy a new one would resolve my issues, but I guess not.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: 10 sec pause on live TV command
« Reply #11 on: January 20, 2009, 05:41:04 pm »
yes that was the impression I had also, and maybe I just have something screwed up. I found the delay option last night (i was looking under GSD, the delay option is under AV devices>AV properties) I changed it from 8sec to 4 sec and there is still a huge delay. Also for some reason now it is doing this.
 1. I hit the live TV command while LMCE is displayed on the RGB input on the TV.
 2. The screen goes black but I can still see the cursor to know no inputs have changed
 3. 10-15 sec pause, then the TV switches inputs to its internal tuner (whichever channel TV was on last)
 4. 3-4 sec pause, TV switches inputs back to RGB
 5. 3-4 sec pause, TV switches inputs back to Tuner, but this time it is always on channel 54-2
 6. channel 54-2 is not available, if I don't change the channel within about 5-10 seconds to a valid channel the TV switches inputs back to RGB

Very strange IMO I havent had a chance to sit down and watch the log but hopefully I will do that tonight.
I can see how rs232 will be awesome once I get these bugs worked out, but right now its a real PITA.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: 10 sec pause on live TV command
« Reply #12 on: January 22, 2009, 08:50:20 pm »
bump, need someone to help me figure out how to write the code so that LMCE checks to see if the device is on before sending the on command.