Page 1 of 1

Keypad with Tablet

PostPosted: Thu Feb 06, 2014 6:40 am
by robertgerman
Hi Guys,
I want to share something with you that took me a little thinking to get together.

My knowledge of AppleScript and such is limited to Google searches and trial and error. I have been working on a home security system based on Indigo with mostly Fibaro door/windows sensors. To activate the alarm I use buttons on our smartphones (with Indigo Control pages) witch not always is very user friendly. It’s ok when activating the alarm system when leaving, but is a bit of a struggle when deactivating it, especially when you have stuff in your hands coming home.

My idea was to use a Z-Wave keypad mounted at the front door to activate and deactivate the alarm system. They are a little pricy and would be limited to activate/deactivate the alarm and not much more. So instead of a keypad i thought of an iPad (or other tablet) and mount it at the front door to use for more than just the alarm system. I searched for a tablet, and chose an Android device so I can run Tasker and SSH commands to do actions in Indigo from the home screen, not only from the web based control pages. I build a keypad for the tablet using:

- Variables for all numbers (0-9) and a CodeValidation variable
- Actions groups for all numbers (to modify variables and set them to - no value- after 1 second so I can detect changes when entering the key code the next time)
- Triggers based on variables

To validate the entered code I use triggers. Lets say the correct code is 1 2 3 4. When pushing 1, I execute a action group that changes the variable to 1, and back to -no value- after 1 second. When variable 1 changes it also triggers an action to set the variable ”CodeValidation” to ”OK1”. When pushing key 2, the trigger will change variable ”CodeValidation” to ”OK2” if you first entered number 1. This is done by having trigger for ”OK2” looking at the variable ”CodeValidation” to see if it has the value ”OK1”, if not, it’ll not change ”CodeValidation” to ”OK2” if yes, it’ll get the value ”OK2”. Same happens when hitting button 3 and 4 and finally, when the correct sequence is put in, CodeValidation is set to ”Code OK” (after you have entered number 4, it’ll set the value of ”CodeValidation” to ”Code OK”

I was worried that some lag in the internet connection would make this unreliable, but so long it has been working flawlessly. If you have more than 1 code to get to ”Code OK” that shares some of the numbers in code 1, you would need to have another ”CodeValidation” variable and a second trigger loop.

It took roughly 1 hour to get this to work. Now the tablet at the front door will work both as a control unit for the house and also display calendar entries and such besides the Indigo control buttons on the home screen.

Let me know if you have any suggestions on how to make this even better (without too much Python or AppleScripting)

All the best!
Rob

Re: Keypad with Tablet

PostPosted: Thu Feb 06, 2014 11:44 am
by jay (support)
Nice job! Thanks for sharing.

Re: Keypad with Tablet

PostPosted: Thu Feb 06, 2014 11:51 am
by roussell
I had done something similar a couple of years back - linky here for future searchers:

viewtopic.php?f=3&t=8030quote&f=3

Terry

Re: Keypad with Tablet

PostPosted: Fri Feb 07, 2014 2:24 pm
by robertgerman
Ah, cool! Thanks for sharing!