OH2 Z-Wave refactoring and testing... and SECURITY

Ah - ok, that’s probably why I can’t find it - I didn’t look there :slight_smile: .

Note that you might need to reinitialise the thing to have the control classes correctly reflected…

Nothing has changed, but the controller should be added in the same way as if it was a slave -:

            case IncludeControllerFound:
            case IncludeSlaveFound:
                startTimer(TIMER_MAIN);
                // When a device is found we get the IncludeSlaveFound notification.
                // Here we need to end inclusion.
                logger.debug("NODE {}: Including node.", incEvent.getNodeId());

IncludeControllerFound is the event that is sent when ADD_NODE_STATUS_ADDING_CONTROLLER is received -:

            case ADD_NODE_STATUS_ADDING_CONTROLLER:
                if (incomingMessage.getMessagePayloadByte(2) < 1 || incomingMessage.getMessagePayloadByte(2) > 232) {
                    break;
                }
                logger.debug("NODE {}: Adding controller.", incomingMessage.getMessagePayloadByte(2));
                zController.notifyEventListeners(new ZWaveInclusionEvent(ZWaveInclusionState.IncludeControllerFound,
                        incomingMessage.getMessagePayloadByte(2)));
                break;

Do you have the log itself please?

Yes. It’ll be in your email momentarily.

Thanks.

Thanks - I’ve found the issue. It should be quick to fix…

1 Like

Awesome! I’ll wait for that version to test.

I’ve just updated it - let me know how it looks…

Unrelated question…

Did you remove the neighbor update from the initialization?

This is the cleanest startup I’ve ever seen.

Yes - I’ve remove a bunch of “unnecessary” stuff from the initialisation.

2 Likes

No issues (dead nodes or something) on a small network with 21 devices (6 battery powered, 15 mains powered) running on an RPi3 booting from an SSD.

As always; thanks a lot :+1::+1::+1:

1 Like

I started by excluding the minimote node, factory resetting it, then including it. The inclusion worked, and it completed initialization.

However, when a scene button is pressed, it’s complaining that SCENE_ACTIVATION command class is not supported.

Did your change to deal with the control command classes result in inbound control command class messages being unknown? Here’s a snippet. Let me know if you want a full log.

2018-07-15 10:30:04.040 [DEBUG] [wave.handler.ZWaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 0A 00 04 00 64 04 2B 01 01 00 BA 
2018-07-15 10:30:04.040 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[4], type=Request[0], dest=100, callback=0, payload=00 64 04 2B 01 01 00 
2018-07-15 10:30:04.041 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - processReceiveMessage past lock Message: class=ApplicationCommandHandler[4], type=Request[0], dest=100, callback=0, payload=00 64 04 2B 01 01 00 
2018-07-15 10:30:04.041 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Received msg (0): Message: class=ApplicationCommandHandler[4], type=Request[0], dest=100, callback=0, payload=00 64 04 2B 01 01 00 
2018-07-15 10:30:04.041 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - lastTransaction null
2018-07-15 10:30:04.041 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - NODE 100: Application Command Request (ALIVE:DONE)
2018-07-15 10:30:04.041 [DEBUG] [.openhab.binding.zwave.internal.protocol.ZWaveNode] - NODE 100: resetResendCount initComplete=true isDead=false
2018-07-15 10:30:04.041 [DEBUG] [.openhab.binding.zwave.internal.protocol.ZWaveNode] - NODE 100: Incoming command class COMMAND_CLASS_SCENE_ACTIVATION, endpoint 0
2018-07-15 10:30:04.041 [DEBUG] [.openhab.binding.zwave.internal.protocol.ZWaveNode] - NODE 100: Command class COMMAND_CLASS_SCENE_ACTIVATION not found.
2018-07-15 10:30:04.041 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - NODE 100: Commands processed 1.
2018-07-15 10:30:04.041 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - NODE 100: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@333f9074.
2018-07-15 10:30:04.042 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0
2018-07-15 10:30:04.042 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0
2018-07-15 10:30:04.042 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty
2018-07-15 10:30:04.042 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false
2018-07-15 10:30:41.561 [DEBUG] [wave.handler.ZWaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 0A 00 04 00 64 04 2B 01 01 00 BA 
2018-07-15 10:30:41.561 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[4], type=Request[0], dest=100, callback=0, payload=00 64 04 2B 01 01 00 
2018-07-15 10:30:41.562 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - processReceiveMessage past lock Message: class=ApplicationCommandHandler[4], type=Request[0], dest=100, callback=0, payload=00 64 04 2B 01 01 00 
2018-07-15 10:30:41.562 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Received msg (0): Message: class=ApplicationCommandHandler[4], type=Request[0], dest=100, callback=0, payload=00 64 04 2B 01 01 00 
2018-07-15 10:30:41.562 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - lastTransaction null
2018-07-15 10:30:41.562 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - NODE 100: Application Command Request (ALIVE:DONE)
2018-07-15 10:30:41.562 [DEBUG] [.openhab.binding.zwave.internal.protocol.ZWaveNode] - NODE 100: resetResendCount initComplete=true isDead=false
2018-07-15 10:30:41.563 [DEBUG] [.openhab.binding.zwave.internal.protocol.ZWaveNode] - NODE 100: Incoming command class COMMAND_CLASS_SCENE_ACTIVATION, endpoint 0
2018-07-15 10:30:41.563 [DEBUG] [.openhab.binding.zwave.internal.protocol.ZWaveNode] - NODE 100: Command class COMMAND_CLASS_SCENE_ACTIVATION not found.
2018-07-15 10:30:41.563 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - NODE 100: Commands processed 1.
2018-07-15 10:30:41.563 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - NODE 100: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@b9d576b.
2018-07-15 10:30:41.563 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0
2018-07-15 10:30:41.563 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0
2018-07-15 10:30:41.563 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty
2018-07-15 10:30:41.563 [DEBUG] [ng.zwave.internal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false

It shouldn’t - all I did is set a flag to say they are control classes, and then I don’t scan them for services.

Probably going to be needed I think.

Just sent email.

Got it - thanks. I’m going to head out for an hour or so but will take a look at it afterwards. It’s clear though that in this mode it has ignored the control classes - this is different than before though since it never used this data at all previously…

I’ve just made an update that I think will solve it - if not, let me know and I’ll take a look when I get back…

Something must’ve gone wrong because I get a 404 when I click on the link in post #1.

LOL… I was just going to test it and I get the same.

Crap - sorry. I messed up when renaming it. It should be sorted now…

Installed it. It did not seem to resolve the problem.
Email on the way.

This is looking really good so far! Only one functioning but dead node, but these devices have always been a bit fiddly. I see the same issue with my minimotes that Mark reported.