ZWave modules with multiple endpoints

Hello all,

I’m a new OpenHAB user and very enthusiastic about this piece of software (and I’ve tried several other OS home automation distro’s and some close source ones as well)…

Having said that, I’ve run into a small issue with my current OpenHAB (Openhabian, Raspberry Pi 3) installation. I would like to configure a zwave association to another zwave module and specify a different endpoint for the association. I’ve read in one of the other topics that this feature is apparently in the current ‘development’ branch but I’ve been unable to install the dev branch (v2.2?).

Is there anyway I can use to command console (karaf) to manually configure my zwave device to associate with a specific endpoint? Currently neither Habmin and PaperUI allow for a specific endpoint association, only the ‘main’ node

If there is another way anyone can think of, I’d be happy to hear it - I’ve got two separate modules in my network that I need to configure with a specific endpoint other than .0.

Hope I’m making enough sense for someone to point me in the right direction!

The dev version of the binding can be found here:

Uninstall the current binding using paperui or however you manage your plugins. Then drop the jar file in the addons folder to install the new one.

If habmin doesn’t let you do it you won’t be able to do it through the Karaf console. You can install and use a third party program like openzwave and see if one of those let you make the change.

Thanks for your advice and the link to the .jar; I couldn’t find the .jar file and thought I had to compile from source.

In the meantime I managed to accomplish some results using the REST API and configured the module manually. I’m not at home at the moment but I will post what I did to make it work for future reference and people stumbling on this post from Google.

The binding should make all endpoints available for selection. If the device supports multi channels, then it should list endpoints for devices that provide multiple channels. The binding will only list endpoints that have what I call user command classes (so switches, sensors etc).

This should be the functionality in all versions - it doesn’t require the development version. If this isn’t what you’re seeing (presumably it’s not) then please provide more information on your configuration (ie what the devices are).

Took me a while, but I finally managed to get openhab setup in eclipse with the development branch of the zwave binding.

With this version it is now possible to associate groups with endpoints other than 0. That is working nicely. Thanks!

However, my fibaros “FGS223 Double Switch”, Firmware 3.2 which work perfectly with the zwave master branch (with the exception, that I can’t set the association groups the way I want) expose lots of troubles with the development branch.

Devices I included using the master branch work more or less. Devices I included with the development branch only send updates for endpoint 0. switch_binary2 never sends any updates.

I can change the state of switch1 and switch2 by toggling them in habmin, but there as well switch1 show a strange behaviour: Often when I switch switch1 off, it actually does switch off, but then in habmin it is toggled back to on (physical switch stays off)

Switches I included with development branch would not work correctly if I switch back to master.

Chris, thanks for your reply - The device I’m trying to act upon via association is a ‘Fibaro FGS221 2x1.5kW Switch Relay’ with firmware version 1.6. This is a device with 2 physical relays that you can independently switch using a double paddle momentary switch. Also, via association you should be able to operate both relays independently by specifying either endpoint 1 or 2 depending on which relay you want to switch.

Using the latest (stable/master) OpenHAB build and the latest stable Z-Wave binding, only the ‘root’ endpoints show up under the association menu, and not the separate endpoints (I have more devices that support multiple endpoints). I’ve not yet been able to check out the development .jar of the Z-wave binding that you linked to since I’m away from home currently.

I have been able to manually change the associations by using the OpenHAB REST API to modify the device/thing configuration.

@QNimbus

I had the exact same behaviour with FGS223. Chris pointed out in another thread, that with the development version you can set the associations to any endpoint. That is working fine, but using the development version the device does no longer work well together with openhab.

Since the development version is going to be the new production version sometime in the future, we should probably get this sorted out. Would be interesting to know if your FGS221 work with the development version.

Could you give an example on how you set the associations using the REST API?

Thanks

Ok. I figured it out myself: Setting an association group through REST can be done like this:

curl -X PUT --header “Content-Type: application/json” --header “Accept: application/json” -d “{“group_2”: [
“node_12_1”
]
}” “http://192.168.1.7:8080/rest/things/zwave%3Adevice%3A0001%3Anode3/config

So using the master version and configuring association group through REST allows for a working setup.

But there remains still the question why devices added using the development version end up to be broken.
@chris any Ideas?

What does “broken” mean?

When I press the physical buttons, switch1 would update endpoint 0 and switch 2 doesn’t do anything in openhab.

Endpoint 1 and 2 never receive any updates. It’s just like the master version at the beginning of the year. I think you had fixed something there to make this work. Maybe that is missing in development.

The switches work fine if they were included using master, the problem only shows, if they were included using the development version.

I’d need to see a log to understand what’s happening.

This is not possible. Inclusion does nothing to the device configuration - maybe there’s something different during the initialisation though.

Really, more information is needed to understand this. It’s often the case for example that a device might use a different command class which might make it not work between versions, or something else. There are other discussions on this, but please provide logs to allow this to be investigated properly.

Thanks.

These zwave logs are huge. What is the best way to upload them. This website does not allow my to upload log file.

This is what I get, when I press switch 1 one time.

2017-08-11 16:07:00.120 [DEBUG] [rialHandler$ZWaveReceiveThread:315  ] - Receive Message = 01 09 00 04 00 02 03 25 03 00 D5
2017-08-11 16:07:00.120 [DEBUG] [rialHandler$ZWaveReceiveThread:191  ] - Response SENT 6
2017-08-11 16:07:00.120 [DEBUG] [.z.i.p.ZWaveTransactionManager:342  ] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=2, callback=0, payload=00 02 03 25 03 00
2017-08-11 16:07:00.120 [DEBUG] [.z.i.p.ZWaveTransactionManager:346  ] - processReceiveMessage past lock Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=2, callback=0, payload=00 02 03 25 03 00
2017-08-11 16:07:00.120 [DEBUG] [.z.i.p.ZWaveTransactionManager:373  ] - Received msg (0): Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=2, callback=0, payload=00 02 03 25 03 00
2017-08-11 16:07:00.121 [DEBUG] [.z.i.p.ZWaveTransactionManager:374  ] - lastTransaction null
2017-08-11 16:07:00.121 [DEBUG] [.z.i.p.ZWaveTransactionManager:416  ] - NODE 2: Application Command Request (ALIVE:DONE)
2017-08-11 16:07:00.121 [DEBUG] [.z.internal.protocol.ZWaveNode:500  ] - NODE 2: resetResendCount initComplete=true isDead=false
2017-08-11 16:07:00.121 [DEBUG] [.z.internal.protocol.ZWaveNode:1249 ] - NODE 2: Incoming command class COMMAND_CLASS_SWITCH_BINARY, endpoint 0
2017-08-11 16:07:00.121 [DEBUG] [.z.internal.protocol.ZWaveNode:872  ] - NODE 2: SECURITY NOT required on COMMAND_CLASS_SWITCH_BINARY
2017-08-11 16:07:00.121 [DEBUG] [.o.b.z.i.p.c.ZWaveCommandClass:241  ] - NODE 2: Received COMMAND_CLASS_SWITCH_BINARY V1 SWITCH_BINARY_REPORT
2017-08-11 16:07:00.121 [DEBUG] [.ZWaveBinarySwitchCommandClass:83   ] - NODE 2: Switch Binary report, value = 0
2017-08-11 16:07:00.121 [DEBUG] [b.z.i.protocol.ZWaveController:546  ] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-08-11 16:07:00.121 [DEBUG] [.b.z.handler.ZWaveThingHandler:1011 ] - NODE 2: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-08-11 16:07:00.121 [DEBUG] [.b.z.handler.ZWaveThingHandler:1020 ] - NODE 2: Got a value event from Z-Wave network, endpoint = 0, command class = COMMAND_CLASS_SWITCH_BINARY, value = 0
2017-08-11 16:07:00.121 [DEBUG] [.b.z.handler.ZWaveThingHandler:1196 ] - NODE 2: Updating channel state zwave:device:0000:node2:switch_binary to OFF [OnOffType]
2017-08-11 16:07:00.121 [DEBUG] [.z.i.p.ZWaveTransactionManager:428  ] - NODE 2: Commands processed 1.
2017-08-11 16:07:00.121 [DEBUG] [.z.i.p.ZWaveTransactionManager:431  ] - NODE 2: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@144ab29e.
2017-08-11 16:07:00.122 [DEBUG] [.z.i.p.ZWaveTransactionManager:495  ] - Transaction completed - outstandingTransactions 0
2017-08-11 16:07:00.122 [DEBUG] [.z.i.p.ZWaveTransactionManager:498  ] - Transaction completed - outstandingTransactions 0
2017-08-11 16:07:00.122 [DEBUG] [.z.i.p.ZWaveTransactionManager:358  ] - ZWaveReceiveThread queue empty
2017-08-11 16:07:00.122 [DEBUG] [.z.i.p.ZWaveTransactionManager:710  ] - Transaction SendNextMessage 0 out at start
2017-08-11 16:07:00.122 [DEBUG] [.z.i.p.ZWaveTransactionManager:741  ] - Transaction from controllerQueue
2017-08-11 16:07:00.122 [DEBUG] [.z.i.p.ZWaveTransactionManager:747  ] - Transaction SendNextMessage nothing
2017-08-11 16:07:00.261 [DEBUG] [rialHandler$ZWaveReceiveThread:315  ] - Receive Message = 01 0E 00 04 00 02 08 32 02 21 32 00 00 00 00 DC
2017-08-11 16:07:00.261 [DEBUG] [rialHandler$ZWaveReceiveThread:191  ] - Response SENT 6
2017-08-11 16:07:00.261 [DEBUG] [.z.i.p.ZWaveTransactionManager:342  ] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=2, callback=0, payload=00 02 08 32 02 21 32 00 00 00 00
2017-08-11 16:07:00.262 [DEBUG] [.z.i.p.ZWaveTransactionManager:346  ] - processReceiveMessage past lock Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=2, callback=0, payload=00 02 08 32 02 21 32 00 00 00 00
2017-08-11 16:07:00.262 [DEBUG] [.z.i.p.ZWaveTransactionManager:373  ] - Received msg (0): Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=2, callback=0, payload=00 02 08 32 02 21 32 00 00 00 00
2017-08-11 16:07:00.262 [DEBUG] [.z.i.p.ZWaveTransactionManager:374  ] - lastTransaction null
2017-08-11 16:07:00.262 [DEBUG] [.z.i.p.ZWaveTransactionManager:416  ] - NODE 2: Application Command Request (ALIVE:DONE)
2017-08-11 16:07:00.262 [DEBUG] [.z.internal.protocol.ZWaveNode:500  ] - NODE 2: resetResendCount initComplete=true isDead=false
2017-08-11 16:07:00.262 [DEBUG] [.z.internal.protocol.ZWaveNode:1249 ] - NODE 2: Incoming command class COMMAND_CLASS_METER, endpoint 0
2017-08-11 16:07:00.262 [DEBUG] [.z.internal.protocol.ZWaveNode:872  ] - NODE 2: SECURITY NOT required on COMMAND_CLASS_METER
2017-08-11 16:07:00.262 [DEBUG] [.o.b.z.i.p.c.ZWaveCommandClass:241  ] - NODE 2: Received COMMAND_CLASS_METER V3 METER_REPORT
2017-08-11 16:07:00.262 [DEBUG] [z.i.p.c.ZWaveMeterCommandClass:135  ] - NODE 2: Meter: Type=Electric(1), Scale=W(2), Value=0E+1
2017-08-11 16:07:00.262 [DEBUG] [b.z.i.protocol.ZWaveController:546  ] - Notifying event listeners: ZWaveMeterValueEvent
2017-08-11 16:07:00.262 [DEBUG] [.b.z.handler.ZWaveThingHandler:1011 ] - NODE 2: Got an event from Z-Wave network: ZWaveMeterValueEvent
2017-08-11 16:07:00.262 [DEBUG] [.b.z.handler.ZWaveThingHandler:1020 ] - NODE 2: Got a value event from Z-Wave network, endpoint = 0, command class = COMMAND_CLASS_METER, value = 0E+1
2017-08-11 16:07:00.262 [DEBUG] [.b.z.handler.ZWaveThingHandler:1196 ] - NODE 2: Updating channel state zwave:device:0000:node2:meter_watts to 0 [DecimalType]
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:428  ] - NODE 2: Commands processed 1.
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:431  ] - NODE 2: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@330f0191.
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:495  ] - Transaction completed - outstandingTransactions 0
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:498  ] - Transaction completed - outstandingTransactions 0
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:358  ] - ZWaveReceiveThread queue empty
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:710  ] - Transaction SendNextMessage 0 out at start
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:741  ] - Transaction from controllerQueue
2017-08-11 16:07:00.263 [DEBUG] [.z.i.p.ZWaveTransactionManager:747  ] - Transaction SendNextMessage nothing

When I press switch2, nothing is logged.

@schnidrig Sorry for my late reply - but your example of the REST API call is indeed what I did to get it to work. And since it’s a one-off thing to configure (in principle) this is a good solution for now.

I’m really strapped for time at the moment and not at home to test the ‘development’ version of the Z-Wave binding, but I will try it out as soon as I get home and see if I can provide valuable feedback as to what is or isn’t working.

Thank you both for your help and contribution towards this issue!

I did an additional test.

Devices that I add just with the z-stick (offline using it’s button) do not work either.
A device will work properly only is if it is added while connected to a zwave binding from master.

Here is a link to a log when I included node 6 using the master version of the binding.

Here a link to a log where I added node 7 using the development version.

Here are the resulting xml files. Node 6 is working, Node 7 is not.

network_cba087ab__node_7.xml (32.8 KB)
network_cba087ab__node_6.xml (33.6 KB)

@chris I hope this is the kind of logs you were looking for.