So I have a rule that listens for an alarm from a keypad door lock:
rule "Door opened with code"
when
Item Alarm_Mud_Room_DoorLock received update
then
val String msg = Alarm_Mud_Room_DoorLock.state.toString
logError("AlarmNotif", msg)
// sendMail("dbadia@gmail.com", "mud room door lock activity", msg)
end
My goal is update the rule for a specific alarm type (21) and then determine which user code was used to unlock the door (alarm level).
The following debug log file shows this condition: (ALARM report - 21 = 1)
2017-12-16 08:38:15.022 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 12: Incoming command class COMMAND_CLASS_ALARM, endpoint 0
2017-12-16 08:38:15.022 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 12: Received COMMAND_CLASS_ALARM V1 NOTIFICATION_REPORT
2017-12-16 08:38:15.022 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 12: ALARM report - 21 = 1
2017-12-16 08:38:15.022 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 12: Alarm Type = null (21)
2017-12-16 08:38:15.022 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveAlarmValueEvent
2017-12-16 08:38:15.022 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 12: Got an event from Z-Wave network: ZWaveAlarmValueEvent
2017-12-16 08:38:15.022 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 12: Got a value event from Z-Wave network, endpoint = 0, command class = COMMAND_CLASS_ALARM, value = 1
2017-12-16 08:38:15.023 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing ALARM
How can I access the alarm type and level from my rule?
My current rule above only prints the status which is UNDEF
Here is my item definition:
Contact Alarm_Mud_Room_DoorLock {channel="zwave:device:15bfa0704b9:node12:alarm_number"}
Thanks in advance
Dave