Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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/

About

Command-line tool that streams button presses from Apple IR remotes on OS X.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.