Author Topic: How LinuxMCE handles Display power On/Off?  (Read 3064 times)

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
How LinuxMCE handles Display power On/Off?
« on: April 17, 2009, 02:27:09 pm »
 ;)
Hey all,

I have an interesting query. I was wondering if there was a way to control the display/tv power off after media is done playing. Here is what I would like. It is very cool that the system powers off the Display after so many minutes of no activity. However, my problem is, that it shuts the TV off every time you exit media, be it watching TV, video, etc. Is there a way to not have it turn off after media, or immediately after media playback?

I also notice that because I have "Ignore On/Off" set to "On" that my bedtime advanced scenario will not turn the TV off. Only the lights.

Is there any way to resolve this. A setting somewhere that I missed. The "Leave display on for OSD" is enabled, but it still turns everything off after watching media.

Thanks.

Regards,

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

alx9r

  • Guru
  • ****
  • Posts: 187
    • View Profile
Re: How LinuxMCE handles Display power On/Off?
« Reply #1 on: April 17, 2009, 05:24:01 pm »
I have an interesting query. I was wondering if there was a way to control the display/tv power off after media is done playing. Here is what I would like. It is very cool that the system powers off the Display after so many minutes of no activity. However, my problem is, that it shuts the TV off every time you exit media, be it watching TV, video, etc. Is there a way to not have it turn off after media, or immediately after media playback?

seth, could you reword your problem and goal? i've read your first post a few times and can't make sense of what you're trying to accomplish.

seth

  • Guru
  • ****
  • Posts: 485
  • A day w/o LinuxMCE is like a day w/o sunshine!
    • View Profile
Re: How LinuxMCE handles Display power On/Off?
« Reply #2 on: April 17, 2009, 06:00:36 pm »
 ???
Sorry.

Here is what currently happens:

With the "Ignore On/Off" turned to "Off" , located in the advanced page inside the av device page for the TV, the TV turns itself off and all commands sent from the system to the TV work as far as power on or off.
The problem here is that when I exit Media, like turn off MythTV or a video finishes running, the TV power off immediately. Then you have to manually turn the power on the TV, to view the UI2 menu. Now this is just a bit annoying, but that is not the real problem.
After exiting media, and manually turning on the TV, if you go to watch something else, it starts and the TV powers off, because as far as the system knows, it's last state was off, so it sends the command again (my TV only has a single command for on or off) and you hear the media but now the TV is off.

So to resolve this issue, I have set "Ignore On/Off" to "On" in the advanced page inside the av device page, so now it does not turn the TV off, and by itself this isn't bad, but because it is ignoring the on/off commands now, I have other scenarios I use to power off/on the TV, and they don't work.

Now i look in the orbiter screen, and see there is a check box for "Leave Monitor On for OSD" and I have it checked. I thought this might leave the TV on for viewing the UI2 menu, but still allow for the system to turn off the TV after inacvite time has passed, and allow for my other scenarios to power cycle the TV, but it does not work this way. It still powers off the TV after media exits.

So I was hoping there was another setting somewhere that I can make it so the UI2 menu is displayed, before and after the media starts and exits, while still giving the system control over powering on and off the TV

I know this is a bit long, but it is the best way I can describe it.

Regards,.

Seth
".....Because Once you've LinuxMCE'd....."
System stats located at my user page:

http://wiki.linuxmce.org/index.php/User:Seth

alx9r

  • Guru
  • ****
  • Posts: 187
    • View Profile
Re: How LinuxMCE handles Display power On/Off?
« Reply #3 on: April 17, 2009, 06:34:49 pm »
I use RS232 to control all of my AV gear, so I don't have experience with setting up IR AV devices. 

I'm pretty sure that this ground has been plowed somewhere in the forums and wiki.  I think you're experiencing a problem inherent to toggle codes.  I doubt you'll ever get the TV's on state to be controlled 100% reliably by linuxmce using toggle codes over IR.  You might be able to get it working better than it is though. 

FWIW, here's my two cents.

Probably the first step to coming up with a solution is to take a look at the logs for your TV.  They will show what commands are being sent by the router to your TV device. 

Use
Code: [Select]
tail -f /var/log/pluto/<device's log file>to watch the log being updated in real time.

From my logs I could tell that power and input signals were being sent to my devices much more often than I expected.

I set up the device templates (using some ruby code) for my receiver and amp so that a signal is sent to the hardware (over RS232 in my case) only when the state actually needs to change.  i.e. some ruby code shelters the device from repeated commands.  This is accomplished by keeping track of the hardware's state (i.e. whether or not it is on) in the device template. 

I'm not sure how easy it is to do this with an IR device.  If you can initiate sending IR commands from ruby code it might be possible.


Alex

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: How LinuxMCE handles Display power On/Off?
« Reply #4 on: April 18, 2009, 03:23:39 am »
I also use a toggle-type IR controlled TV.. There are some tips to make it easier:

- In the "Power" menu of UI1, there are buttons to power on and off the TV. The good thing is, that they are not managed, meaning if you power on from that button manually, it won't turn itsself off until you manually do it again from that menu. Likewise, if the tv is on, and you turn it off with the Off button on that screen, the toggle state will be preserved.

- regarding UI2 - you shouldn't have to turn the TV on manually at all. If the TV is off and you use an MCE remote for example, just hitting the green "windows" button will turn the tv on for you. I believe there is a way to do something similar from the keyboard as well, but I forget what it is.

- regarding LMCE knowing the power state of the tv - things will be fine as long as you always let LMCE turn it on and off, and always turn it off manually if you have to before a reload of the router or a reboot. Once you get used to using it in this manner, it works quite well. (Of course, RS232 or discrete commands don't have this problem)