HTPC: Switch Between Kodi, Plex Home Theater, or Other Media Center via Remote
#1
Hey Guys -

Being a big automation fan, I professionally use SCCM and recently have been learning more about EventGhost. Having a dedicated PC as my media center which primarialy runs Kodi (newest 4.0 RC as of writing,) I recently found out how to do some cool things which I didn't see noted anywhere on these forums. Therefore, I wanted to post and share hoping it may be moved to the Tips & Tricks forum.

Required Hardware / Software
- Media Center PC running Windows
- Kodi / XBMC Installed
- Plex Home Theater Installed
- (Optional) Any other media streaming software
- FLIRC USB Adapter (May also use anything that can send commands / keystrokes to PC including Windows Media Remote, keyboard, etc)
- EventGhost Installed

How it Works
With my current setup at home, I have a dedicated PC running Windows 7 x64 with Kodi, Plex Home Theater, & EventGhost installed. Everything's on an SSD so it's really fast. Upon boot, Windows is logged into and Kodi started automatically. I use my DirecTV Genie remote with the FLIRC plugged into my media center PC where the below buttons on the same DirecTV remote do the following things:
- General playback buttons are all assigned to Kodi via FLIRC app
- "Red" button - Shows OSD saying "Switching to Plex", quits Kodi, then launches Plex.
As Plex HT is built on XBMC, all same playback buttons work the same
- "BLUE" button - Shows OSD saying "Switching to Kodi", quits Plex, then launches Kodi
- "Yellow" - Forces PC Restart (In case i get any errors
Auto launches Kodi after boot and on SSD takes about 10 seconds to perform)
- "Dash" button - Quits to Windows
In case I want to VNC into system

Notes
- I have other buttons assigned other than the default playback ones which open specific folders in Kodi, but thats pretty easy to figure out do won't cover that here.
- I actually don't use the buttons above anymore yet use EventGhost's "Multikey" command where instead of hitting one button, I hit a sequence of them (like "11"). This not only allows me to potentially assign thousands of additional commands to my remote's ~30 buttons, but also is a safeguard against hitting a button by accident and restarting entire PC. This is purely optional

How to Set it Up
Once everything's installed and configured,I used FLIRC (if using it) to assign a rare ketstroke (to minimize chance of it being used as hotkey by another app) to the buttons. For example, I assigned "Ctrl-Alt-Shift-R to the red button, Ctrl-Alt-Shift-B to the blue, etc.

1. Open EvenGhost and add the following plugins:
- Keyboard
- XBMC2
- Task Create/Switch Events
- Multitap (optional)

2. Create a folder for all commands or each you want to create. Below is a list of each command followed by how I implemented it:

Switch to Plex
- Show OSD: Switching to Plex (Optional)
- XBMC2: Quit
- Wait: 3.0 sec (Optional)
- Start Program: Plex Home Theater (Points to Plex's .exe file)

Switch to Kodi
- Show OSD: Switching to Kodi (Optional)
- Start Program: taskkill.exe
- Wait: 3.0 sec (Optional)
- Start Program: Kodi.exe (Points to Kodi's executable - same as in it's shortcut)
Note: When creating the taskkill command, use the following arguments: "/f /im PlexHomeTheater.exe"

Forced Reboot
- Show OSD: Reboot Initiated (Optional)
- Forced: Reboot Computer

Once you have created the above items as well as any other ones you wish, save your work and keep EventGhost open. Hit the button you programmed in FLIRC or type the keyboard shortcut you want to assign and it should appear in the left EventGhost pane. Once it does, simply drag it over and on top of the command you want it to perform.

It's that easy!

Obviously, you can make as many commands as you want and add other "Switch" groups for any number of applications including other media center apps or games. Throw in the MultiTap option, and you can assign an infinite number of things to your remote.

If you have any questions, let me know - Enjoy!




For those who have haven't used EventGhost before, it can seem intimidating at first glance, but is actually really simple. Basically, we are going to use it to translate keystokes into either Windows or Kodi commands.
- BzowK -
Reply
#2
Just out of curiosity, why do you have the need to switch to PHT from Kodi?
TV: VIZIO E-Series 43”
HTPC: Raspberry Pi 3
STORAGE: Windows 8 Server with DrivePool (Currently with 24TB)
Reply
#3
I'm also using eventghost to control and automate my avr, tv, pc and lights. What a great piece of software. easy and very flexible to use. Such a bummer we cannot use it with linux.

Can you please give some comments about response times of flirc and directv remote? Is it fast?
I'm using HP's mce remote but it's a bit slow so I'm about to get something else. It would be nice to know if flirc could be one solution.
Current setup
HTPC: G4560 Kaby Lake, ASRock H110M-ITX, 8 GB, Win10
Server: G2120 Ivy Bridge, ASRock B75 Pro3-M, 8 GB, 22 TB HDD, Ubuntu 16.04.5 LTS
Audio&Visual: Marantz NR-1602, Dali Opticon 6 5.1, SVS PB12-NSD, Sony KD-65A1
Reply

Logout Mark Read Team Forum Stats Members Help
HTPC: Switch Between Kodi, Plex Home Theater, or Other Media Center via Remote0