MSL Digital Solutions

What is it ?

The RemotePi Board is an intelligent infrared remote controlled power switch add-on board for the Raspberry Pi Rev. 2.0 (Model A or B, Model B+ is not supported). It is mainly intended to remote control and power off/on a mediacenter system. i.e OpenELEC, Raspbmc, XBian, RasPlex, Raspbian.
It solves two problems at the same time :

  1. Enabling an infrared remote to be used with the mediacenter, 100% compatible with standard simple GPIO IR receiver.
  2. Letting you switch the power of the Raspberry Pi on and off with the remote.
You do not even have to buy an additional remote !
RemotePi Board, a remote controlled power switch add-on board, mounted on Raspberry Pi
RemotePi Board, a remote controlled power switch add-on board, mounted on Raspberry Pi
The board allows you to use one button of your choice from almost any existing infrared remote control (i.e your existing Blu-Ray, DVD, TV, etc. remote) to switch the power to the RPi on and off. When switching off the power is not immediately cut off, but the RPi is notified of the intent to shut down the power and will initiate a clean system shut-down to avoid data corruption.
Any received infrared signal is forwarded to the RPi, so it can be used to remote control the mediacenter as well (using LIRC  ). The popular XBMC based Mediacenter distributions all support this already.
This add-on board piggy backs on top of the Raspberry Pi and should fit into most cases (after some case modifications).

How does it work ?

Instead of feeding the power directly into the RPI the power is connected to the RemotePi Board. The board contains a microcontroller managing the power line to the RPi, which is switched on and off according to the command received by an infrared remote control (or by a hardware switch on top of the board). The type and button of the infrared remote control you want to use for this is ‘learned’ by the microcontroller software. For this you enter a learning mode, then point your existing remote control towards the infrared receiver on the board and then press the button you would like to use in the future to power cycle your RPi. This process can be repeated anytime to use a different remote or button.

Watch the video to learn more...


Use the RemotePi Board ...

  • With any old spare remote control that you may already have but do not use anymore.
  • With an existing remote control that you use, for example your Blu-Ray remote. Then use an unused button on the remote (for example a karaoke or recording button) as the RPi power cycle button. In this case if the Blu-Ray player is off you use it for the RPi, when you switch off the RPi, you use it for your Blu-Ray player.
  • With an existing media center remote control that you may already own and use for your RPi mediacenter installation.
  • With a Logitech Harmony or other universal remotes.
  • With a new replacement remote that you can order from this site.

Advantages

  • Make your mediacenter setup more user friendly for technically less advanced members of your family.
  • Power saving ! Although the RPi does not draw a lot of power it is always desirable to switch off devices when they are not in use. The RemotePi board reduces the standby current to a few mA needed for the microcontroller and the infrared receiver.
  • No wearing out of the RPI micro USB socket due to constant plug in / unplug.
  • Clean RPi OS shutdowns to avoid data corruption.
  • Regular rebooting of the RPi to clear memory leaks and do automatic updates.
  • Does not occupy a USB port.
  • 100% compatible with the simple GPIO IR receiverIf you have this set up, you can replace the IR receiver with the RemotePi Board and re-use your configuration without changes.
  • Very easy to install, fully assembled, no soldering required.
  • Piggy backs on the Raspberry Pi, no loose cables.
  • Raspberry Pi does not have to be modified in any way. 

The hardware

The board contains a polyfuse and a transient voltage suppression diode (TVR, similar to the power supply circuit of the RPi itself), to protect against overcurrent and overvoltage. A low RDS-on MOSFET is used to feed the power to the RPi via the GPIO connector. The infrared receiver used ( TSOP38238 ) has a long range (rated typ. 45 meters / 49 yrds from the datasheet). Power consumption during standby is less than 10 mA.

Every single board is fully tested before it is shipped.

The RemotePi Board uses the following pins of the GPIO header, the remaining pins are not connected :
Pin 1+ 3.3 V
Pin 2, 4+ 5V
Pin 6, 9, 14, 20, 25GND
Pin 12GPIO 18 for the IR receiver
Pin 15GPIO 22 for the shutdown signal 

Which infrared remotes work with the board ?

The board uses the excellent IRMP library (in German language) for the detection of infrared remote commands. IRMP decodes the signal and identifies which brand / protocol / variant is used, it does not just record and play back the raw data stream from the IR receiver. This results in a perfectly reliable IR command recognition of a learned-in command, because the software can cope with slight timing variations of the infrared signal.

About 90% of the commonly used remotes should work with the RemotePi Board :

  • LOGITECH HARMONY and other universal remotes (these remotes can be configured for one of the supported IR protocols below. If you can still choose the device you configure on the Harmony we recommend choosing a Philips DVD player or a Microsoft MCE remote for your Raspberry Pi mediacenter, these use the RC5/RC6 IR protocol)
  • SIRCS (Sony)
  • NEC, NEC16, NEC42 (NEC, APPLE, Pioneer, JVC, Toshiba, most No Name brands)
  • SAMSUNG
  • MATSUSHITA
  • KASEIKYO (Panasonic, Technics, Denon and other  japanese brands, which are members of the  ‘Japan's Association for Electric Home Application’)
  • DENON (DENON, Sharp) 
  • RC5, RC6 & RC6A (Philips and other European brands)
  • JVC
  • IR60 (SDA2008) (many European brands)
  • GRUNDIG
  • RECS80 (SAA3004) (Philips, Nokia, Thomson, Nordmende, Telefunken, Saba)
  • RECS80EXT (SAA3008) (Philips, Nokia, Thomson, Nordmende, Telefunken, Saba)
If you have a DVD/Blu-Ray/TV remote from the above brands, or a No-Name brand, it will most certainly work. Another good indication is, if your remote already works with your RPi mediacenter using LIRC, then it will most certainly work with the board as well.
If you want to be absolutely sure you can order a low-cost replacement remote control from this site, which has been tested and confirmed to work with the board.

Some of the remotes we have tested that work with the RemotePi Board

IR Remotes tested with the RemotePi Board, a remote controlled power switch add-on board for the Raspberry Pi

Which Infrared remotes do NOT work with the board ?

Remote controls for Bose, Kathrein, Nubert, Bang & Olufsen, Siemens Gigaset, Nikon, Lego, Thomson, Ruwido will not work, these protocols are supported by the IRMP library, but have been disabled due to program space limitations of the microcontroller.

Installation 

  • Install the shutdown script on your mediacenter installation. To do this choose the OS you are using from the options below (OpenElec, Raspbmc, XBian, ...) and follow the instructions.
  • Switch off and disconnect the power plug from the RPi.
  • Mount the supplied screw, washers and nut on the RPi’s existing mounting hole near the front.
  • Plug in the RemotePi board, make sure the GPIO connectors line up.
  • Adjust the nut under the RemotePi board until the board is levelled.
  • Secure the RemotePi board with another nut from the top.

  • Connect power to the RemotePi board’s Micro USB connector, do not use the Raspberry Pi power Micro USB connector. If you connect the power by accident to the Raspberry Pi connector, you will not damage anything, but the power control function of the RemotePi will not work.
  • You will see a short red/green blink of the RemotePi’s LED to indicate the board is working.
  • If you would like to use your existing RPi case, you will need to modify it, so that the micro USB power connector and the button on top of the RemotePi is accessible, and the LED and infrared receiver are visible from outside.
  • If you want to use your own existing remote to control your mediacenter as well, then you will have to enable LIRC and create your own lircd.conf file. (If you use our remote we have already created the file for you and you only need to install it). This file tells the OS how to understand the keys on your remote. You can use the configuration guide on the remote page as a guideline, but you will still need to figure out the lircd.conf contents for your own remote as this file is different for every remote model. There are various tutorials on the web on how to do this, basically you either find a ready-made lircd.conf file or you run a program on the RPi which learns the key functions and creates a lircd.conf file for you. 
    Please Note : If you create your own lircd.conf, please do not include the KEY_POWER key in the list. The power is handled by the RemotePi Board.

Using the RemotePi Board

  • Choose the button on the remote you want to use to switch your RPi on and off in the future, then press the hardware button on top of the RemotePi Board for about 15 seconds until you see the LED blinking green and red. Now you have about 20 seconds time to aim the remote towards the RemotePi Board’s infrared receiver and press the button you want to use for controlling the power of your RPi. You will see the green LED flashing when the button was learned. If no infrared command is learned within 20 seconds you see the red LED flash and the learning mode is exited without changing the current configuration.The learned configuration is remembered (i.e not lost), even when the power is disconnected from the RemotePi Board.
    NEW (for all boards shipped after 14 April 2014) : You can learn in two different commands from your remote, one for power on and one for power off. This can be useful, if you are using  a Logitech Harmony universal remote, these can be configured to switch on or off all your devices at once. By using two different commands for power on and power off the remote can determine the power status of the RemotePi Board. To learn in two different commands, after entering learning mode press the remote button you want to use for power on first, then you see one short green LED flash. Then press the second button you want to use for power off. You see two short green LED flashes. Of course you can learn in the same remote button for on and off, in case you want to use only one button to toggle power.
  • A short press of the button on top of the RemotePi Board power toggles the RPi in the same way the learned button on the remote does. While powering up, the LED flashes green and while powering down it flashes red for about a minute, during this time you cannot issue another power toggle request. This is to prevent cutting the power during startup / shutdown.

  • Here is how you know that everything works correctly : When you switch off the power of the RPI using either the hardware button on top of the RemotePi Board or the remote, you will see your mediacenter shutting down on the TV within the few seconds. Then the power is cut about 1 minute (or faster) later. If the OS does not shut down first before the power is cut, then you need to double check your script installation. 

Shutdown scripts

You will need to install one of the following shutdown scripts, these handle the power down request from the RemotePi Board and shut down the OS before the power is actually cut. Choose the shutdown script according to the OS you are using. To connect to the Raspberry Pi for the steps below you can use PuTTY under Windows or, if you use an Apple Mac, the built in Terminal program.

 

OpenElec (tested with OpenElec 3.2.2, 3.2.3, 3.2.4, 4.0.3, 4.0.6)

    • Note : In OpenElec it is currently NOT safe to just call the poweroff command from the script. This would corrupt your SD card eventually. The script below mimics the proper shutdown sequence which is executed when you choose shutdown from the GUI.
    • Default user name is root, password openelec
    • Key in :
      cd .config
      nano autostart.sh

    • Copy and paste the following into the nano editor window. If there is already something in the file, just add the following as the last lines
      #!/bin/bash
      (/storage/.config/irswitch.sh)&
    • Press ctrl+x to exit the editor, y to confirm, enter to save the file
    • Key in 
      chmod +x autostart.sh
      nano irswitch.sh
    • Copy and paste the following text into the editor window
      #!/bin/bash
      # prevent restarting XBMC at shutdown
      LOCKDIR="/var/lock/"
      LOCKFILE="xbmc.disabled"
      # this is the GPIO pin receiving the shut-down signal
      GPIOpin1=22
      # functions
        add_omit_pids() {
          omit_pids="$omit_pids -o $1" 
        }
        safe_shutdown () {
          touch "$LOCKDIR/$LOCKFILE"
          add_omit_pids $(pidof connmand)
          add_omit_pids $(pidof dbus-daemon)
          killall5 -15 $omit_pids
          for seq in `seq 1 10` ; do
            usleep 500000
            clear > /dev/tty1
            killall5 -18 $omit_pids || break
          done
          sync
          umount -a >/dev/null 2>&1
          poweroff -f
        }

      echo "$GPIOpin1" > /sys/class/gpio/export
      echo "in" > /sys/class/gpio/gpio$GPIOpin1/direction
      while true; do
       sleep 1
       power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
       if [ $power != 0 ]; then
        sleep 4
        power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
        if [ $power == 0 ]; then
          echo "out" > /sys/class/gpio/gpio$GPIOpin1/direction
          echo "1" > /sys/class/gpio/gpio$GPIOpin1/value
        fi
        safe_shutdown
       fi
      done
    • Press ctrl+x to exit, y to confirm, enter to save the file
    • Key in
      chmod +x irswitch.sh
    • Reboot from the OpenElec GUI (do NOT use reboot or poweroff in the ssh session as this may corrupt your SD card).
    • After reboot you can use the RemotePi Board to power cycle OpenElec

Raspbmc (tested with Raspbmc Built 20130925)

    • Default user name is pi, password raspberry
    • Key in :
      cd /etc
      sudo nano rc.local
    • Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
      /etc/irswitch.sh
    • Press ctrl+x to exit the editor, y to confirm, enter to save the file
    • Key in 
      sudo nano irswitch.sh
    • Copy and paste the following text into the editor window
      #!/bin/bash
      # this is the GPIO pin receiving the shut-down signal
      GPIOpin1=22
      echo "$GPIOpin1" > /sys/class/gpio/export
      echo "in" > /sys/class/gpio/gpio$GPIOpin1/direction
      while true; do
       sleep 1
       power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
       if [ $power != 0 ]; then
        sudo initctl stop xbmc
        sleep 4
        power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
        if [ $power == 0 ]; then
          echo "out" > /sys/class/gpio/gpio$GPIOpin1/direction
          echo "1" > /sys/class/gpio/gpio$GPIOpin1/value
        fi
        sudo shutdown -h now
       fi
      done
    • Press ctrl+x to exit, y to confirm, enter to save the file
    • Key in
      sudo chmod +x irswitch.sh
      sudo shutdown –r now
    • After reboot you can use the RemotePi Board to power cycle Raspbmc 

XBian (tested with XBian 1.0 Beta 2)

    • Default user name is xbian, password raspberry
    • Key in :
      cd /etc
      sudo nano rc.local
    • Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
      (/etc/irswitch.sh)&
    • Press ctrl+x to exit the editor, y to confirm, enter to save the file
    • Key in 
      sudo nano irswitch.sh
    • Copy and paste the following text into the editor window
      #!/bin/bash
      # this is the GPIO pin receiving the shut-down signal
      GPIOpin1=22
      echo "$GPIOpin1" > /sys/class/gpio/export
      echo "in" > /sys/class/gpio/gpio$GPIOpin1/direction
      while true; do
       sleep 1
       power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
       if [ $power != 0 ]; then
        sleep 4
        power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
        if [ $power == 0 ]; then
          echo "out" > /sys/class/gpio/gpio$GPIOpin1/direction
          echo "1" > /sys/class/gpio/gpio$GPIOpin1/value
        fi
        sudo poweroff
       fi
      done
    • Press ctrl+x to exit, y to confirm, enter to save the file
    • Key in
      sudo chmod +x irswitch.sh
      sudo reboot
    • After reboot you can use the RemotePi Board to power cycle XBian 

RasPlex (tested with RasPlex 0.3.1)

    • Default user name is root, password rasplex
    • The rest of the configuration for RasPlex is the same as for OpenElec, see above. (RasPlex is based on OpenElec)

Raspbian (tested with Raspbian 3.10.25)

    • Default user name is pi, password raspberry
    • The rest of the configuration for Raspbian is the same as for XBian, see above.

RetroPie (tested with RetroPie 2.2)

    • Default user name is pi, password raspberry
    • The rest of the configuration for RetroPie is the same as for XBian, see above.

Requirements

In order to use the RemotePi Board you need...
  • A Raspberry Pi Revision 2.0 Model A or B. The RemotePi Board was not yet tested and is probably not compatible with the new Raspberry Pi B+. The easiest way to find out if you have a Raspberry Pi which will work is to check if there are mounting holes as in this picture : 

    If you see these mounting holes, then your Raspberry Pi will work with the Remote Pi Board.
    We can confirm from customer feedback that the RemotePi Board even works with the older Raspberry Pi Rev. 1.0 Models without the mounting holes. In this case you cannot use the provided screw to mount he RemotePi Board though, you could use a piece of plastic as a spacer.
  • An existing RPi power supply with the standard micro USB plug.
  • An existing infrared remote control (or order one from this site).
  • You will need a bit of skill to create your own lircd.conf file, if you use your existing remote and want to control the mediacenter with it (if you use your remote only to power the RPi on and off then this is not necessary. If you order our remote we supply the lircd.conf file, so you do not need to create it by yourself) This file tells the OS how to understand the keys on your remote and it is different for every IR remote model.
  • As the board occupies the GPIO connector and covers the DSI (Display Serial Interface) connector of the RPi, these connectors cannot be used for other hardware when the board is connected.
  • Either no case or a modified case, preferably transparent (for the dual-color LED and the IR receiver). The case shown in the picture below is called MC-RP001-CLR and is widely available at Amazon and many other shopping sites. For this case only two modifications are necessary, one is to drill a hole for the pushbutton, and the other one is to remove a bit of the plastic to make the RemotePi Board power connector accessible.
    RemotePi Board in Raspberry Pi case
    You can now as well order a clear acrylic case from our site, which was designed to host the RemotePi Board and therefore requires no modifications.
    RemotePi Board, a remote controlled power switch add-on board, mounted on Raspberry Pi inside acrylic case
  • An OS that can be shut down by a GPIO signal. Currently we provide shutdown scripts for OpenElec, Raspbmc, XBian, RasPlex, Raspbian (see above), we will add more in the future. You can still use other OS with the RemotePi Board, but will have to adapt the shutdown script.

If you have any questions or suggestions, please Contact Us

Back to the product page

 

This page was last updated 23-July-2014

What's New

NEW ... Acrylic Case

We now stock a clear acrylic case as well that perfectly fits your Raspberry Pi and the RemotePi Board, no case modifications necessary !

RemotePi Board distributor in Germany

If you would like to order the RemotePi Board from a distributor located in Germany, you can now find it at Insaneware.de.

Raspbian now supported by the RemotePi Board

Raspbian is now officially supported by the RemotePi Board ! This adds another distro to the already supported ones : OpenElec, Raspbmc, XBian, RasPlex Please follow the instructions of the 'More...

RemotePi Board Review

Dylan Durdle has done an independent review of the RemotePi Board on his blog, you can read the main RemotePi Board review here and a general page about different Raspberry Pi...

XBian now supported

XBian is now officially supported by the RemotePi Board and the Remote in addition to OpenElec and Raspbmc ! Please follow the instructions of the 'More Information' pages to get...