Number Hallway_ZCOMBO "Last Alarm [%d]" {zwave="2:command=alarm"}
Then have a rule to catch updates and switch other Items appropriately:
Contact Hallway_ZCOMBO_Heartbeat "Heartbeat [%s]"
rule "ZCOMBO Alarm Signal"
when
Item Hallway_ZCOMBO received update
then
if((Hallway_ZCOMBO.state as DecimalType) == 13) HAllway_ZCOMBO_Heartbeat.sendCommand(OPEN)
// process other states
end
Given that there is nothing in the “Supported Parameters” column for ALARM on the command class table in the wiki I don’t think this command class will support any of the things you tried. I’m going to try the above myself and see what happens but it will probably be much later today before I see if it worked.
EDIT: Well, that didn’t seem to work. I still get the “NODE 5: Unknown Alarm Type = 13, ignoring report.” and my Number Item is not updated.
A quick update. I did some cooking and managed to set one of the smoke alarms off. When the alarm went off it sent 255. When I reset the alarm it sent 0. While I was there I tested the alarm and at the start it sent 255 and when done testing it sent 0.
So, despite the table of values @Brian posted above it does not appear that the Alarm is making any distinction between alarm types.
I’ve also found no way thus far to receive the 13 - alarm heartbeat. It looks like the binding is blocking it as unknown.
I’m not sure how to trigger the CO alarm to generate a real test as opposed to the manual test by pressing the button to see if it sends something different. I suspect the answer is no.
But for now I have the following that appears to work:
rule "Process Main Floor Alarm"
when
Item N_V_Main_COSmoke_Alarm received update or
Item N_V_Top_COSmoke_Alarm received update
then
logInfo("CO/Smoke", "Main floor CO/Smoke Alarm sent " + N_V_Main_COSmoke_Alarm.state.toString)
switch (N_V_Main_COSmoke_Alarm.state as DecimalType) {
case 255: Notification_Proxy_Alarm.postUpdate("Main floor CO/Smoke Alarm has gone off!")
case 0: Notification_Proxy_Alarm.postUpdate("Main floor CO/Alarm has been reset.")
default: Notification_Proxy_Info.postUpdate("Main floor sent an unknown alarm status: " + N_V_Main_COSmoke_Alarm.state.toString)
}
switch (N_V_Top_COSmoke_Alarm.state as DecimalType) {
case 255: Notification_Proxy_Alarm.postUpdate("Top floor CO/Smoke Alarm has gone off!")
case 0: Notification_Proxy_Alarm.postUpdate("Top floor CO/Alarm has been reset.")
default: Notification_Proxy_Info.postUpdate("Top floor sent an unknown alarm status: " + N_V_Main_COSmoke_Alarm.state.toString)
}
end
rule "Process Alarm Battery"
when
Item N_V_Main_COSmoke_Battery received update or
Item N_V_Top_CO2moke_Battery received update
then
if((N_V_Main_COSmoke_Battery.state as DecimalType) < 10) {
Notification_Proxy_Alarm.postUpdate("Replace the main floor CO/Alarm's battery")
}
else if ((N_V_Top_CO2moke_Battery.state as DecimalType) < 10) {
Notification_Proxy_Alarm.postUpdate("Replace the top floor CO/Alarm's battery")
}
end