Schlage BE469 - Zwave binding with security - missing features

Code fences.

The error was due to the quotes around the input string…

var Number lockevent = Integer::parseInt(transform(“JSONPATH”, “$.event”, “Lock_MF_Dining_Alarm.state.toString”))

See if this helps. Let me know if you’d like explanations for any of it.

rule "Front Lock Update lock states after alarm events"
when
    Item Lock_MF_Dining_Alarm received update
then
    switch (transform("JSONPATH","$.type",Lock_MF_Dining_Alarm.state.toString)) {
        case "ACCESS_CONTROL" : {
            switch (transform("JSONPATH", "$.event", Lock_MF_Dining_Alarm.state.toString)) {
                case "1", case "3", case "5" : {
                    Lock_MF_Dining.postUpdate(ON)
                    postUpdate(EventLog, "Front Door: LOCKED")
                }
                case "2", case "4", case "6" : {
                    Lock_MF_Dining.postUpdate(OFF)
                    postUpdate(EventLog, "Front Door: UNLOCKED")
                }
                case "11" : {
                    postUpdate(EventLog, "Front Door: JAMMED")
                }
            }
        }
        case "BURGLAR" : {
            postUpdate(EventLog, "Front Door: BURGLAR")
        }
    }
end

All you need are these items (a proxy item is not needed):

String Lock_MF_Dining_Alarm	"Front Lock Alarm" {channel="zwave:device:8fe51373:node41:alarm_raw"}
Switch Lock_MF_Dining	"Front Lock" {channel="zwave:device:8fe51373:node41:lock_door"}

An important thing to note is that the way your rule was written, if you had the alarm mode set to anything but disabled, lock picking, or a kick, or anything else that would have set off the tamper alarm (sends an event 6) would have unlocked the door! Filter on the type first.

2 Likes