INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Rig the Media Center Remote for discrete on/off commands  (Read 9542 times)

greg.smalter

  • World Citizen
  • ***
  • Posts: 153
Rig the Media Center Remote for discrete on/off commands
« on: November 02, 2011, 01:18:46 pm »

I have an HTPC that I control primarily with an IR remote. I'd like a way to turn the HTPC on if it's off, or keep it on if it's already on, and a way to turn it off if it's on, and keep it off if it's already off (discrete on/off commands). Since Microsoft has only given us a power toggle, here is what I've tried and the reasons for failure:

1. Turn the power toggle button into an on-only command by configuring Windows to ignore standby commands. Then, have the HTPC sleep after X minutes of idle time in order to turn off. This doesn't work because "idle time" is really ambiguous, and I can't find a reliable way to get the computer into a state that is definitely considered idle (regardless of what the user was doing when they decided to turn the system off).

2. Use EventGhost to capture a totally unrelated IR code and use it to invoke a Standby command. I assume this would work even though I haven't followed it all the way through, but evidently EventGhost has to run as an Administrator under a logged-in user, which means having the HTPC used by my kids and guests in Admin mode, and that's not something I'm willing to do.

3. Use some other way of waking the HTPC up. It seems like not just any IR command will wake it up (even if the receiver flashes red). I can use wake on LAN, but then I'd need some device to turn an IR command into a network magic packet. Seems too hard.

4. Leave it on all the time. This is what I'm doing now, but it feels wrong and I feel like there's some voodoo bi-directional HDMI communication going on and when I turn my receiver off and on under the HTPC's feet, weird things happen. For example, WMC (which I still use, due to this post: http://yabb.jriver.com/interact/index.php?topic=67237), has often crashed when I turn on my receiver again.

Has anyone solved this? I know MC has some ability to do custom IR stuff. I'm not sure if it would address this problem.

PS. Kudos to Microsoft for solving a non-existent problem (IR debouncing, which I had to disable because it makes it impossible to use a universal remote) and not understanding how important it is to have discrete on and off commands.
Logged

mbagge

  • Galactic Citizen
  • ****
  • Posts: 255
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #1 on: November 02, 2011, 01:44:27 pm »

ad3) Does your Bios support 'wake on usb' ? Maybe your ir would be handled as an usb event and wake up your computer ?

if it was an usb mouse, Microsoft's advice is:
To manually enable the Wake from standby option for the USB mouse, start Device Manager, right-click the USB mouse driver, click Properties, and then click to select the Allow this device to wake the system from standby check box.
Logged

greg.smalter

  • World Citizen
  • ***
  • Posts: 153
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #2 on: November 02, 2011, 02:30:14 pm »

ad3) Does your Bios support 'wake on usb' ? Maybe your ir would be handled as an usb event and wake up your computer ?
Wake on USB does work, and that is how the IR remote is able to turn on the HTPC. The problem is that the exact same button also turns it off. So, if you are making a macro for "Watch TV" which turns the TV on, turns the receiver on, sets the receiver to the correct input, and turns the HTPC on, and one of those commands misses, re-pressing the Watch TV macro might end up turning the HTPC back off. This would not happen if the on command and the off command were separate.
Logged

cncb

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3091
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #3 on: November 02, 2011, 03:39:23 pm »

I combine #1 and #2.  Just assign an unused button on the remote (I use the 'DVD' button) to turn off the PC.  I ran into the same problems with Eventghost so I switched to LMRemote which doesn't need elevated privileges to run.  You could also do this with the built-in remote features of MC.
Logged
-Craig    MO 4Media remote and player:  Android/TV/Auto | iOS | Windows 10/UWP

greg.smalter

  • World Citizen
  • ***
  • Posts: 153
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #4 on: November 06, 2011, 12:33:08 am »

You could also do this with the built-in remote features of MC.
I have achieved this. It wasn't straightforward. Here we go:

1. Disable Hibernation and Hybrid Sleep on your computer. If you want these for some reason, this solution may not work for you. I'm assuming Windows 7.

2. Make your system ignore the MCE "power" button. I did this by going to Power Management and making the behavior when the Sleep button is hit be nothing. I think there are other ways to achieve this (which you may want to look in if your computer actually has a physical sleep button on it and you actually want to still be able to use it).

3. Create a batch file anywhere on your hard drive with the contents "%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState".

4. Enable Remote/Other HID under Devices & Options.

5. Under commands, add a new custom command called Sleep. Check the box to suppress system handling (this may not be necessary, but makes the most sense). Have its only action be to run the batch file in step 2.

6. In the list of commands, highlight Sleep and click Learn up top. It seems like Learn only works if it's a command from an MCE remote (and even then only if you've done step 3), so give it some garbage one from the remote. I gave it the large loopy-looking arrow button above the D-Pad. To this day, I don't know what it does.

7. In Startup Options, ensure that Media Server (at least) is set to start when Windows does.

8. If you are not ready to have MC be your primary media player and are only doing this to get the discrete on/off but still want to use WMC as your primary media player, you'll have to uncheck Microsoft MCE in Devices & Options. Otherwise, the green button will launch both MC and WMC.

Phew, I think that's it. Hopefully there are no issues with this. I admit I have not actually tested this with a non-admin account yet, and I may run into a problem if the standby batch file requires admin rights. Still, I prefer this to setting up yet another third-party tool like EventGhost.

Also, if you follow Step 2 only, you'll at least get a discrete on button, which is better than nothing (this is basically Solution 1 from the original post).
Logged

greg.smalter

  • World Citizen
  • ***
  • Posts: 153
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #5 on: November 13, 2011, 11:01:43 am »

Drawback - this seems to disable the skip forward and skip backward buttons (at least when using WMC). I'm not sure how to fix this. I don't notice any other buttons being disabled.
Logged

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #6 on: November 13, 2011, 11:32:46 am »

yes, I have noticed the same thing. If I MC and WMC are both running the skip does not work in WMC.

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1598
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #7 on: November 13, 2011, 02:54:06 pm »

I use a Logitech Harmony with Activities to achieve this...

Say I want to turn the TV on, I press "Watch TV" and it turns my TV and my HTPC on, then changes to MC TV Guide.

Let's say I then want to listen to music (My TV is already on). I press "Listen to Digital Music". The Harmony recognises that the TV is already on, and simply changes to Theater View Music.

I'm doing this with a WMC remote receiver and one of the inexpensive Harmony's will do the trick (I use the One and love it, though).

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #8 on: November 13, 2011, 03:10:46 pm »

I also have my Harmony set up this way, I can switch from Display View, Playing now, Standard view and Theaterview...
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

greg.smalter

  • World Citizen
  • ***
  • Posts: 153
Re: Rig the Media Center Remote for discrete on/off commands
« Reply #9 on: November 14, 2011, 10:06:01 pm »

I use a Logitech Harmony with Activities to achieve this...
I think the Logitech remotes are nice remotes, but there's a big drawback - they use state. As you said, the remote knows the TV is already on. Well, if it ever gets out of sync with reality, which it can and will, then its smartness will actually cause a problem.

A stateless remote that unconditionally tries to turn the TV (or whatever device) on when you hit Watch TV, and for the TV to stay on if it's already on and turn on if it's not (because the command is an On command only, not a toggle) is the most reliable way to control an entertainment center. It works when signals miss, and it works if someone physically touches the power button on the TV.
Logged
Pages: [1]   Go Up