Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Imagine you could control other devices with a simple JavaScript API, right from your browser.
// Ask the coffee machine at IP to do its job
.do( 'coffee' )
.then( wakeMeUpCallback )
// turn all lights on

This comment has been minimized.

Copy link

@jpillora jpillora commented May 13, 2013

Checkout it's running Node and exposes webhooks to it's connected devices. Right now, you could definitely make it turn on your coffee machine, though it's probably going to need some arduino smarts to notify you when it's done. Just set your alarm for 5mins after the coffee is scheduled :P

For example, here's the temperature data (in Celsius) for my house recently:

  "result": 1,
  "error": null,
  "id": 0,
  "data": [{
    "t": "2013-05-06T12:00:00.000Z",
    "v": 22.077272727272728
  }, {
    "t": "2013-05-06T13:00:00.000Z",
    "v": 21.83124999999998
  }, {
    "t": "2013-05-06T14:00:00.000Z",
    "v": 21.767647058823524
  }, {
    "t": "2013-05-06T15:00:00.000Z",
    "v": 21.656521739130405
  }, {
    "t": "2013-05-06T16:00:00.000Z",
    "v": 21.374193548387094
  }, {
    "t": "2013-05-06T17:00:00.000Z",
    "v": 20.998823529411773
  }, {
    "t": "2013-05-06T18:00:00.000Z",
    "v": 20.626666666666683
  }, {
    "t": "2013-05-06T19:00:00.000Z",
    "v": 20.431168831168836
  }, {
    "t": "2013-05-06T20:00:00.000Z",
    "v": 20.22666666666667

This comment has been minimized.

Copy link

@EvanHahn EvanHahn commented May 13, 2013

Typo police: "to do it's job" should be "to do its job".


This comment has been minimized.

Copy link
Owner Author

@gr2m gr2m commented May 15, 2013

@EvanHahn fixed, cheers!


this is awesome! I want an API for all the things in my house! Let's make some dream code for that, would make a cool example


This comment has been minimized.

Copy link

@brandondrew brandondrew commented Oct 13, 2014

More typo police: "it's connected devices" should be "its connected devices".

"it's connected devices" == "it is connected devices"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment