I hereby claim:
- I am mager on github.
- I am mager (https://keybase.io/mager) on keybase.
- I have a public key whose fingerprint is 9D0C D280 C989 C4D0 CF63 4432 9704 0AAE 8D68 330A
To claim this, I am signing this object:
/** | |
* Example: Control a switch with a contact sensor | |
* | |
* Copyright 2014 Andrew Mager | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
/** | |
* My First SmartApp | |
* | |
* Copyright 2015 Andrew Mager | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
I hereby claim:
To claim this, I am signing this object:
/** | |
* Example: How to make API calls from a SmartApp | |
* | |
* Copyright 2015 SmartThings Hack | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
/** | |
* Silent Safety | |
* | |
* Copyright 2015 Diana Laboy-Rush | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
<?php | |
$url = 'https://graph.api.smartthings.com/api/smartapps/installations/dc20d3c1-7573-4fe2-9e13-ac095c4eb20e/hue'; | |
//$data = array('text' => 'color=orange'); | |
$body = $_REQUEST['Body']; | |
$data = "{'value':'$body'}"; | |
// use key 'http' even if you send the request to https://... | |
$options = array( | |
'http' => array( |
<?php | |
$url = '<YOUR SMARTAPP ENDPOINT>'; | |
$body = $_REQUEST['Body']; | |
$data = "{'value':'$body'}"; | |
$options = array( | |
'http' => array( | |
'header' => "Authorization: Bearer <YOUR SMARTAPP TOKEN>\nContent-type: application/json", | |
'method' => 'PUT', |
preferences { | |
section("Title") { | |
input "player", "capability.musicPlayer", title: "music player", required: true, multiple: false | |
input "frontDoor", "capability.contactSensor", title: "front door", required: true, multiple: false | |
} | |
} | |
def installed() { | |
subscribe(frontDoor, "contact", myHandler) | |
} |
/** | |
* Smart Alarm is a multi-zone virtual alarm panel, featuring customizable | |
* security zones. Setting of an alarm can activate sirens, turn on light | |
* switches, push notification and text message. Alarm is armed and disarmed | |
* simply by setting SmartThings location 'mode'. | |
* | |
* Please visit <http://statusbits.github.io/smartalarm/> for more | |
* information. | |
* | |
* Version 2.4.3 (7/7/2015) |
{ | |
"status": "dropoff", | |
"dropoff": { | |
"phone_number": "646-234-2271", | |
"name": "Mager's House", | |
"notes": "", | |
"detailed_address": { | |
"city": "New York City", | |
"country": "US", | |
"street_address_1": "498 Central Park N", |