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

Privileges was the problem. Added them, rebooted, and v2.0.0 is now working…

Thanks for solving that problem. Now to start experimenting a bit. :wink:

Danny

1 Like

OK, I’m feeling really dumb right now, but I can’t figure out how to include a device into the network. Figured I’d get a button somewhere to allow me to do it, but I can’t find it anywhere in HABmin or in PaperUI…

You go to paperui,
click inbox
Click scan
It’ll ask which binding to use, click zwave
It’ll scan the zwave network for new devices, put your device in “inclusion mode” (search mode) it’ll then show device in inbox.

Note it’s important to scan from paperui first for “secure inclusion” which is for locks etc.

PaperUI works, but :nauseated_face:

Habmin> Configuration> Things> Discovery? Search? Magnifying glass (no tooltip)> Z-Wave Binding :+1:

I’m running a day old OH 2.2 snapshot and the latest 2.2 development version from the URL above. I’ve verified it’s running the jar and I deleted all my Z-Wave Things. My .things file looks like this:

Bridge zwave:serial_zstick:controller "ZWave Controller" [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", controller_inclusiontimeout=60, heal_enable="true", heal_time=2, security_networkkey="<REMOVED>", node_id=1 ]

Thing zwave:aeon_zw100_00_000:controller:node2 "Z-Wave Node 2: ZW100 MultiSensor 6" (zwave:serial_zstick:controller) [ node_id=2 ] {
Channels:
    Type sensor_binary : sensor_binary [ config_scale=1 ]
}

I see this in the error logs I can’t figure out why it’s not reading the node_id.

2017-10-09 13:13:20.653 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NodeID is not set in zwave:aeon_zw100_00_000:controller:node2

I checked the source and node_id seems to be the proper id. I did try zwave_nodeid and nodeid which I’ve seen in some examples.

I also wiped the entire JSON database to test, still complains about NodeID not being set. Any ideas? Thanks!

There are 3 different ZW100 in the database, depending on your firmware version you may need:

aeon_zw100_01_007 or
aeon_zw100_01_008

instead of aeon_zw100_00_000

Thanks for the suggestion I tried those but no difference. Really scratching my head as to why it’s not reading the ID.

The controller added fine and I can add the sensor from my inbox which works as expected but defining the sensor in the .things file gives me this.

I just tried adding another device, it gives me the same NodeID error:

Thing zwave:aeon_zw095_0_0:controller:node4 "Z-Wave Node 4: ZW095 Home Energy Monitor Gen5" (zwave:serial_zstick:controller) [ node_id=4 ]

Does ZW095 Home Energy Meter - Gen 5 work?

needs to be aeon_zw095_00_000

Find your device in the database, click on “Export” … “openHAB 2”, there you will find the correct syntax.

Yes it works fantastic if I add it through the Paper UI.

Thanks for the tip – I was wondering how to get that.

I made the modification I still get the same error.

2017-10-09 16:09:18.969 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NodeID is not set in zwave:aeon_zw095_00_000:controller:node4

I tinkered around with manual things file for a while but got rid of it because PaperUI configured things work great, not only for the zwave binding. And the configuration in the json db is backed up automatically. What more could we wish? :grinning:

Paper UI isn’t great for complex setups yet. Also not every binding has migrated. There is also the use of version control (Git) to manage changes. Still, if this is broken I’m happy to figure out what’s going on. I may try rewinding to older snapshots of the zwave dev build but that will require me building it from scratch guess I should get started on that… Thanks for the help!

This is an excerpt from my former - working - things config, maybe it helps:

Bridge zwave:serial_zstick:controller "Z-Wave Serial Controller" [ port="/dev/ttyACM0", controller_softreset="false", controller_master="true", controller_inclusiontimeout=60, heal_enable="true", heal_time=2, security_networkkey="whatever" ]
Thing zwave:popp_004001_00_000:controller:node10 "Z-Wave Node 10: 004001 Smoke Detector and Siren" (zwave:serial_zstick:controller) [ node_id=10 ]
Thing zwave:fibaro_fgrm222_24_024:controller:node11 "Z-Wave Node 11: FGRM222 Roller Shutter" (zwave:serial_zstick:controller) [ node_id=11 ] {
Channels:
Type blinds_control : blinds_control [ config_invert_percent="true" ]
}

Thanks it does not my configs are the same. I’ve started building the zwave binding from scratch rewinding using Git. I went back a week with no luck I’ll go back a month if it works I’ll bisect.

My guess is that the problem isn’t in the binding (but I could be wrong). I’m pretty sure that people are using this at the moment, and if I check the code, the reading of the node_id is the first real line of code in the initialise method. If you have the compiler running, it should be pretty obvious if it’s working by setting a breakpoint on that line and checking the config.

Good luck :slight_smile: .

OK I’ll try running it under a compiler. Can you give me a tip on what line to break at? I’m not suggesting it’s your binding that’s the issue but at the end of the day the ID isn’t being read which is what I’m trying to debug. :slight_smile: I’ll hack away at it tomorrow I’ve got no issues going deeper into this just looking for tips…

Also, the comments I’ve seen for people running it in this way was before the addition of being able to modify config items via the paper UI when configuring via text. From what I have found anyway. This is why I asked on here as I found no examples of anyone making this work since the major changes have happened. I’ll look into it deeper tomorrow thanks for the feedback!

Nope. You have an additional node_id=1 in your bridge config.

Look in the ZWaveThingHandler - right at the top is the initialize() method, and almost the first line is the line that reads the node ID from the configuration.

Remember as well that the binding doesn’t read the config files - it gets the configuration from the system so the binding doesn’t know if the configuration comes from the config file, or PaperUI/HABmin configuration.

No - there are people using the new system. OH2 was never able to configure things with text files until this version. See also this thread -:

OK, So I installed Eclipse and used remote debugging. I set a breakpoint where it requests the NodeID. After that I went and observed the thing that was returned. In the properties array I found the node_id value and it’s correct at ‘2’. Yet, the NodeID value in the zwave plug-in is null.

I will look into this more but it seems your initial thought about the bug being in OpenHAB was correct. I will probably try to get an older snapshot of OH to see if it works I’ll first play around with this a bit since I have it open.

Update: It was an OH bug, I went to jfrog and got the oldest snapshot dated 2017-10-05 (openhab-2.2.0-20171005.012724-78.zip). If I have time I’ll hop back into the debugger and see if I can figure out what’s different.