Skip to content

Instantly share code, notes, and snippets.

View wireless-3-way.groovy
/**
* App Name: Wireless 3-Way
*
* Author: chrisb
* Date: 2013-07-16
*
* This app "groups" a set of switches together so that if any one is turned on
* or off, they all will go on or off. This allows them to act as three-way
* without needing wiring between the switches.
*
View gist:5fb2fa9ea06117ebcbaa
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug PresenceSensors/subscriptions
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug contactSensors/subscriptions
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug motionSensors Deleted
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug motionSensors added
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug switches added
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug PresenceSensors/subscriptions
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug contactSensors/subscriptions
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug motionSensors Deleted
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug motionSensors added
2e940b50-3f76-432d-bad1-77730c40e01c 10:28:55 AM: debug switches added
@aurman
aurman / exhalr.groovy
Created Sep 18, 2014
Exhalr Device Type Code
View exhalr.groovy
metadata {
// Automatically generated. Make future change here.
definition (name: "Exhalr", namespace: "smartthings", author: "SmartThings") {
capability "Actuator"
capability "Switch"
capability "Sensor"
}
// Simulator metadata
simulator {
View streaming.js
var http = require('http');
var https = require('https');
var path = require('path');
var express = require('express');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var passport = require('passport');
var NestStrategy = require('passport-nest').Strategy;
var session = require('express-session');
View gist:6386130
def switchMode{
def map = [:]
switch (cmd.mode) {
case zigbee.smartShield(text: "F,0").format()
break
case zigbee.smartShield(text: "F,1").format()
break
case zigbee.smartShield(text: "F,2").format()
break
}
View Mailbox.groovy
/**
* Garage Door Monitor
*
* Author: SmartThings
*/
preferences {
section("When the garage door is open...") {
input "multisensor", "capability.threeAxis", title: "Which?"
}
section("For too long...") {
View alarm-capability.groovy
metadata {
simulator {
// reply messages
["strobe","siren","both","off"].each {
reply "$it": "alarm:$it"
}
}
tiles {
standardTile("alarm", "device.alarm", width: 2, height: 2) {
View arduino-thingshield.groovy
metadata {
// Simulator metadata
simulator {
// status messages
status "ping": "catchall: 0104 0000 01 01 0040 00 6A67 00 00 0000 0A 00 0A70696E67"
status "hello": "catchall: 0104 0000 01 01 0040 00 0A21 00 00 0000 0A 00 0A48656c6c6f20576f726c6421"
}
// UI tile definitions
tiles {
View momentary-button-tile.groovy
/**
* Momentary Button Tile
*
* Author: SmartThings
*
* Date: 2013-05-01
*/
metadata {
// simulator metadata
simulator {
View smartsense-garage-door-sensor-button.groovy
/**
* SmartSense Garage Door Sensor Button
*
* Author: SmartThings
* Date: 2013-03-09
*/
metadata {
simulator {
status "acceleration": "acceleration: 1, rssi: 0, lqi: 0"
status "no acceleration": "acceleration: 0, rssi: 0, lqi: 0"