Created
September 10, 2013 12:19
-
-
Save aurman/6508608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | |
standardTile("shield", "device.shield", width: 2, height: 2) { | |
state "default", icon:"st.shields.shields.arduino", backgroundColor:"#ffffff" | |
} | |
main "shield" | |
details "shield" | |
} | |
} | |
// Parse incoming device messages to generate events | |
def parse(String description) { | |
def value = zigbee.parse(description)?.text | |
def name = value && value != "ping" ? "response" : null | |
def result = createEvent(name: name, value: value) | |
log.debug "Parse returned ${result?.descriptionText}" | |
return result | |
} | |
// Commands to device | |
// TBD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment