Testing Z-Wave binding on openHAB-2

Hi mishakim,
By browsing your posts, I found that I used the same dsc06 appliance switch as you, my controller is aeon lab zstick S2.
However, I am curious what e2e1b51e is in you zwave:aeon_dsc06_00_000:e2e1b51e:node5. Is it your homeid?
Or is it something critical in the configuration files, meaning .sitemap, .items, .things?

Actually, I can not manage to send swich binary command to the DSC06 applicance switch.
I spend so much time to tune my configuration file syntax. I paste them below,

.sitemap,
Switch item=zstick
Switch item=Z_socket1

.items,
//Switch zstick ā€œaeon zstickā€ { zwave=ā€œ1:command=switch_binary,refresh_interval=10000ā€ }
Switch zstick ā€œaeon zstickā€ { zwave=ā€œ1ā€ }

Switch Z_socket1 ā€œLiving Roomā€ (Lights) { zwave=ā€œ7:command=SWITCH_BINARYā€ }
//Switch Z_socket1 {channel=ā€œzwave:aeon_dsc06_00_000:1:Switchā€}
//Switch Z_socket1 {channel=ā€œzwave:device:1:node7:Switchā€}

I try all commented line, none of them work, including the un-commented lines.

.things
zwave:serial_zstick:1 [port="/dev/ttyUSB0"]
zwave:aeon_dsc06_00_000:1 []

I believe I may make a mistake in the configuration files syntax which may be trivial to you.
Can you shed some light for that?
Thank you very much.

For your reference, I have more detailed post here.

Please note that with the latest Z-Wave binding, you will need to update to the very latest OH2 snapshot. This is because I made some modifications to some ESH core features that are used by the binding for updating configuration status information (Iā€™ll post more on that later though).

Chris

1 Like

This is the controller (or bridge in ESH terms) reference. Itā€™s normally just a random number.

Iā€™m not sure how much I can help at this point, my systemā€™s been running stably on an old build for the last couple of weeks, as I havenā€™t had time to tinker and what I need to work is working. That means Iā€™m actually on a quite out-of-date build, predating some pretty big changes. Looking over your post, two things I can say are that I donā€™t have the binding part (the curly braces ) in my .items files, I just have the name, label, group, etc., and let PaperUI assign the channels to the items, and I donā€™t have an item or sitemap entry for the stick, Iā€™m not even sure what that would do. I also donā€™t have a .things file, I didnā€™t even know that was an option.

No Problem :slight_smile:
Looking forward to it and test the devolo Motion Sensor once itā€™s in the binding

chris, thank you for your information.

As you instructed, I download the almost latest SNAPSHOT #205. I still could not see my web GUI opearation can be directed to zwave binding, even though I open DEBUG switch for org.openhab.binding.zwave.

Moreover, I see you may be interested in openhab.log.

2016-03-25 17:10:01.081 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 1: Node found
2016-03-25 17:10:01.082 [INFO ] [age.SerialApiGetInitDataMessageClass] - NODE 7: Node found
2016-03-25 17:10:01.082 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller using Controller API
2016-03-25 17:10:01.083 [INFO ] [age.SerialApiGetInitDataMessageClass] - ZWave Controller is Primary Controller
2016-03-25 17:10:01.083 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------
2016-03-25 17:10:01.083 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 2

2016-03-25 17:22:29.219 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 7: Timeout while sending message. Requeueing - 0 attempts left!
2016-03-25 17:22:29.219 [ERROR] [l.serialmessage.SendDataMessageClass] - NODE 7: Got an error while sending data. Resending message.
2016-03-25 17:22:29.237 [INFO ] [nitialization.ZWaveNodeStageAdvancer] - NODE 7: SECURITY_REPORT not supported, proceeding to next stage.

2016-03-25 17:12:21.825 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ā€˜Z_socket1ā€™ received command ON
2016-03-25 17:12:21.827 [INFO ] [marthome.event.ItemStateChangedEvent] - Z_socket1 changed from OFF to ON

Hopefully you have some idea and shed some light on me?
Thank you very much.

I found a problem with Z Wave things. If the same thing (for e.g a fibaro wall plug with node id 23) is excluded and paired again with the Z Wave controller, and we get a new node id 24, Node id 23 is still shown as online.
Shouldā€™nt the old node id take a state other than online when it is paired again.

Hi Ramasamy,
Yes - you are right - Iā€™ll take a look at why this didnā€™t show offline. This might be an issue where the zwave protocol layers donā€™t know about the device, so we donā€™t get any notifications to show the device isnā€™t thereā€¦

Chris

1 Like

After updating OH today, I am unsuccessful getting binding to accept my things, it appears. Was there a change in configuration that I missed, or is this something to do with security?

14:58:08.059 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'beckasinen.things'
14:58:08.095 [INFO ] [smarthome.event.ThingAddedEvent     ] - Thing 'zwave:serial_zstick:controller' has been added.
14:58:08.109 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key zwave:serial_zstick:controller in ManagedThingProvider, because it does not exists.
14:58:08.109 [WARN ] [.core.thing.binding.BaseThingHandler] - Error while applying configuration changes: 'IllegalStateException: Could not update thing zwave:serial_zstick:controller. Most likely because it is read-only.' - reverting configuration changes on thing 'zwave:serial_zstick:controller'.
14:58:08.110 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:controller' changed from UNINITIALIZED to INITIALIZING
14:58:08.110 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'zwave:serial_zstick:controller': java.lang.IllegalStateException: Could not update thing zwave:serial_zstick:controller. Most likely because it is read-only.
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Could not update thing zwave:serial_zstick:controller. Most likely because it is read-only.
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_74]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_74]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:179)[88:org.eclipse.smarthome.core:0.8.0.201603242116]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:72)[88:org.eclipse.smarthome.core:0.8.0.201603242116]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:56)[88:org.eclipse.smarthome.core:0.8.0.201603242116]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7.run(ThingManager.java:641)[94:org.eclipse.smarthome.core.thing:0.8.0.201603242116]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_74]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_74]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_74]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_74]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_74]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_74]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_74]
Caused by: java.lang.IllegalStateException: Could not update thing zwave:serial_zstick:controller. Most likely because it is read-only.
        at org.eclipse.smarthome.core.thing.internal.ThingManager$1.thingUpdated(ThingManager.java:227)[94:org.eclipse.smarthome.core.thing:0.8.0.201603242116]
        at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.updateConfiguration(BaseThingHandler.java:398)[94:org.eclipse.smarthome.core.thing:0.8.0.201603242116]
        at org.openhab.binding.zwave.handler.ZWaveControllerHandler.initialize(ZWaveControllerHandler.java:108)[160:org.openhab.binding.zwave:2.0.0.201603260202]
        at org.openhab.binding.zwave.handler.ZWaveSerialHandler.initialize(ZWaveSerialHandler.java:76)[160:org.openhab.binding.zwave:2.0.0.201603260202]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:644)[94:org.eclipse.smarthome.core.thing:0.8.0.201603242116]
        at org.eclipse.smarthome.core.thing.internal.ThingManager$7$1.call(ThingManager.java:1)[94:org.eclipse.smarthome.core.thing:0.8.0.201603242116]
        at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:170)[88:org.eclipse.smarthome.core:0.8.0.201603242116]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_74]

I can hazard a guess at what is causing thisā€¦

I added some code to set some default configuration if it wasnā€™t already set. However, because youā€™re using a text file to configure the things, it throws an error :frowning:. I guess if you try setting any configuration on these statically defined things, the same thing happens?

Iā€™m not sure how best to handle this - I guess this stops the system working? To avoid this, I think you can set the network key in your text fileā€¦

Chris, I dontā€™ know much about the things file, how should it look like? zwave is totally absent after this error, so it would be nice :slight_smile: to get this part workingā€¦

Hereā€™s my simple things config:
Bridge zwave:serial_zstick:controller "Z-Wave Serial Controller" [ port="/dev/ttyACM0" ]

Edit: Oh, and how do I find my network key?

Unfortunately, you know more about it than me as Iā€™ve never used it in OH2 so Iā€™m not sureā€¦ I would suggest trying adding the following -:

security_networkkey="00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF"

OK, I tried adding that in various places in the things file, but could not get it to do any difference. I have tried to find some information about security in openhab 2/things file but without any success.

How do you perceive the future for this, i.e. are there any chances for my .things configuration to start working again, or is this non-security set-up not being part of the future?

If I let habmin create the bridge-thing, the binding starts up, but now of course my .items file are not working anymore.

My assumption, given itā€™s a configuration of the thing is the following (but itā€™s a guess) -:

Bridge zwave:serial_zstick:controller "Z-Wave Serial Controller" [ port="/dev/ttyACM0" security_networkkey="00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF"]

Itā€™s nothing to do with openhab 2 configuration - itā€™s a zwave security configurationā€¦

@kai - any comments on how we should handle a case where the binding updates some configuration, and the thing is stored in the thing file? I can trap this exception and log the error, but Iā€™m not sure that itā€™s something the binding should be concerned with and maybe itā€™s better if this is already handled like this in the updateConfiguration method?

Why not? they should work if you use the same thing name for the controller shouldnā€™t they?

Yes, this did not do it either.

I guess, if I knew how to change the thing name in habmin (is this possible?). Or do you mean that I do a search/replace in the item file, with the new controller name?

When you create the thing, just type in the id -:

http://www.cd-jackson.com/index.php/openhab/habmin

OK, so I am officially blind.

So after doing this, I got the nodes, but they where stuck in initiating, so Iā€™m now re-adding (creaing things) my network.

Thanks

@chris

i updated
http://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-list/devicesummary/290

manually ā€¦ could you add it to the binding?

Will doā€¦

Tomorrows release will bring a new feature - the provision of a ā€œpendingā€ flag. This will print an orange ā€œpendingā€¦ā€ badge next to any configuration that has not been confirmed with the device. For mains powered devices, you may not notice the pending badge at all unless you update a number of configuration parameters at the same time - or it may flash up for a very short timeā€¦

For battery devices, it will linger around until the device wakes up - once the data has been written, and read back, the pending flag gets removed. You can see an example of this belowā€¦

This feature uses some new features in ESH, so you need to be running a version of OH2 from within the last day or so.

This feature is attached to configuration, associations, and a number of other configurations - if you spot any inconsistencies, please let me knowā€¦

One point to note is that if you restart OH while data is pending, then there will be a mismatch between the device and what you see in the GUI. I might add some sort of flag here as well - letā€™s see how it goes firstā€¦

The other main addition in the past day or two is to add interfaces for setting Door Lock configuration - including setting codes and timeouts.