Guest User

eKey binding demo config

a guest
Jan 22nd, 2014
1,246
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. ******************************************************************************
  4. ** some Demo config files **
  5. ******************************************************************************
  6.  
  7. /* eKey binding demo items */
  8. /* Some of this items may only receive a value if the correct mode is supported */
  9. /* Default mode is RARE but depending to your eKey product it can be changed via the ekey configuration tool */
  10. Number Action "At the last attempt acces was [MAP(ekeyaction.map):%d]" <lock> {ekey="action"}
  11. // gets the username directly from the ekey-packet. Thats the name that was specified on the ekey-controller - NOT available in every mode
  12. String Username "Last user that accessed the house was [%s]" <boy0> {ekey="username"}
  13. // gets the username by mapping the userid that comes from the packet to a defined username in the map-file - available in every mode
  14. Number UserID "Last user that accessed the house was [MAP(ekey_names.map):%d]" <boy0> {ekey="userid"}
  15. // gets the status of the user (enabled or disabled) as defined on the ekey-multi-controller - NOT available in every mode
  16. Number Userstatus "The status of the last user that entered was [MAP(ekey_userstatus.map):%d]" {ekey="userstatus"}
  17. // gets the serial number of the terminal and maps it to a more meaningful description - available in every mode
  18. String TerminalID "The last used terminal was the one at the [MAP(ekey_terminal.map):%s]" {ekey="terminalid"}
  19. // gets the very short name of the terminal that was defined on the ekey controller - NOT available in every mode
  20. String TerminalName "The short name of the last used terminal was: [%s]" {ekey="terminalname"}
  21. // gets name of the finger by mapping the integer value from the ekey-packet to a meaningful description in a map-file - available everywhere
  22. Number FingerID "Last used finger was the [MAP(ekey_finger.map):%d]" {ekey="fingerid"}
  23. // 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
  24. Number KeyID "Last defined key was: [MAP(ekey_key.map):%d]" {ekey="keyid"}
  25. // gets the description of the input that triggered this action by mapping its id to a meaningful value - NOT available in every mode
  26. Number InputID "The input that triggered the last action: [MAP(ekey_input.map):%d]" {ekey="inputid"}
  27. // 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
  28. Number RelayID "The relay that switched at the last action: [MAP(ekey_relay.map):%d]" {ekey="relayid"}
  29. // gets the mode of the packet (RARE, MULTI or HOME) by mapping its integer representation to one its string representation
  30. Number Mode "The packet mode was [MAP(ekey_mode.map):%d]" {ekey="mode"}
  31.  
  32.  
  33.  
  34. ################################### eKey Binding ###########################################
  35. # ip address of the eKey udp converter (optional)
  36. ekey:ip=10.0.0.133
  37. # port number for the UDP packets
  38. ekey:port=51000
  39. # mode can be RARE, MULTI or HOME depending on what your system supports - RARE is default
  40. ekey:mode=HOME
  41. # the delimiter is also defined on the eKey udp converter - use the eKey configuration
  42. # software to determine which delimiter is used or to change it.
  43. # Not defining this is the same as " "
  44. ekey:delimiter=_
  45.  
  46.  
  47. /******************************** Demo Rule ***********************************************/
  48.  
  49.  
  50. rule LogUsr
  51. when
  52. Item Action received update
  53.  
  54. then
  55.  
  56. logInfo("ekey","ekey Action changed")
  57.  
  58. if(Action.state==-1)
  59. say("unauthorized access!")
  60. else{
  61. logInfo("ekey","in lugusr else")
  62. var String name = transform("MAP","ekey_names.map",UserID.state.toString())
  63. var String finger = transform("MAP","ekey_finger.map",FingerID.state.toString())
  64. var String terminal = transform("MAP","ekey_terminal.map",TerminalID.state.toString())
  65.  
  66. var String text = name + " put his " + finger + " finger over the " + terminal + " terminal. Hello "+name
  67. say(text)
  68.  
  69.  
  70. }
  71.  
  72. end
  73.  
  74. ******************************** Transform Files *******************************************
  75. ekey_action.map:
  76. 0=granted
  77. -1=rejected
  78. 1=timeoutA
  79. 2=timeoutB
  80. 3=inactive
  81. 4=alwaysuser
  82. 5=notcoupled
  83. 6=digitalinput
  84.  
  85. ekey_finger.map:
  86. 11=leftlittle
  87. 12=leftring
  88. 13=leftmiddle
  89. 14=leftindex
  90. 15=leftthumb
  91. 21=rightthumb
  92. 22=rightindex
  93. 23=rightmiddle
  94. 24=rightring
  95. 25=rightlittle
  96. 30=unspecified
  97.  
  98. ekey_input.map
  99. -1=none
  100. 1=Input One
  101. 2=Input Two
  102. 3=Input Three
  103. 4=Input Four
  104.  
  105. ekey_key.map
  106. 1=Key One
  107. 2=Key Two
  108. 3=Key Three
  109. 4=Key Four
  110.  
  111. ekey_mode.map
  112. 1=RARE
  113. 2=MULTI
  114. 3=HOME
  115.  
  116. ekey_names.map
  117. -1=Unspecified
  118. 1=Paul
  119. 2=Tobi
  120.  
  121. ekey_relay.map
  122. -1=none
  123. 1=Relay One
  124. 2=Relay Two
  125. 3=Relay Three
  126. 4=Relay Four
  127.  
  128. ekey_terminal.map
  129. 80156839130911=frontdoor
  130. 80156839130914=backdoor
  131.  
  132. ekey_userstatus.map
  133. -1=Undefined
  134. 1=Enabled
  135. 0=Disabled
RAW Paste Data