-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom UAM rule Notification to DoorLock mappings
This is a contribution per the CLA Signed-off-by: Nenad Kljajic <[email protected]>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
applications/zpc/components/dotdot_mapper/rules/Notification_to_DoorLock.uam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Custom Notification to DoorLock mappings | ||
def zwNOTIFICATION_TYPE 0x7103 | ||
def zwNOTIFICATION_ACCESS_CONTROL_STATE 0x7105 | ||
def zwVALUE 0x7106 | ||
|
||
def zbDOOR_LOCK_CLUSTER_LOCK_STATE 0x01010000 | ||
def zbDOOR_LOCKED 0x01 | ||
def zbDOOR_UNLOCKED 0x02 | ||
|
||
def ACCESS_CONTROL 0x06 | ||
def ACCESS_CONTROL_TYPE 0xFF | ||
|
||
def MANUAL_LOCK_OPERATION 0x01 | ||
def MANUAL_UNLOCK_OPERATION 0x02 | ||
def RF_LOCK_OPERATION 0x03 | ||
def RF_UNLOCK_OPERATION 0x04 | ||
def KEYPAD_LOCK_OPERATOIN 0x05 | ||
def KEYPAD_UNLOCK_OPERATOIN 0x06 | ||
def AUTO_LOCK_LOCKED_OPERATION 0x09 | ||
def UNLOCK_BY_RF_WITH_INVALID_USER_CODE 0x14 | ||
def LOCKED_BY_RF_WITH_INVALID_USER_CODE 0x15 | ||
|
||
|
||
scope 0 { | ||
|
||
r'zbDOOR_LOCK_CLUSTER_LOCK_STATE = | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == MANUAL_LOCK_OPERATION ) zbDOOR_LOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == MANUAL_UNLOCK_OPERATION ) zbDOOR_UNLOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == RF_LOCK_OPERATION ) zbDOOR_LOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == RF_UNLOCK_OPERATION ) zbDOOR_UNLOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == KEYPAD_LOCK_OPERATOIN ) zbDOOR_LOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == KEYPAD_UNLOCK_OPERATOIN ) zbDOOR_UNLOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == AUTO_LOCK_LOCKED_OPERATION ) zbDOOR_LOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == UNLOCK_BY_RF_WITH_INVALID_USER_CODE ) zbDOOR_UNLOCKED | ||
if ( r'zwNOTIFICATION_TYPE[ACCESS_CONTROL].zwNOTIFICATION_ACCESS_CONTROL_STATE[ACCESS_CONTROL_TYPE].zwVALUE == LOCKED_BY_RF_WITH_INVALID_USER_CODE ) zbDOOR_LOCKED | ||
undefined | ||
|
||
} |