Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ******************************************************************************
- ** some Demo config files **
- ******************************************************************************
- /* eKey binding demo items */
- /* Some of this items may only receive a value if the correct mode is supported */
- /* Default mode is RARE but depending to your eKey product it can be changed via the ekey configuration tool */
- Number Action "At the last attempt acces was [MAP(ekeyaction.map):%d]" <lock> {ekey="action"}
- // gets the username directly from the ekey-packet. Thats the name that was specified on the ekey-controller - NOT available in every mode
- String Username "Last user that accessed the house was [%s]" <boy0> {ekey="username"}
- // gets the username by mapping the userid that comes from the packet to a defined username in the map-file - available in every mode
- Number UserID "Last user that accessed the house was [MAP(ekey_names.map):%d]" <boy0> {ekey="userid"}
- // gets the status of the user (enabled or disabled) as defined on the ekey-multi-controller - NOT available in every mode
- Number Userstatus "The status of the last user that entered was [MAP(ekey_userstatus.map):%d]" {ekey="userstatus"}
- // gets the serial number of the terminal and maps it to a more meaningful description - available in every mode
- String TerminalID "The last used terminal was the one at the [MAP(ekey_terminal.map):%s]" {ekey="terminalid"}
- // gets the very short name of the terminal that was defined on the ekey controller - NOT available in every mode
- String TerminalName "The short name of the last used terminal was: [%s]" {ekey="terminalname"}
- // gets name of the finger by mapping the integer value from the ekey-packet to a meaningful description in a map-file - available everywhere
- Number FingerID "Last used finger was the [MAP(ekey_finger.map):%d]" {ekey="fingerid"}
- // gets name of the key by mapping the integer value from the ekey-packet to a meaningful description in a map-file - available in MULTI only
- Number KeyID "Last defined key was: [MAP(ekey_key.map):%d]" {ekey="keyid"}
- // gets the description of the input that triggered this action by mapping its id to a meaningful value - NOT available in every mode
- Number InputID "The input that triggered the last action: [MAP(ekey_input.map):%d]" {ekey="inputid"}
- // gets the description of the relay that was triggered with this action by mapping its id to a meaningful value - NOT available in every mode
- Number RelayID "The relay that switched at the last action: [MAP(ekey_relay.map):%d]" {ekey="relayid"}
- // gets the mode of the packet (RARE, MULTI or HOME) by mapping its integer representation to one its string representation
- Number Mode "The packet mode was [MAP(ekey_mode.map):%d]" {ekey="mode"}
- ################################### eKey Binding ###########################################
- # ip address of the eKey udp converter (optional)
- ekey:ip=10.0.0.133
- # port number for the UDP packets
- ekey:port=51000
- # mode can be RARE, MULTI or HOME depending on what your system supports - RARE is default
- ekey:mode=HOME
- # the delimiter is also defined on the eKey udp converter - use the eKey configuration
- # software to determine which delimiter is used or to change it.
- # Not defining this is the same as " "
- ekey:delimiter=_
- /******************************** Demo Rule ***********************************************/
- rule LogUsr
- when
- Item Action received update
- then
- logInfo("ekey","ekey Action changed")
- if(Action.state==-1)
- say("unauthorized access!")
- else{
- logInfo("ekey","in lugusr else")
- var String name = transform("MAP","ekey_names.map",UserID.state.toString())
- var String finger = transform("MAP","ekey_finger.map",FingerID.state.toString())
- var String terminal = transform("MAP","ekey_terminal.map",TerminalID.state.toString())
- var String text = name + " put his " + finger + " finger over the " + terminal + " terminal. Hello "+name
- say(text)
- }
- end
- ******************************** Transform Files *******************************************
- ekey_action.map:
- 0=granted
- -1=rejected
- 1=timeoutA
- 2=timeoutB
- 3=inactive
- 4=alwaysuser
- 5=notcoupled
- 6=digitalinput
- ekey_finger.map:
- 11=leftlittle
- 12=leftring
- 13=leftmiddle
- 14=leftindex
- 15=leftthumb
- 21=rightthumb
- 22=rightindex
- 23=rightmiddle
- 24=rightring
- 25=rightlittle
- 30=unspecified
- ekey_input.map
- -1=none
- 1=Input One
- 2=Input Two
- 3=Input Three
- 4=Input Four
- ekey_key.map
- 1=Key One
- 2=Key Two
- 3=Key Three
- 4=Key Four
- ekey_mode.map
- 1=RARE
- 2=MULTI
- 3=HOME
- ekey_names.map
- -1=Unspecified
- 1=Paul
- 2=Tobi
- ekey_relay.map
- -1=none
- 1=Relay One
- 2=Relay Two
- 3=Relay Three
- 4=Relay Four
- ekey_terminal.map
- 80156839130911=frontdoor
- 80156839130914=backdoor
- ekey_userstatus.map
- -1=Undefined
- 1=Enabled
- 0=Disabled
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement