WTRFID Mini Keypad RFID/Z-Wave

Hello,

I just bought a WTRFID Mini RFID Keypad with Z-Wave. The keypad is already in the Zwave database:

I included it successfully into my Zwave network. So far, so good :slight_smile:

Question 1: it uses the USER_CODE command class, Chris already added it to the Zwave binding. In the Paper UI it isnā€™t possible to configure some user codes, the USER_CODE command class doesnā€™t show up when I edit the thing.
However, in Habmin itā€™s there and I can enter and save user codes. Why isnā€™t it shown in Paper UI?

Question 2: So I configured a user code in order to disable the alarm. When I enter the code, it doesnā€™t seem to work, and the debug log of the Zwave binding shows the following.

22:56:00.068 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Incoming command class USER_CODE
22:56:00.068 [DEBUG] [mmandclass.ZWaveUserCodeCommandClass] - NODE 28: Received UserCode Request
22:56:00.068 [DEBUG] [mmandclass.ZWaveUserCodeCommandClass] - NODE 28: USER_CODE_REPORT 0 is AVAILABLE
22:56:00.068 [DEBUG] [mmandclass.ZWaveUserCodeCommandClass] - NODE 28: UserCode(0) length is too long (12 bytes)
22:56:00.068 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got an event from Z-Wave network: ZWaveUserCodeValueEvent
22:56:00.068 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got a value event from Z-Wave network, endpoint = 0, command class = USER_CODE, value =
22:56:00.218 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Application Command Request (ALIVE:DONE)

Iā€™m wondering if the log message ā€œUserCode(0) length is too long (12 bytes)ā€ maybe is the problemā€¦ I read that the stored user code is only 10 bytes long, but maybe this is a new version of the device, and now the code is 12 bytes long?

Does anybody have an idea how I could proceed with this issue? Or does someone else got that device up and running at home?

Best regards,
Christian

After some further research I found this in @chris Code: https://github.com/openhab/org.openhab.binding.zwave/blob/master/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveUserCodeCommandClass.java

Line 47:

public static final int USER_CODE_MAX_LENGTH = 10;

Line 113:

                if (size > USER_CODE_MAX_LENGTH) {
                            logger.debug("NODE {}: UserCode({}) length is too long ({} bytes)", getNode().getNodeId(), id, size);
                            size = USER_CODE_MAX_LENGTH;
                        }

This sounds like the source of my problem, right?
Are there some instructions around how to build the binding myself? Do I just have to build a JAR file out of the changed code and put this in the addons directory?

Christian

The ZWave protocol states -:

These fields contain the user code. Minimum code length is 4 and maximum 10 ASCII digits.

This is from the current spec, so I donā€™t think the binding is wrong. What command class version does this device report itā€™s using?

      <commandClass>USER_CODE</commandClass>
      <userCodeCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>

Is that what youā€™re looking for?

Christian

Yep - thanks - this is consistent with the documentation. So I think 10 bytes is the maximum as per the protocol - why do you think this device allows 12 bytes?

Well, when I read the RFID code or enter the user code via the keypad, this log message is generatedā€¦ so I thought it might be the keypad sends 12 bytes instead of 10 bytes.

Fyi, this is the trace log:

openhab> log:set trace org.openhab.binding.zwave
openhab> log:tail zwave | grep "NODE 28"
15:26:16.425 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Application Command Request (INITIALIZING:PING)
15:26:16.425 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: Node is ALIVE. Init stage is PING.
15:26:16.425 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node Status event during initialisation - Node is ALIVE
15:26:16.425 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node advancer - PING: queue length(0), free to send(true)
15:26:16.425 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node advancer: loop - PING try 1: stageAdvanced(false)
15:26:16.425 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node advancer: PING - send NoOperation
15:26:16.425 [DEBUG] [ndclass.ZWaveNoOperationCommandClass] - NODE 28: Creating new message for command No Operation
15:26:16.425 [TRACE] [wave.internal.protocol.SerialMessage] - NODE 28: Creating empty message of class = SendData (0x13), type = Request (0x00)
15:26:16.425 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node advancer - queued packet. Queue length is 1
15:26:16.426 [TRACE] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node Status event during initialisation processed
15:26:16.426 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got an event from Z-Wave network: ZWaveNodeStatusEvent
15:26:16.426 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Setting ONLINE
15:26:16.426 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - NODE 28: Sending REQUEST Message = 01 08 00 13 1C 01 00 25 1E C2 
15:26:16.426 [DEBUG] [ve.internal.protocol.ZWaveController] - NODE 28: Node Status event - Node is ALIVE
15:26:16.426 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Incoming command class USER_CODE
15:26:16.426 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Command class USER_CODE not found, trying to add it.
15:26:16.426 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 28: Creating new instance of command class USER_CODE
15:26:16.426 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 28: Command class USER_CODE, endpoint null created
15:26:16.426 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Adding command class USER_CODE
15:26:16.426 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: Adding command class USER_CODE to the list of supported command classes.
15:26:16.426 [TRACE] [ssage.ApplicationCommandMessageClass] - NODE 28: Found Command Class USER_CODE, passing to handleApplicationCommandRequest
15:26:16.426 [DEBUG] [mmandclass.ZWaveUserCodeCommandClass] - NODE 28: Received UserCode Request
15:26:16.426 [DEBUG] [mmandclass.ZWaveUserCodeCommandClass] - NODE 28: USER_CODE_REPORT 0 is AVAILABLE
15:26:16.426 [DEBUG] [mmandclass.ZWaveUserCodeCommandClass] - NODE 28: UserCode(0) length is too long (12 bytes)
15:26:16.426 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: CC event during initialisation stage IDLE
15:26:16.427 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got an event from Z-Wave network: ZWaveUserCodeValueEvent
15:26:16.427 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got a value event from Z-Wave network, endpoint = 0, command class = USER_CODE, value = 
15:26:16.435 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 28: Sent Data successfully placed on stack.
15:26:16.514 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Application Command Request (ALIVE:DETAILS)
15:26:16.514 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Incoming command class WAKE_UP
15:26:16.514 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Command class WAKE_UP not found, trying to add it.
15:26:16.514 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 28: Creating new instance of command class WAKE_UP
15:26:16.514 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 28: Command class WAKE_UP, endpoint null created
15:26:16.514 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 28: Adding command class WAKE_UP
15:26:16.514 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: Adding command class WAKE_UP to the list of supported command classes.
15:26:16.514 [TRACE] [ssage.ApplicationCommandMessageClass] - NODE 28: Found Command Class WAKE_UP, passing to handleApplicationCommandRequest
15:26:16.514 [DEBUG] [commandclass.ZWaveWakeUpCommandClass] - NODE 28: Received Wake Up Request
15:26:16.514 [DEBUG] [commandclass.ZWaveWakeUpCommandClass] - NODE 28: Received WAKE_UP_NOTIFICATION
15:26:16.514 [DEBUG] [commandclass.ZWaveWakeUpCommandClass] - NODE 28: Is awake with 0 messages in the wake-up queue.
15:26:16.514 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Wakeup during initialisation.
15:26:16.514 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node advancer - DETAILS: queue length(1), free to send(false)
15:26:16.514 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 28: Node advancer - queued packet. Queue length is 1
15:26:16.514 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got an event from Z-Wave network: ZWaveWakeUpEvent
15:26:16.923 [DEBUG] [l.serialmessage.SendDataMessageClass] - NODE 28: SendData Request. CallBack ID = 30, Status = Transmission complete and ACK received(0)
15:26:16.923 [WARN ] [l.serialmessage.SendDataMessageClass] - NODE 28: Already processed another send data request for this callback Id, ignoring.
15:26:17.515 [DEBUG] [commandclass.ZWaveWakeUpCommandClass] - NODE 28: No more messages, go back to sleep
15:26:17.515 [DEBUG] [commandclass.ZWaveWakeUpCommandClass] - NODE 28: Creating new message for application command WAKE_UP_NO_MORE_INFORMATION
15:26:17.515 [TRACE] [wave.internal.protocol.SerialMessage] - NODE 28: Creating empty message of class = SendData (0x13), type = Request (0x00)
^C

I checked the device manual - it states -:

NOTE: Code length must be 4 to 10 ASCII digits.

Thatā€™s right, and there are only 10 digits stored:

          <entry>
            <int>1</int>
            <userCode>
              <state>OCCUPIED</state>
              <code>1234&#x0;&#x0;&#x0;&#x0;&#x0;&#x0;</code>
              <outer-class reference="../../../.."/>
            </userCode>
          </entry>

In this case I entered ā€˜1234ā€™ as the user code, the remaining 6 digits are substituted with

&#x0;

But when I press the ā€˜Homeā€™ button, enter ā€˜1234ā€™ and press the ā€˜Enterā€™ key, the above log message (12 bytes) is displayedā€¦ same thing when pressing ā€˜Homeā€™ and placing the RFID chip in front of the reader.

Can you provide a debug log showing the data and Iā€™ll take a look here.

Isnā€™t this the debug log above? And thanks for having a look into it!!!

I donā€™t know if you can read German, but hereā€™s a site about the keypad with FHEM and some additional code-outputs:

https://wiki.fhem.de/wiki/Z-Wave-ZIP_WT-RFID_Keypad#Auslesen_unbekannter_RFID-Tags_oder_nicht_angelernter_Tastencodes

Well, it is part of a debug log, but you filtered out the parts I need.

No - I started to learn when I was working in Bremen a few years back, but never got far enough. I have a friend who knows German well though (Mr Google Translate!).

OK, which part exactly do you need?

Hereā€™s some more debug logging

debug.xml (221.1 KB)

I want the part that youā€™ve pasted, but without the filtering. It looks like you have grepped on ā€œNode 28:ā€?

Again, this looks like itā€™s filtered data - sorryā€¦

Yes, I filtered node 28, do you need the whole Zwave log?

Christian

No - I donā€™t need the whole log. Just the part around where youā€™ve already provided is fine, but without the filtering. The filtering is removing information that is needed.

OK, I hope this is sufficient, the node woke up and I performed some RFID actions.

debug.xml (121.3 KB)

Thanks again!

Thanks - thatā€™s fine.

It looks like the device is only sending 10 bytes so the binding must be using the wrong numbers.