Skip to content

Instantly share code, notes, and snippets.

@danlieberman
Last active December 21, 2015 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danlieberman/6246260 to your computer and use it in GitHub Desktop.
Save danlieberman/6246260 to your computer and use it in GitHub Desktop.
/**
* CameraTest
*
* Author: dan@smartthings.com
* Date: 2013-08-15
*/
// for the UI
metadata {
simulator {
// TODO: define status and reply messages here
}
tiles {
standardTile( "take", "device.image", ) {
state "default", label: "Take", action: "Image Capture.take"
}
carouselTile("cameraDetails", "device.image", width: 3, height: 2) { }
main( ["take"] )
details( ["take", "cameraDetails"] )
}
}
// parse events into attributes
def parse(String description) {
log.debug "Parsing '${description}'"
// TODO: handle 'image' attribute
}
// handle commands
def take() {
log.debug "Executing 'take'"
//sendEvent( name: "image", value: "http://tumbiri.com/me_b50f9ecb7cf941aa8b8220c8318b8165.jpg", isStateChange: true, displayed: true )
sendEvent(name: "image", value: "smartthings-smartsense-camera: me_b50f9ecb7cf941aa8b8220c8318b8165.jpg", isStateChange: true, displayed: true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment