Monthly Archives: March 2015

MCE Remote: getting lazier by the day

Now that I’ve set up Plex on my server and install Plex Home Theater on my PC, I can play movies on my PC and watch them on the TV in the living room (via SPDIF & HDMI cables).

Trouble is Plex Home Theater is designed to be controled by a remote and mice are not supported.

I’ve therefore purchased an MCE remote from Amazon. The beauty of this remote is that 1) it’s ridiculously cheap (the price was £6.95 when I bought it) and 2) it’s natively supported by Windows, no need for bloat software or drivers.

Emprex 3009ARF Wireless MCE Remote Control

Emprex 3009ARF Wireless MCE Remote Control

1 tiny annoyance though, the green Windows button is set up to launch Windows Media Center and there doesn’t appear to be a setting to change this.

MCE Windows Button

MCE Windows Button

After a bit of digging online, I found out that the green button launches C:\Windows\ehome\eshell.exe

So it should then be fairly easy to replace this file and put my own script instead right?

Wrong! For some reason Windows has this file set up in  such a way that you cannot delete or rename it. This is the way to go round the limitation:

  1. Navigate to C:\Windows\ehome\
  2. Right-click on eshell.exe > Properties
  3. Click on the Security tab
  4. By default, TrustedInstaller has all rights and you cannot change the rights for other groups / users

    eshell Properties

    eshell Properties

  5. Click on Advanced > Owner tab > Edit.

    eshell Owner

    eshell Owner

  6. Select the new Owner (your account) and Accept > OK
  7. Now select your user and enable Full Control

You can now rename eshell.exe and use a different program instead.

I have used AutoHotKey to write a script which would launch Plex Home Theater instead of Windows Media Center:


Now why stop there?

I would still need to get to the PC and manually set the default audio output to SPDIF, and I have to use my HomeEasy remote to activate a Movies mood scene in DomotiGa (I’ve synced a button with my RFXTrx433 so DomotiGa recognises the remote as a device).

So I created another AuthoHotKey script which constantly runs in the background and adjusts the default audio output depending on whether Plex Home Theater is running or not. And it also executes a Python script which will send a command via JSON-RPC to update a device on  DomotiGa.

Here are the scripts:


Now I simply need to sit on the sofa and press the green button, and the following happens “automatically”:

  • Plex Home Theater starts
  • Default audio set to SPDIF on my Windows PC so the sound goes to the amplifier
  • Speakers connected to the server  announce “Mood Scene: Movies, Activated
  • The lights in the kitchen and living room turn off
  • A red light for the right ambiance gets turned on

Isn’t life beautiful? 🙂

[Edit – 20/05/2016] This doesn’t seem to work under Windows 10. MCE is technically dead under Windows 10, yet I can still start MCE manually and the remove appears to still send some of the commands, only nothing happens when pressing the MCE button. I’ll share more once I have an update

Tracking free space on the ZFS Drive

Now that I’ve set up 2 drives on a RAID like configuration using ZFS, I want to see how much space I have left on the drive.

Because I’m using ZFS, it is not recognised as a standard drive in Ubuntu and as such it’s not possible to use standard Ubuntu utilities to keep track of disk usage.

You can use the following command to check the status of your ZFS pool:

However this is somewhat a manual action which requires opening a terminal. Since I use DomotiGa extensively, I wanted to display the free space on the ZFS device (already displayed thanks to the HDDTemp plugin).

I ended up with this python script:

I then set up an even in DomotiGa which launches bash script every 5 min:

Replace password with your own sudo password of course.


ZFS Disk Space

ZFS Disk Space