Created
July 29, 2012 01:21
-
-
Save thatguydan/3195599 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
{ | |
"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