jrfuda
Active Member
Does anyone have a security keypad script? Here's what I'm looking for:
I want to use this with MainLobby, and want it to be flexible enough so that anyone with HomeSeer and MainLobby (or just HomeSeer) could change a few lines and use it for their setup. Here goes:
Keys are pressed either in a ML scene or a HS web page
Based on the combination entered, HomeSeer executes an event, script or just changes a device's value
For example, in my script I identify 4 codes (these and what their entry does can be user-defined)
1234
2345
3456
4567
These for codes each trigger something unique, any other code that does not match these returns an error
So, let's say in my example, I have these functions:
1234 Arm Home
2345 Arm Away
3456 Disarm
4567 Panic
So, when 1234 is entered, HS runs an event that Arms my system in home mode and so on for the other three.
Now to make it more interesting.
The script would also maintain two device statuses and values
One would be the security system state (armed, disarmed, etc.) along with a corresponding value to use in triggers
The other would hold the numbers pressed - so when I type in 1234, the value and status incrementally becomes 1234 (1 then 12 then 123 then 1234)
The number device would revert to to display "error" and some other device value (say 0) if no match is found, if a match is found, a few seconds after the script does its thing, it changes the device display to "ready" (so someone couldn't just walk up and see the last code you entered) and some other value that would be recognized as "ready."
Also, the script would have to kill itself after, say 25 seconds, if the correct sequence isn't entered and it would then revert to "ready" on the number device and the last value for the system state.
Any thoughts?
I want to use this with MainLobby, and want it to be flexible enough so that anyone with HomeSeer and MainLobby (or just HomeSeer) could change a few lines and use it for their setup. Here goes:
Keys are pressed either in a ML scene or a HS web page
Based on the combination entered, HomeSeer executes an event, script or just changes a device's value
For example, in my script I identify 4 codes (these and what their entry does can be user-defined)
1234
2345
3456
4567
These for codes each trigger something unique, any other code that does not match these returns an error
So, let's say in my example, I have these functions:
1234 Arm Home
2345 Arm Away
3456 Disarm
4567 Panic
So, when 1234 is entered, HS runs an event that Arms my system in home mode and so on for the other three.
Now to make it more interesting.
The script would also maintain two device statuses and values
One would be the security system state (armed, disarmed, etc.) along with a corresponding value to use in triggers
The other would hold the numbers pressed - so when I type in 1234, the value and status incrementally becomes 1234 (1 then 12 then 123 then 1234)
The number device would revert to to display "error" and some other device value (say 0) if no match is found, if a match is found, a few seconds after the script does its thing, it changes the device display to "ready" (so someone couldn't just walk up and see the last code you entered) and some other value that would be recognized as "ready."
Also, the script would have to kill itself after, say 25 seconds, if the correct sequence isn't entered and it would then revert to "ready" on the number device and the last value for the system state.
Any thoughts?