Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Command-line tool that streams button presses from Apple IR remotes on OS X.
Objective-C JavaScript Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
iremotepipe.xcodeproj
src
.gitignore
LICENSE.txt
README.md
build.sh
iremote.js
iremotepipe
iremotepipe.png

README.md

iremotepipe

iremotepipe

A command-line tool for Mac OS X that interfaces with Apple Infrared remotes and outputs all button presses. Intercepts all IR commands while running. Kill the process to stop listening.

Also includes a simple node.js based server (iremote.js) which serves the detected events on a WebSocket.

Based on VLC's AppleRemote code, licensed under the GPL.

output format

Button presses are printed as JSON objects, separated by a newline.

e.g. Pressing "play"

{"type":"play","hold":false,"pressed":true}

e.g. Holding and releasing "right" (next)

{"type":"right","hold":true,"pressed":true}
{"type":"right","hold":true,"pressed":false}

Available keys are play, up, down, left, right, menu and ok (newer remotes only). Holding play will generate a sleep button press.

websocket control

You can receive commands over a WebSocket as JSON packets. For example, to control a Deck.js slideshow:

    var host = window.document.location.host.replace(/:.*/, '');
    var ws = new WebSocket('ws://' + host + ':8080');
    ws.onmessage = function (event) {
      var data = JSON.parse(event.data);
      var command = {
          up:    'prev',
          left:  'prev',
          right: 'next',
          down:  'next',
          play:  'next',
        }[data.type];

      if (command) {
        $.deck(command);
      }
    };

Steven Wittens - http://acko.net/

Something went wrong with that request. Please try again.