Zwave - Yale YRD220 Lock

z-wave
Tags: #<Tag:0x00007f51ef88f7a0>

(Scott Rushworth) #152

Change the $.code to $.level. And change the codes to match yours.

Yes.


(Kris K) #153

Thanks Scott. Do you know if theres a way to remotely unlock the door using codes for testing purposes? ie: not physically entering the code.

I assume by switching the lock on/off via PaperUI it would count this as RF Lock or RF unlock (Alarm type 0x19 or 0x18)


(Scott Rushworth) #154

The codes are only able to be used on the keypad.

Yes. I believe you have examples of both here…


(Kris K) #155

Indeed, Level 1 (RF function), Event 3 - Lock or Even 4, Unlock

Getting my head around it now!


(Kris K) #156

Hi Scott,

In your rule, what is this used for? It appears commented.Id like to build into a dashboard an ability to display who/who unlocked/locked the door last.

/*
        {"notification":"ACCESS__MANUAL_LOCK",                          "type":"ACCESS_CONTROL","event":"1","status":"255"}
        {"notification":"ACCESS__MANUAL_UNLOCK",                        "type":"ACCESS_CONTROL","event":"2","status":"255"}
        unlocked with zwave? event 3
        locked with zwave? event 4
        {"notification":"ACCESS__KEYPAD_LOCK",  "code":"1",             "type":"ACCESS_CONTROL","event":"5","status":"255"}
        {"notification":"ACCESS__KEYPAD_UNLOCK","code":"1",             "type":"ACCESS_CONTROL","event":"6","status":"255"}
        {"notification":"ACCESS__LOCK_JAMMED",                          "type":"ACCESS_CONTROL","event":"11","status":"255"}
        {"notification":"ACCESS__KEYPAD_LOCK",                          "type":"ACCESS_CONTROL","event":"5","status":"255"}
        {"notification":"ACCESS_CONTROL__KEYPAD_TEMPORARILY_DISABLED",  "type":"ACCESS_CONTROL","event":"16","status":"255"}
        {"notification":"BURGLAR__TAMPER_UNKNOWN",                      "type":"BURGLAR","event":"2","status":"255"}
        {"notification":"HOME_SECURITY__INTRUSION_UNKNOWN",             "type":"BURGLAR","event":"2","status":"255"}
        {"notification":"POWER__REPLACE_BATTERY_SOON",                  "type":"POWER_MANAGEMENT","event":"10","status":"255"}
        {"notification":"POWER_MANAGEMENT__REPLACE_BATTERY_SOON",       "type":"POWER_MANAGEMENT","event":"10","status":"255"}
    */

(Scott Rushworth) #157

It’s a multiline comment… just information, in case someone could use it. It’s a list of all alarms I’ve seen. I need to fill in the event 3 & 4.

I think the easiest way to do that may be to add another Item to hold that info. Then set it in case 6. The rule currently doesn’t identify who locked a door with a code, but tthat coud easily be added.


(Kris K) #158

Hi Scott

So define a proxy item

String UserCode                       "Last Code Used on the Door"

With rule modification


                case "6" : {
                    val StringBuilder message = new StringBuilder(actionItem.name)
                    message.append(" was unlocked with")
                    switch (transform("JSONPATH", "$.level", triggeringItem.state.toString)) {
                        case "1" : {
                            message.append(" Jodies Code")
                            UserCode.postUpdate(message.append.toString)
                        }

???


(Scott Rushworth) #159
                case "6" : {
                    actionItem.postUpdate(OFF)
                    val StringBuilder message = new StringBuilder(actionItem.name)
                    message.append(" was unlocked with")
                    switch (transform("JSONPATH", "$.code", triggeringItem.state.toString)) {
                        case "1" : {
                            message.append(" Jodie's code")
                        }
                        case "2" : {
                            message.append(" Kris' code")
                        }
                    }
                    logDebug("Rules", "Lock: {}",message.toString)
                    UserCode.postUpdate(message.toString)
                }