Hi sihui,
I just don’t understand if I need to switch on these channels everytime I boot openhab2.
Guessing that the sensor reports a value when it is under water to the controller, why is the item not a number, but a switch?
When I put the sensor under water, the following log appears when I enable zwave logging.
==> /var/log/openhab2/openhab.log <==
2017-12-30 23:12:43.043 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 09 00 04 00 02 03 20 01 FF 2D
2017-12-30 23:12:43.052 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-12-30 23:12:43.055 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 09 00 04 00 02 03 20 01 FF 2D
2017-12-30 23:12:43.058 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 09 00 04 00 02 03 20 01 FF 2D
2017-12-30 23:12:43.060 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 02 03 20 01 FF
2017-12-30 23:12:43.063 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 2: Application Command Request (ALIVE:DONE)
2017-12-30 23:12:43.065 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 2: Starting initialisation from DONE
2017-12-30 23:12:43.067 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@179c0e already registered
2017-12-30 23:12:43.069 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 2: Incoming command class BASIC
2017-12-30 23:12:43.071 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - NODE 2: Received Basic Request
2017-12-30 23:12:43.073 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - NODE 2: Basic Set sent to the controller will be processed as Basic Report
2017-12-30 23:12:43.075 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - NODE 2: Basic report, value = 0xFF
2017-12-30 23:12:43.077 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-12-30 23:12:43.079 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 2: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-12-30 23:12:43.081 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 2: Got a value event from Z-Wave network, endpoint = 0, command class = BASIC, value = 255
2017-12-30 23:12:43.084 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Immediate, dest=2, callback=10, payload=02 02 84 08
2017-12-30 23:12:43.087 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 02 03 20 01 FF
2017-12-30 23:12:43.089 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationCommandHandler, callback id=10, expected=SendData, cancelled=false MISMATCH
2017-12-30 23:12:44.044 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 09 00 04 00 02 03 20 01 00 D2
2017-12-30 23:12:44.048 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-12-30 23:12:44.051 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 09 00 04 00 02 03 20 01 00 D2
2017-12-30 23:12:44.055 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 09 00 04 00 02 03 20 01 00 D2
2017-12-30 23:12:44.059 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 02 03 20 01 00
2017-12-30 23:12:44.061 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 2: Application Command Request (ALIVE:DONE)
2017-12-30 23:12:44.064 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 2: Starting initialisation from DONE
2017-12-30 23:12:44.066 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@179c0e already registered
2017-12-30 23:12:44.068 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 2: Incoming command class BASIC
2017-12-30 23:12:44.070 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - NODE 2: Received Basic Request
2017-12-30 23:12:44.072 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - NODE 2: Basic Set sent to the controller will be processed as Basic Report
2017-12-30 23:12:44.075 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - NODE 2: Basic report, value = 0x00
2017-12-30 23:12:44.077 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-12-30 23:12:44.079 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 2: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-12-30 23:12:44.081 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 2: Got a value event from Z-Wave network, endpoint = 0, command class = BASIC, value = 0
2017-12-30 23:12:44.085 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Immediate, dest=2, callback=10, payload=02 02 84 08
2017-12-30 23:12:44.088 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 02 03 20 01 00
2017-12-30 23:12:44.090 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationCommandHandler, callback id=10, expected=SendData, cancelled=false MISMATCH
^C
NODE 2: Got a value event from Z-Wave network, endpoint = 0, command class = BASIC, value = 255
So I guess that command class BASIC has a value of 255 when the sensor is under water. It changes back to 0 when I the sensor doesn’t detect water anymore.
How to proceed further with this value? For example, sending myself an email with “mail action” or make a button in habpanel that lights up when the sensor is detecting water?
NODE 2: Got a value event from Z-Wave network, endpoint = 0, command class = BASIC, value = 255