Last active
August 29, 2016 09:01
-
-
Save gr2m/5465679 to your computer and use it in GitHub Desktop.
Imagine you could control other devices with a simple JavaScript API, right from your browser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ask the coffee machine at IP 192.168.2.2 to do its job | |
device('192.168.2.2') | |
.do( 'coffee' ) | |
.then( wakeMeUpCallback ) | |
// turn all lights on | |
device.findAll('light').do('turnOn') |
Typo police: "to do it's job" should be "to do its job".
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
Checkout http://ninjablocks.com/ 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: