Skip to content

Instantly share code, notes, and snippets.

View bflorian's full-sized avatar

Bob Florian bflorian

View GitHub Profile
@bflorian
bflorian / mode-levels.groovy
Last active August 29, 2015 14:06
Mode Levels SmartApp
/**
* Mode Levels
*
* Copyright 2014 Bob Florian
*
* 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
*
@bflorian
bflorian / list-edit-example.groovy
Created November 18, 2014 14:03
SmartApp: List Edit Example
/**
* List Edit Example
*
* Copyright 2014 Bob Florian
*
* 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
*

Keybase proof

I hereby claim:

  • I am bflorian on github.
  • I am bflorian (https://keybase.io/bflorian) on keybase.
  • I have a public key whose fingerprint is 63BF 8C9F 0611 B500 DE41 D799 0CAF 074B 1520 093F

To claim this, I am signing this object:

@bflorian
bflorian / weather-alert-monitor.groovy
Last active December 17, 2015 00:29
Weather Alert Monitor -- SmartApp that listens to alert events from the SmartWeather Station Tile device, and sends alerts as push or SMS notifications.
/**
* Weather Alert Monitor
*
* Author: bob
*
* EXAMPLE NOT CURRENTLY PUBLISHED
*
* Date: 2013-04-30
*/
preferences {
/**
* Button Shield
*
* Author: bob
* Date: 2013-02-08
*/
metadata {
// simulator
simulator {
@bflorian
bflorian / smartapp-welcome-home-rest-call.groovy
Last active December 17, 2015 03:19
Welcome Home Rest Call, SmartApp that makes a web service call when a contact sensor opens.
/**
* Welcome Home
*
* Make a web service call when your front door opens,
*
* Author: SmartThings
*/
preferences {
section("When the door opens/closes...") {
input "contact1", "capability.contactSensor", title: "Where?"
@bflorian
bflorian / event-exporter.groovy
Last active December 17, 2015 12:49
Pushes events to a web service via JSON-encoded POST requests.
/**
* Event Exporter
*
* Author: SmartThings
*
* ---------------------+----------------+--------------------------+------------------------------------
* Device Type | Attribute Name | Commands | Attribute Values
* ---------------------+----------------+--------------------------+------------------------------------
* switches | switch | on, off | on, off
* motionSensors | motion | | active, inactive
/**
* Aeon Home Energy Meter
*
* Author: SmartThings
*
* Date: 2013-05-30
*/
metadata {
// simulator metadata
simulator {
/**
* Sample Web Services Application
*
*
* Author: SmartThings
*
* ---------------------+----------------+--------------------------+------------------------------------
* Device Type | Attribute Name | Commands | Attribute Values
* ---------------------+----------------+--------------------------+------------------------------------
* switches | switch | on, off | on, off
metadata {
// simulator metadata
simulator {
status "on": "command: 2003, payload: FF"
status "off": "command: 2003, payload: 00"
// reply messages
reply "2001FF,delay 100,2502": "command: 2503, payload: FF"
reply "200100,delay 100,2502": "command: 2503, payload: 00"
}