I’m not sure about the notification type, but for my Schlage Connect what matters is the event type. Here’s my rule, which is a simplified version of one from this post.
Basically, the odd-numbered events are locked states, and the even numbers are unlocked states. When openHAB sees an Alarm_Raw event, it reads the event code and acts accordingly.
You need jsonpath transformation if you don’t already have that installed.
rule "Update door lock status"
when
Item Door_Lock_Alarm_Raw received update
then
if (Door_Lock_Alarm_Raw.state != "")
{
switch (transform("JSONPATH", "$.event", triggeringItem.state.toString)) {
case "1", case "3", case "5" :
{
Door_Lock.postUpdate(ON)
// logInfo("Rules", "Lock updated to ON (locked)")
}
case "2", case "4", case "6" :
{
Door_Lock.postUpdate(OFF)
// logInfo("Rules", "Lock updated to OFF (unlocked)")
}
case "11" :
{
Door_Lock.postUpdate(OFF)
logInfo("Rules", "Lock is jammed, so setting lock to OFF (unlocked)")
}
}
}
end
The event codes might be different for your Kwikset lock, but I hope it helps!