Skip to content

Instantly share code, notes, and snippets.

@thatguydan
Created July 29, 2012 01:21
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 thatguydan/3195599 to your computer and use it in GitHub Desktop.
Save thatguydan/3195599 to your computer and use it in GitHub Desktop.
{
"rule": {
"shortName": "Nerf Gun Shooter",
"preconditions": [
{
"handler": "ninjaChange", // When we receive the trip-wire string from the RF module
"params": {
"guid": "RFID_DEVICE_GUID",
"to": "10101000101000001010101"
}
}
],
"actions": [
{
"handler": "ninjaSendCommand", // Send the command to close the relay
"params": {
"guid": "RELAY_DEVICE_GUID",
"da": "0"
}
},
{
"handler": "delay", // Delay 3 seconds before we reset the relay
"params": {
"guid": "N/A",
"delayLength": 3000
}
},
{
"handler": "ninjaSendCommand", // Reset the relay
"params": {
"guid": "RELAY_DEVICE_GUID",
"da": "1"
}
},
{
"handler": "getNinjaSnapshot", // Snap a shot of the unlucky victim
"params": {
"guid": "CAMERA_DEVICE_GUID"
}
},
{
"handler": "sendToDropbox", // Send it to dropbox
"params": {
"guid": "DROPBOX_DEVICE_GUID"
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment