Yep, that’s correct. Here’s the original solution, from a thread that started with a Yale lock.
In OH3, you can apply the JSONPATH transformation directly to the channel, so that it will only send the information you want to the item.
I’ve isolated the event and use a simple case statement in a rule to update the lock status.
switch (Door_Lock_Alarm_Raw.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)")
}
}
The rule is triggered by Door_Lock_Alarm_Raw
receiving an update.
If you want more detailed information, you’ll need to refer to the thread above.