Runtime-Problem? ZwaveThingHandler does not see zwave_nodeid="2" from things config-file

My Testsetup consists of a Z-Stick (Gen 5) and a Multisensor (Node 2). I try to define both in the file config\things\default.things as follows:

Bridge zwave:serial_zstick:controller [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16" ]
Thing zwave:device:controller:mynode2 (zwave:serial_zstick:controller) [ zwave_nodeid="2" ]

The bridge comes up properly and autodiscovers the node 2 while the second line fails, because the parameter zwave_nodeid is not seen in ZWaveThingHandler.initialize(), resulting in the following errorlog-message:

[ding.zwave.handler.ZWaveThingHandler] - NodeID is not set in zwave:device:controller:mynode2

I must admit, that I am not sure, if the the configuration syntax for the Thing is correct. Therefore I tried alternatively the following Thing definition without success:

Thing zwave:device:controller:mynode2 (zwave:serial_zstick:controller) [ zwave_nodeid=2 ]

I tested it versus 2.0.0b3 and yesterday’s nightly build.

Any help is appreciated,

brstein

Addendum: I also tested the following alternative configuration syntax according to http://www.eclipse.org/smarthome/documentation/features/dsl.html#defining-bridges:

Bridge zwave:serial_zstick:controller [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", heal_enable="true", security_networkkey="01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16" ] {
   Thing device mynode2 [ zwave_nodeid="2" ]
}

which results again in

[ding.zwave.handler.ZWaveThingHandler] - NodeID is not set in zwave:device:controller:mynode2

Addendum 2: It seems that the Thing-parameters in [ ] are not provided to the initialize() method of

org.openhab.binding.zwave.handler.ZwaveThingHandler

if coming from a conf/things/xxx.things-File. The following snippet is from the intitialze() method of ZWaveThingHandler which outputs the above mentioned error:

String nodeParm = this.getThing().getProperties().get(ZWaveBindingConstants.PROPERTY_NODEID);
if (nodeParm == null) {
  logger.error("NodeID is not set in {}", this.getThing().getUID());
  return;
}

If those parameters are provided from the database (which is the case if the Thing is added with PaperUI) everything works fine. Therefore I conclude, that this could be a runtime problem.

All config files from above seem to comply with the xtext-definition for Things, found in:

/smarthome/bundles/model/org.eclipse.smarthome.model.thing/src/org/eclipse/smarthome/model/thing/Thing.xtext

Your Help is appreciated.

This problem is processed as an issue at https://github.com/openhab/org.openhab.binding.zwave/issues/153 . Please look there for further information.

Regards,
brstein.

So… has this been resolved, I am getting the same error, issue on github in a closed state…

Yes, as per the issue linked directly above, manual thing configuration has been implemented, and is available in the development branch of the binding (ie not the main branch) at this time.

Oh… I see, how can I install dev branch?

See this thread -:

The first few messages provide the instructions. Just be aware that it is a large change from the current binding and you’ll need to reconfigure everything. I guess this isn’t a problem if you’re planning on changing the configuration anyway…

1 Like