Z-Wave item configuration

Hi all!
Is there a way to map the command value of a device before it’s evaluated by openhap?

Background: I own several WTRFID devices. These devices send 5 (=Away) and 6 (=Home) instead of ON and OFF.
How do I map those values to ON and OFF before being processed?

  • Dirk

What command class is this? Is this a notification that’s being sent?

If you can provide a debug log showing the message I will take a look at how this can be translated.

Hello Chris!

Here comes the corresponding log:

Using a RFID tag after pressing ‘Away’ on the node 13:

2017-07-30 15:29:28.947 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 10 00 04 00 0D 0A 71 05 00 FF 00 FF 06 05 01 05 9F
2017-07-30 15:29:28.977 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-07-30 15:29:28.979 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 10 00 04 00 0D 0A 71 05 00 FF 00 FF 06 05 01 05 9F
2017-07-30 15:29:28.980 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 10 00 04 00 0D 0A 71 05 00 FF 00 FF 06 05 01 05 9F
2017-07-30 15:29:28.982 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 0D 0A 71 05 00 FF 00 FF 06 05 01 05
2017-07-30 15:29:28.983 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 13: Application Command Request (ALIVE:DONE)
2017-07-30 15:29:28.984 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 13: Starting initialisation from DONE
2017-07-30 15:29:28.984 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@8d9d6d already registered
2017-07-30 15:29:28.985 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 13: Incoming command class ALARM
2017-07-30 15:29:28.986 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Received ALARM command V2
2017-07-30 15:29:28.986 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Process NOTIFICATION_REPORT V2
2017-07-30 15:29:28.987 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: NOTIFICATION report - 0 = 255, event=5, status=255
2017-07-30 15:29:28.987 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Alarm Type = ACCESS_CONTROL (0)
2017-07-30 15:29:28.988 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveAlarmValueEvent
2017-07-30 15:29:28.989 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Got an event from Z-Wave network: ZWaveAlarmValueEvent
2017-07-30 15:29:28.989 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 255
2017-07-30 15:29:28.990 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2017-07-30 15:29:28.991 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2017-07-30 15:29:28.991 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter NOTIFICATION event is 5, type DecimalType
2017-07-30 15:29:28.992 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Updating channel state zwave:device:15c91a1d709:node13:notification_access_control to 5 [DecimalType]

Using the RFID tag after pressing ‘Home’ on the device:

your code goes here2017-07-30 15:29:44.785 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 10 00 04 00 0D 0A 71 05 00 00 00 FF 06 06 01 05 63
2017-07-30 15:29:44.787 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-07-30 15:29:44.788 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 10 00 04 00 0D 0A 71 05 00 00 00 FF 06 06 01 05 63
2017-07-30 15:29:44.788 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 10 00 04 00 0D 0A 71 05 00 00 00 FF 06 06 01 05 63
2017-07-30 15:29:44.789 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 0D 0A 71 05 00 00 00 FF 06 06 01 05
2017-07-30 15:29:44.790 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 13: Application Command Request (ALIVE:DONE)
2017-07-30 15:29:44.790 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 13: Starting initialisation from DONE
2017-07-30 15:29:44.791 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@8d9d6d already registered
2017-07-30 15:29:44.791 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 13: Incoming command class ALARM
2017-07-30 15:29:44.792 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Received ALARM command V2
2017-07-30 15:29:44.792 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Process NOTIFICATION_REPORT V2
2017-07-30 15:29:44.793 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: NOTIFICATION report - 0 = 0, event=6, status=255
2017-07-30 15:29:44.793 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Alarm Type = ACCESS_CONTROL (0)
2017-07-30 15:29:44.794 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveAlarmValueEvent
2017-07-30 15:29:44.794 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Got an event from Z-Wave network: ZWaveAlarmValueEvent
2017-07-30 15:29:44.795 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 255
2017-07-30 15:29:44.795 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2017-07-30 15:29:44.796 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2017-07-30 15:29:44.796 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter NOTIFICATION event is 6, type DecimalType
2017-07-30 15:29:44.797 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Updating channel state zwave:device:15c91a1d709:node13:notification_access_control to 6 [DecimalType]
2017-07-30 15:29:44.801 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 22: Transaction not completed: node address inconsistent.  lastSent=22, incoming=255
2017-07-30 15:29:44.819 [INFO ] [.model.script.AccessNotify_Keypad_13] - 6: neuer Wert
2017-07-30 15:29:44.825 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 31: Command received zwave:device:15c91a1d709:node31:notification_access_control --> 6
2017-07-30 15:29:44.826 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 31: No event found with name 'event6'
2017-07-30 15:29:44.826 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 31: No messages returned from converter
2017-07-30 15:29:44.831 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Command received zwave:device:15c91a1d709:node13:notification_access_control --> 6
2017-07-30 15:29:44.832 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 13: No event found with name 'event6'
2017-07-30 15:29:44.835 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: No messages returned from converter

Details of what I want to accomplish:

Assume there are 2 WTRFID devices A and B near two doors. Both devices have the same state ‘Home’ currently. Before I leave my home I’ll switch device A to ‘Away’ by use of a RFID tag. I see a corresponding state change in logs. This state change will switch my alarm system to ‘armed’. Later I enter my home through the other door and switch device B to ‘Home’. This state change triggers ‘disarm’ my alarm system.

So far so good.

Later one of this devices wakes up and sends its current state. This will be ‘Home’ for device B or ‘Away’ for device A. The alarm system will react accordingly. The result is nondeterministic. It gets worse as a 3rd item represented as a switch in the sitemap is also used to change the alarm system’s state. I also try to change the devices’ states via rules (sendCommand) - without success.

What I need is a clear deterministic ‘command’ in case a RFID tag is used to set the device’s state. But I can’t see any command at all.

I hope this clarifies the issue

  • Dirk

I’m not sure I fully understand everything you’re saying, but it shouldn’t be a problem to provide a channel called (say) accesscontrol_lock and make it ON or OFF depending on the state of the button (ie when the device sends event 5 or event 6). Clearly it’s up to you to manage all the different devices that can then turn your alarm system on or off, but that should provide you what you need I think?

Does that sound ok?

Well, looks like I wasn’t clear enough :blush: English is not my native language

The issue is that I can’t determine if the state I get is related to using the RFID tag or it’s simply the state send at wake-up time.
That in case the device have different states (within the devices themself) I receive random states depending on which device awakes earlier.

Imaging you left your home and armed the alarm system (device A reports state ‘Away’) and a few minutes later device B wakes up and reports its own state ‘Home’ disabling the alarm system - you loose.
Or the other way around you are at home but a wake up reports Away and arms the alarm system.

I need a clear deterministic state change or better a command, which tells me, that the RFID tag has been used.

  • Dirk

I thought these devices sent a message when someone used an RFID? Do you mean that nothing is sent to say which ID is used? If so, then there’s not much we can do, but I thought that there was one.

Is the device securely included, or not? This might also change how the device works - often when a device is securely included they will expose more functionality.

Yes, they send a usercode when controlled by FHEM or Z-Way, but not if controlled by the zwave binding.
Habmin shows a ‘?’ beside the ‘Using Security’ item. But I’m sure the integration process was successful as the behavior is different under Z-Way control.

… and I also see a command arriving in the binding, which seems to be dropped:

2017-07-30 20:02:51.530 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Command received zwave:device:15c91a1d709:node13:notification_access_control --> 6
2017-07-30 20:02:51.531 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 13: No event found with name 'event6'
2017-07-30 20:02:51.532 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: No messages returned from converter

The issue regarding the usercode has already been discussed in another thread. It’s due to the length of the payload containing the usercode. The usercode is longer than the standard of 10 ASCII chars and seems to be ignored for that reason. But that’s okay with me if I get a ‘command’ in case a RFID has been used - not only a ‘state’ update.

But this can’t be an issue with the binding - it must be to do with the way the device is configured.

But this is just the notification that you said you didn’t want - it’s just the home/away notification.

This issue was resolved a long time ago. You say here that it’s ignored, but earlier you said it’s not sent which seems more correct unless there’s another log that shows this?

You haven’t said if this device is included securely? I think not though - right?

Hi Chris!

After my vacations and some further investigations …

I excluded and re-included the WTRFID things.

  • I saw the user codes after the initialization completed in HABmin with some strange characters
  • The “Using Security” attribute shows a question mark
  • After I restarted OpenHAB the user codes are no longer visible in HABmin.
  • The node*.xml files are there, but the logfile shows an error stating that openHAB wasn’t able to parse the XML. There are some unescaped characters in the user codes (RFID tag infos). Maybe that’s the reason.

I still get only ‘state’ information after using the RFID tag or entering a code number.

I’d expect to get a ‘command’ saying ‘5’ for Away or ‘6’ for Home and to get the index of the user code being used to change the things state.

Then using the RFID tag I see debug output like this:

2017-08-24 18:35:58.642 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 10 00 04 00 0D 0A 71 05 00 00 00 FF 06 06 01 05 63 
2017-08-24 18:35:58.677 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-08-24 18:35:58.679 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 10 00 04 00 0D 0A 71 05 00 00 00 FF 06 06 01 05 63 
2017-08-24 18:35:58.680 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 10 00 04 00 0D 0A 71 05 00 00 00 FF 06 06 01 05 63 
2017-08-24 18:35:58.682 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 0D 0A 71 05 00 00 00 FF 06 06 01 05 
2017-08-24 18:35:58.683 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 13: Application Command Request (ALIVE:DONE)
2017-08-24 18:35:58.684 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 13: Starting initialisation from DONE
2017-08-24 18:35:58.684 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@186f3ef already registered
2017-08-24 18:35:58.685 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 13: Incoming command class ALARM
2017-08-24 18:35:58.686 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Received ALARM command V2
2017-08-24 18:35:58.687 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Process NOTIFICATION_REPORT V2
2017-08-24 18:35:58.687 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: NOTIFICATION report - 0 = 0, event=6, status=255
2017-08-24 18:35:58.688 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 13: Alarm Type = ACCESS_CONTROL (0)
2017-08-24 18:35:58.689 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveAlarmValueEvent
2017-08-24 18:35:58.690 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Got an event from Z-Wave network: ZWaveAlarmValueEvent
2017-08-24 18:35:58.690 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 255
2017-08-24 18:35:58.691 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2017-08-24 18:35:58.692 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2017-08-24 18:35:58.693 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter NOTIFICATION event is 6, type DecimalType
2017-08-24 18:35:58.693 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 13: Updating channel state zwave:device:15c91a1d709:node13:notification_access_control to 6 [DecimalType]

Any ideas?

The current behaviour is not suitable to be used for an alarm system in case 2 or more WTRFID things are used to control access.

Dirk

Nobody else interested in solving the WTRFID issues?

Hello Chris!
The WTRFID issue is still unsolved.

  1. I only get state updates from the devices
  2. The use of a RFID tag doesn’t show-up as a command
  3. The index of the RFID tag used (aka User Code) isn’t notified in any way.
  4. The saved ‘nodexy.xml’ file contains errors in case the User Code contains non-standard characters. These non-standard characters are not escaped.

To sum up the findings/issues: WTRFID things aren’t usable to create a reliable alarm system.
Operating two such things in different states leads to unusable states: node01 is in state ‘Home’, node02 is in state '‘Away’ leads to alternating states like this:


2017-09-21T19:19:46 31 Keypad Garage Away 1
2017-09-21T19:21:42 13 Keypad 13 Home 0
2017-09-21T20:19:35 31 Keypad Garage Away 1
2017-09-21T20:21:33 13 Keypad 13 Home 0
2017-09-21T21:19:27 31 Keypad Garage Away 1
2017-09-21T21:21:24 13 Keypad 13 Home 0
2017-09-21T22:19:14 31 Keypad Garage Away 1
2017-09-21T22:21:14 13 Keypad 13 Home 0
2017-09-21T23:19:01 31 Keypad Garage Away 1
2017-09-21T23:21:06 13 Keypad 13 Home 0
2017-09-22T00:18:47 31 Keypad Garage Away 1
2017-09-22T00:20:55 13 Keypad 13 Home 0
2017-09-22T01:18:34 31 Keypad Garage Away 1
2017-09-22T01:20:45 13 Keypad 13 Home 0
2017-09-22T02:18:20 31 Keypad Garage Away 1
2017-09-22T02:20:35 13 Keypad 13 Home 0
2017-09-22T03:18:08 31 Keypad Garage Away 1
2017-09-22T03:20:22 13 Keypad 13 Home 0
2017-09-22T04:17:55 31 Keypad Garage Away 1
2017-09-22T04:20:08 13 Keypad 13 Home 0
2017-09-22T05:17:43 31 Keypad Garage Away 1
2017-09-22T05:19:56 13 Keypad 13 Home 0


Each devices reports it’s current state app. every hour. The state can’t be used to control the alarrn system as the state reports would turn it on and off twice a hour.

  • Dirk

There have been no changes as we discussed earlier, so I don’t expect it to be solved.