Testing Z-Wave binding on openHAB-2

I understand we can include zwave device by device discovery by thing configuration page and search button on the top.

By is there any entry in Habmin which can do the zwave device exclusion?
Thank you.

.items
Switch Z_socket1 “Living Room” (Lights) { channel=“zwave:device:153bea5a84f:node8:switch_binary”}

I can manage to switch the zwave device status as ON or OFF by switching the Z_socket1 item on web interface sitemap.

However, when the push the button on that zwave device.
The Z_socket1 item does NOT show any change on web interface sitemap.

Although I see the log

2016-03-29 17:41:14.007 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 13 00 49 84 08 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 5C 
2016-03-29 17:41:14.008 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-03-29 17:41:14.009 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 13 00 49 84 08 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 5C 
2016-03-29 17:41:14.009 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 13 00 49 84 08 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 5C 
2016-03-29 17:41:14.010 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationUpdate[0x49], type=Request[0x00], priority=High, dest=255, payload=84 08 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 
2016-03-29 17:41:14.010 [DEBUG] [essage.ApplicationUpdateMessageClass] - NODE 8: Application update request. Node information received.
2016-03-29 17:41:14.010 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent message Message: class=SendData[0x13], type=Request[0x00], priority=Set, dest=8, payload=08 03 25 01 00 
2016-03-29 17:41:14.010 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv message Message: class=ApplicationUpdate[0x49], type=Request[0x00], priority=High, dest=255, payload=84 08 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 
2016-03-29 17:41:14.011 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationUpdate, callback id=10, expected=SendData, cancelled=false      MISMATCH

Is that normal? Or is there some operation we can do to make the item on sitemap to show the zwave device status change? As Application update is already in the zwave DEBUG log.

Thank you.

[SOLVED] it did update. However, take 10 minutes for me. And I think it is the issue of device side instead of openhab side.

I’d suggest that you search the forum, or post other messages. This thread is about testing the OH2 binding - more general issues about setting up sitemaps etc should be asked elsewhere.

Thanks
Chris

Yes - select the controller, look in the tools menu, select ‘Advanced’, and you will find an exclusion option in the menu.

Ok. I got your point. Thank you.

Hi chris, thank you for instructions.

I follow your instructions, and I think it did exclude zwave device.
But I could not find any demonstration for the exclusion on the Habmin.
1 On zwave network, the node is still green instead of red.
2 on thing->thing configuration, the node is still there with blue tick.

Is there any way to see zwave device exclusion from the network in Habmin, meaning something change accordingly?

Another problem is that after exclusion the device, they are still in thing->thing configuration with blue tick. And then next time I do device discover/inclusion mode ->push zwave device button -> Habmin plug icon top right corner -> add thing. The result is in thing->thing configuration, multiple things there are for only one zwave device.
I know I can delete old thing in thing->thing configuration manually. But it is the way we supposed to do that?Or there is some intelligent way to do that automatically, meaning that when I exclude a zwave device, the related thing in thing->thing configuration will somehow change accordingly.

Thank you.

Yes - you need to manually remove the thing after you have excluded - this is by design in ESH (see here). In the next version the thing will be marked as removed once it is excluded, but you will still need to delete it manually.

Chris, thank you for explaining. It is very clear.

For the ESH, I am a little bit confusion.
Is the message below is what you want me to see?
As in message 482, only exclusion is mentioned instead of removing things.

You are right, my answer did not fit well on 
how ZWave works, where you need to set the controller to an exclusion 
mode in order to unpair devices.

I think this behavior is pretty specific for ZWave, hence I would not 
want to add it as a general concept in the API. The easiest solution is 
probably to have a "mode" channel on the controller, where the user can 
manually set the exclusion mode - while in this mode, he can unlearn his
 devices.

Another issue for me is that if I include, then exclude, and then again include a zwave device. By adding thing, there would be two things, let’s say thing A and thing B. For the node Id, say node Id is 8 for A and 9 for B.

As in configuration, we do need to link thing channel to a item in sitemap.
So as every time a different thing is included for a same zwave device, that means we need to do the linking between thing channel and item every time inclusion in thing->thing configuration->specific thing->channels.

That also means, we could not live with a stable configuration. Instead, we need to do linking configuration as frequently as the inclusion.

That’s by my understanding what we can do.
My question is, is that necessary way to do for this multiple time inclusion issue? Or is there some better way to do that?

Thank you.

I would generally recommend NOT doing this. No matter what way this is handled, you will need to update all the items since the channel name will change. So, you will for sure need to do some housekeeping if you are going to do this.

As above - this is unavoidable.

Chris, thank you for your message.

I think channel should be thing. Am I right?

By housekeeping, do you mean that every time inclusion, I should record the thing name, and then next time inclusion I can find the old thing name in my record and delete that thing?

Thank you.

No - I mean the channel name (UID to be more correct) will change.

By housekeeping, I mean that if you want to include and exclude devices, then you are going to have to go around and make changes to your configuration. I’d really recommend not doing this - it shouldn’t be necessary.

Chris, thank you for your clarification.

For UID you mentioned, I am confusing. for example,
ThingUID uid = new ThingUID(THING_TYPE_DEVICE, ip.replace(‘.’, ‘_’) )
It can be a ThingUID here.
Are you talking about something else by UID?

you say channel name, do you mean zwave:device:153bea5a84f:node8:switch_binary?
for example,
Switch Z_socket1 “Living Room” (Lights) { channel=“zwave:device:153bea5a84f:node8:switch_binary”}

Ok. Now I know you recommend only one time inclusion instead of multiple times and multiple time is not necessary.

Thank you.

Yes - the channel UID.

I think it is probably worth you trying to familiarise yourself with ESH and the system in general. This thread is meant to be related to testing the ZWave binding so I really don’t want to turn it into a tutorial on what (relatively little) I know about ESH :wink:. I’d suggest that maybe you should ask the more general questions in another thread, or even on the ESH forum?

I can manage to switch ON/OFF zwave switch device and it will update on switching Z_socket1 item on web GUI.

However, it seems it takes a long time. Yesterday one time experiment, it takes 10 minutes for my Switch item Z_socket1 to update in web GUI.

Here is the DEBUG log which show almost immediately after pushing button on zwave switch device,

2016-03-30 12:27:12.131 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 13 00 49 84 09 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 5D 
2016-03-30 12:27:12.132 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2016-03-30 12:27:12.133 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 13 00 49 84 09 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 5D 
2016-03-30 12:27:12.133 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 13 00 49 84 09 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 5D 
2016-03-30 12:27:12.133 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationUpdate[0x49], type=Request[0x00], priority=High, dest=255, payload=84 09 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 
2016-03-30 12:27:12.133 [DEBUG] [essage.ApplicationUpdateMessageClass] - NODE 9: Application update request. Node information received.
2016-03-30 12:27:12.133 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent message Message: class=SendData[0x13], type=Request[0x00], priority=Set, dest=9, payload=09 03 25 01 00 
2016-03-30 12:27:12.134 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv message Message: class=ApplicationUpdate[0x49], type=Request[0x00], priority=High, dest=255, payload=84 09 0D 04 10 01 25 31 32 27 70 85 72 86 EF 82 
2016-03-30 12:27:12.134 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationUpdate, callback id=92, expected=SendData, cancelled=false      MISMATCH

Can some expert shed some light for this problem?
Or it is just normal/common situation?
Thank you.

Chris, thank you for your message for channel UID.
I am sorry for my trivial question.

I understand the purpose of this topic. I did have some difficulty for understand for some word. But “channel UID” is good/clear enough for a novice like me. I mean, sometimes I do have some mind for your statement, but just not quite sure, so a simple confirmation is something I really appreciated.

Thank you.

I do a couple times of experiment to control zwave switch device by SWITCH item on web GUI.

The time is really long in comparison to zwave protocol time, about 20ms.

Here is some record. (start time/end time)
13:10:39/13:10:50
13:11:28/13:10:50
13:10:47/13:10:51
13:13:19/13:13:21
13:14:06/13:14:22

Start time is I switch the SWTICH item on web GUI, end time is the speaker connected to zwave switch turned ON off, almost the same as zwave DEBUG log time. So most of the time is within in openhab instead of zwave binding.

Can some expert shed some light on how to shorten the time cost by openhab? Thank you.

No - it’s not normal to wait 10 minutes to update the GUI. I can’t tell much from the very short log you’ve provided, but maybe you haven’t set associations or something - I’m not sure. I would say if it’s taking 10 minutes, then its probably updating due to polling.

Maybe it is better for you to use the OH1 binding for now while you get to grips with ZWave in general. At the moment I fear you’re struggling with getting your system running while at the same time having to work with new software, so it’s hard to know if the problem you’re having is getting your system up, or a problem with ESH…

I think if I was you I would start with OH1 where there is a more stable codebase, and more people who can help. Your problem may also be to do with the device you’re using - again, someone should be able to help if you post a message with the information on your system.

Chris, thank you very much for your message.

Sorry, I post my full log here.

debug log here,

Yes. I haven’t set association.
However, after seeing your message, I go to thing->thing configuration->zwave node9 dsc06 smart energy switch->association->1.status report->openhab controller

Everytime, I click save, it show “error saving thing zwave node9 dsc06 smart energy”.

on the log, I only see

2016-03-30 15:07:40.510 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 9: Configuration update received

Do you have some idea of this problem?

Thank you for your advice. I think I may move to OH1 and OH1 zwave binding later. But for now, I really have no time to move to a new platform after spending some time on OH2. I actually have no much idea how much difference between OH1 and OH2.
Anyway, by your message, I know OH1 would be another option. Thank you, though.

This is a known issue and will not be fixed until this code change trickles its way into openHAB2: Fix config validator so it handles multiple selection values by cdjackson · Pull Request #1281 · eclipse-archived/smarthome · GitHub

Thank you for your message and link, xsnrg.

But as replied before by @chris and I also search in forum, it seems I am supposed to use association to update device(my DSC006 smart enegy) to controller.

If this is an not fixed issue, does that mean I could not set association for this device in Habmin2?
If so, what way do you recommend to set association this device (DSC006)?

Thank you.