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 hidden or 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') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More typo police: "it's connected devices" should be "its connected devices".
"it's connected devices" == "it is connected devices"