Testing Z-Wave binding on openHAB-2

This is caused by the database change - I’ve updated the database and this will be fixed in the next release (probably a few days due to waiting for some ESH changes).

Please let me know what the other problem is and I’ll look into that too…

Cheers
Chris

hi @chris
any tips for me about that database copy config issue?

Not yet, sorry. I’ll look at this tonight or tomorrow (I wasn’t around last night)…

Cheers
Chris

The problem with the other issue is that I noticed a change in meter readings. For instance a small appliance started reporting 10’s of kWh’s every hour whereas before these would report like a factor of 100 less (less than 1 kWh’s).

It might have been caused by me messing around with InfluxDB persistence so I need to double check to see if can reproduce with a clean setup and capture the logs. I’ll just ignore all the debug messages you mentioned below.

Hmmm - I can’t really see that anything I’ve changed will have changed meter readings by 100W :confused:

I just manually decoded the message in your log, and the device appears to be reporting 0.026, and the binding is decoding this value correctly. In the above, the 64 is the scale value, and (the 6 gets shifted to mean divide by 3), and the 1A is the value (26), so 26/3 = 0.026…

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?