Announcement

Collapse
No announcement yet.

Timed door unlock Keypad application with the Direct Input Plugin

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Timed door unlock Keypad application with the Direct Input Plugin

    Here is an application for the Sequence feature of the Direct Input Connector.

    The Sequence feature of the plugin runs an HomeSeer event after a complex millisec timed sequence of actions has been recognized on the inputs.

    The secret code is very difficult to reproduce by anyone that may have been watching you entering your code, because only you know the special required timing between keys.


    1) I took an old alarm code panel with 12 normaly open contacts 0-9 * #



    2) I found a cheap USB gamepad with more than 12 contacts (the gamepad shown bellow has 17 inputs). I plugged the gamepad to the computer, reloaded the plugin configuration, and wrote down the numbering scheme for all buttons, so that I could wire buton 0 to key 0, button 1 to key 1.... etc.

    I took the gamepad electronic out, and wired the first 12 gamepad inputs to the keypad contacts.




    3) Here is an exemple of timed secret code programming that can be done easily through the plugin web configuration interface (Sequence tab).

    Example of step: Within 2 seconds, key 3 must be pressed for 500ms

    First parameter is the input: DirectInputDevice0/B3
    2nd parameter is the match condition: =1
    3rd parameter is how long the condition must remain valid: 500 ms
    4th parameter is the timeout. 2000 ms


    DoorUnlock sequence:

    *** KEY 3 must remain pressed more than one second, no more than 2 seconds (because it has to be released within 1 second)
    Step0=DirectInputDevice0/B3,=1,1000,0
    Step1=DirectInputDevice0/B3,=0,0,1000

    *** Then KEYS 4 & 6 must be pressed simultaneously (=within 100millisec) for at least 500 milliseconds, maximum 2 seconds

    Step2=DirectInputDevice0/B4,=1,500,0
    Step3=DirectInputDevice0/B6,=1,500,100
    Step4=DirectInputDevice0/B4,=0,0,2000
    Step5=DirectInputDevice0/B6,=0,0,100

    *** Then Within 2 seconds, KEY 5 must then be double clicked (fast 200ms double click)

    Step6=DirectInputDevice0/B5,=1,0,2000
    Step7=DirectInputDevice0/B5,=0,0,200
    Step8=DirectInputDevice0/B5,=1,0,200
    Step9=DirectInputDevice0/B5,=0,0,200

    *** At least, press # within 2 seconds

    Step10=DirectInputDevice0/B11,=1,0,2000


    After entering this sequence succesfully, the UnlockDoor HomeSeer event is run by the plugin, and the door unlocks

    The Debug mode of the plugin helps a lot to debug sequences, as each input change, and each matched or missed step are printed to the HomeSeer event log.

    Have fun,
    Last edited by stipus; November 29, 2007, 05:04 PM.
    --
    stipus
Working...
X