Apparently somebody has gotten the monoprice smoke detectors to work in the past, because I can search and find examples in the forum and the wiki…
…that don’t work. (I tried adding endpoints to it, still el zilcho.)
Here’s what happens in the zwave log when the smoke detector goes off, followed by when it clears:
2016-04-01 22:05:58.967 [DEBUG] [ApplicationCommandMessageClass:40 ]- NODE 41: Application Command Request (ALIVE:DONE)
2016-04-01 22:05:58.968 [DEBUG] [ApplicationCommandMessageClass:58 ]- NODE 41: Incoming command class BASIC
2016-04-01 22:05:58.968 [DEBUG] [z.i.p.c.ZWaveBasicCommandClass:73 ]- NODE 41: Received Basic Request
2016-04-01 22:05:58.968 [DEBUG] [z.i.p.c.ZWaveBasicCommandClass:77 ]- NODE 41: Basic Set sent to the controller will be processed as Basic Report
2016-04-01 22:05:58.969 [DEBUG] [z.i.p.c.ZWaveBasicCommandClass:106 ]- NODE 41: Basic report, value = 0xFF
2016-04-01 22:05:58.970 [DEBUG] [.z.internal.ZWaveActiveBinding:466 ]- NODE 41: Got a value event from Z-Wave network, endpoint = 0, command class = BASIC, value = 255
2016-04-01 22:05:59.016 [DEBUG] [ApplicationCommandMessageClass:40 ]- NODE 41: Application Command Request (ALIVE:DONE)
2016-04-01 22:05:59.016 [DEBUG] [ApplicationCommandMessageClass:58 ]- NODE 41: Incoming command class ALARM
2016-04-01 22:05:59.017 [DEBUG] [z.i.p.c.ZWaveAlarmCommandClass:82 ]- NODE 41: Received Alarm Request
2016-04-01 22:05:59.017 [DEBUG] [z.i.p.c.ZWaveAlarmCommandClass:94 ]- NODE 41: Alarm report - Value = 255
2016-04-01 22:05:59.018 [DEBUG] [z.i.p.c.ZWaveAlarmCommandClass:113 ]- NODE 41: Alarm Type = Smoke (1)
2016-04-01 22:05:59.019 [DEBUG] [.z.internal.ZWaveActiveBinding:466 ]- NODE 41: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 255
2016-04-01 22:06:23.947 [DEBUG] [ApplicationCommandMessageClass:40 ]- NODE 41: Application Command Request (ALIVE:DONE)
2016-04-01 22:06:23.947 [DEBUG] [ApplicationCommandMessageClass:58 ]- NODE 41: Incoming command class BASIC
2016-04-01 22:06:23.948 [DEBUG] [z.i.p.c.ZWaveBasicCommandClass:73 ]- NODE 41: Received Basic Request
2016-04-01 22:06:23.948 [DEBUG] [z.i.p.c.ZWaveBasicCommandClass:77 ]- NODE 41: Basic Set sent to the controller will be processed as Basic Report
2016-04-01 22:06:23.949 [DEBUG] [z.i.p.c.ZWaveBasicCommandClass:106 ]- NODE 41: Basic report, value = 0x00
2016-04-01 22:06:23.950 [DEBUG] [.z.internal.ZWaveActiveBinding:466 ]- NODE 41: Got a value event from Z-Wave network, endpoint = 0, command class = BASIC, value = 0
2016-04-01 22:06:23.995 [DEBUG] [ApplicationCommandMessageClass:40 ]- NODE 41: Application Command Request (ALIVE:DONE)
2016-04-01 22:06:23.996 [DEBUG] [ApplicationCommandMessageClass:58 ]- NODE 41: Incoming command class ALARM
2016-04-01 22:06:23.996 [DEBUG] [z.i.p.c.ZWaveAlarmCommandClass:82 ]- NODE 41: Received Alarm Request
2016-04-01 22:06:23.997 [DEBUG] [z.i.p.c.ZWaveAlarmCommandClass:94 ]- NODE 41: Alarm report - Value = 0
2016-04-01 22:06:23.997 [DEBUG] [z.i.p.c.ZWaveAlarmCommandClass:113 ]- NODE 41: Alarm Type = Smoke (1)
2016-04-01 22:06:23.999 [DEBUG] [.z.internal.ZWaveActiveBinding:466 ]- NODE 41: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 0
From this, it seems that I could key off of a BASIC report, or an alarm. Here are my three guesses that could possibly work:
Contact PINBALL_ALLEY_SMOKE_DETECTOR "Smoke detector [%s]" (Group_Fire,Group_Pinball_Alley,Group_Persistence) {zwave="41:0:command=SENSOR_BINARY"}
Contact PINBALL_ALLEY_SMOKE_DETECTOR_2 "Smoke detector 2 [%s]" (Group_Fire,Group_Persistence) {zwave="41:0:command=SENSOR_ALARM"}
Contact PINBALL_ALLEY_SMOKE_DETECTOR_3 "Smoke detector 3 [%s]" (Group_Fire,Group_Persistence) {zwave="41:0:command=BASIC,respond_to_basic=true"}
and a handy rule I made to log what’s going on:
rule "log smoke states"
when
Item LOG_PBA_STATE changed or
Item PINBALL_ALLEY_SMOKE_DETECTOR changed or
Item PINBALL_ALLEY_SMOKE_DETECTOR_2 changed or
Item PINBALL_ALLEY_SMOKE_DETECTOR_3 changed
then
{
logInfo("openhab","pba smoke state: " + PINBALL_ALLEY_SMOKE_DETECTOR.state)
logInfo("openhab","pba alarm state 2: " + PINBALL_ALLEY_SMOKE_DETECTOR_2.state)
logInfo("openhab","pba alarm state 3: " + PINBALL_ALLEY_SMOKE_DETECTOR_3.state)
}
end
Which is all well and good. Only problem is that the results I get are completely lacking.
The only item that updates is the BASIC state, which always reads closed. It reads closed when the smoke detector isn’t doing anything, it reads closed when the tamper alarm is going off, and it reads closed when it’s detecting smoke. So… yeah BASIC report isn’t doing it.
The other two items just show uninitialized, always.
What am I doing wrong with this item definition? Thanks in advance!