I hereby claim:
- I am jonathanreiss15 on github.
- I am jonathanreiss (https://keybase.io/jonathanreiss) on keybase.
- I have a public key ASDTJtu6ugLT1QYsmv051JDvtwFwK8s4N7zu_RTu1HgIKwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Creates a new rule for the app specified in the header. By default, rules are enabled and can immediately be triggered.
Parameter | Required? | Type | Description |
---|---|---|---|
action | required | object | Describes what will happen once a rule is triggered |
geofence | required | object | Describes the geographic region to monitor |
name | required | string | Human-friendly name for the rule, rules for the same app cannot have the same name |
trigger | required | object | Describes what action triggers the rule |
// we made a jonny object here with some keys and values | |
var jonny = { | |
gender: "male", | |
age: 20, | |
favorite_restaurant: "Waffle House" | |
}; | |
// we can access the values in jonny like this --- prints male | |
console.log(jonny.gender) |
var Wemo = require('wemo-client'); | |
var wemo = new Wemo(); | |
wemo.discover(function(err, deviceInfo) { | |
console.log('Wemo Device Found: %j with %j', deviceInfo.friendlyName, deviceInfo.deviceId); | |
// Get the client for the found device | |
var client = wemo.client(deviceInfo); | |
// You definitely want to listen to error events (e.g. device went offline), |