Best practices for z-wave?

Hi,

I am stuck in a 50% working z-wave solution and that is frustrating.
The controller is a Razberry 2 card (mounted to a Raspberry Pi 3)
I am running openhabian stable and the stable 2.3 z-wave binding. I don’t need secure inclusion so I have not dabbled with a newer z-wave binding.

I have about 60 physical devices and the network is quite stable and responsive. Even if I control things using HomeKit, stuff just works more or less instantly. So, all is well there.

But, post inclusion I am having grave trouble trying to get feedback from devices to work like it should. Many of my devices are not set up with the openhab controller in the lifeline group. I have set devices up using PaperUI, but it does not matter if I try to set the association in Paper UI or in habmin. I can set the association, but it will not stick.

Not even if I put the controller really next to the device that I need to fix, I am able to set associations. This means that I cannot get rules to fire when a device is turned on because the device will not tell the controller that it has been turned on. And, HomeKit will tell the wrong status of devices. So I am basically having the functionality of a 433MHz system right now, which works kind of but not the way it should really.

How should you go about to set up a z-wave network using openhab so that you don’t find yourself in this issue or something similar?

There are other reasons to use the new binding. It’s faster, more reliable, and the network heal every night helps with the stability of the network.

Are you drawing this conclusion from the appearance of the Lifeline association in the UI? If so, there is a bug in the UI control that doesn’t display the association correctly, or at all sometimes. It’s a bug in the underlying UI library, and there is no easy fix for it.

If the association is truly not being set, you could put the binding into DEBUG mode, then post the log of when you set the association so that we can see what’s actually happening.

BTW, are these battery-powered zwave devices, or are they mains-powered? It matters because the battery-powered devices need to wake up (or be woken up manually) in order for the configuration change to be sent to the device.

I’m sorry if you know all this already, but your level of zwave knowledge is not clear from your post.

Sorry to invade… there’s currently this thread Roadmap to Happiness - What is missing in the core framework and this one issue definitely should be high on the list.
@chris I remember even you complained about that.
But is it clearly identified and are the ESH developers really aware of this ? Did anyone file an ESH issue we could reference ?

No worries. You make a good point about this. It keeps coming up over and over…

One area of misunderstanding for me… Is the same UI widget used in both HABmin and PaperUI?

No - it’s different. The one in HABmin is this -:

I think the one in PaperUI was written by DT as part of PaperUI itself (I think I saw something from Henning at one stage saying he wrote it).

Thank you for you replies,

No, I also get no log entries when I flick a physical switch, so it seems that I really don’t have the associations set.

I would suggest to move to a more recent binding than 2.3 - this is quite old now and there have been a lot of changes. Before we spent any real time looking at your problem, you would need to upgrade to 2.4 M4 or M5.

Ok, I will do that and report back results.

Upon just starting with this (maybe I am confused by my previous OH 1.x experience, long time ago) but how do you actually get a not yet official release of a binding into the system?

I downloaded the M5 release (just released) as a tar file, repackaged it into a jar (which I suspected that I needed to do), uninstalled the 2.3 version of the binding and placed the 2.4 M5 version as a file org.openhab.binding.zwave.jar in /usr/share/openhab2/addons/ of my openhabian installation. And then I restarted openHAB.

No z-wave. What do I need to do? Is there something magical I need to do with the jar file?

You should just need to go to the addons section in PaperUI and install the binding.

Sorry for the simple question, but I am really not getting the binding to be seen by openhab.

I placed it in /usr/share/openhab2/addons/ :

$ ls -al 
totalt 4564
drwxrwxr-x+ 2 openhab    openhabian    4096 okt 30 19:03 .
drwxr-xr-x  4 openhab    openhab       4096 jun 30 22:13 ..
-rw-rw-r--  1 openhabian openhabian 4659614 okt 30 07:39 org.openhab.binding.zwave-2.4.0.jar
-rw-rw-r--  1 openhab    openhabian      70 maj 28 10:33 README

but all I am seeing is the option to install the 2.3.0 version.

Sorry for asking the silly questions, but please enlighten me on how to name the jar file and where to place it in an openhabian installation. According to the README file, I really think it is placed in the correct location. But something is still not working correctly.

It looks like you are running OH 2.3. You can upgrade to the OH M5 milestone build through the openHABian config menu. I am not familiar with openHABian, but I know this has been discussed in the forum, and may also be in the documentation. Once your OH is upgraded, the latest zwave binding will be available to install through Paper UI.

It is possible to install bindings by putting the jar into /addons/, but when you do, you will not see it listed in Paper UI. I have built a script to help in manually installing the binding, but you’ll also find steps for performing the manual install yourself, including the location to download the latest snapshot build of the binding.

Once installed, you will need to add the controller Thing, which will then add into the Inbox all of the nodes that it is aware. Hope this helps!

If you placed the jar in the addons folder it should have become active already, but as @5iver correctly states that won’t be shown in PaperUI. Use ‘bundle:list|grep -i zwave’ in Karaf console to see if it’s running.
But I’d suggest moving to the M5 milestone as well, then you should be able to use PaperUI to deploy it.

Ok , I get that I need to move to M5, but this step scares me to be honest.

Will I have to recreate all my things in order to change binding version? No offense, I realize that this must be a good reason behind this requirement, but I would lie if told you that I was looking forward to a process of adding all things again.

There is a script - does it work?
(What will fail?)

The nodes don’t need to be excluded/included again. Just delete the Things and rediscover them. Not painless, but also not too bad.

The need to do this was driven by a major redesign/restructure of the zwave binding in order to implement security. But, in addition to security, there’s also plenty of good stuff in the new version – faster, more reliable, nightly healing, UoM, etc.

I didn’t use @5iver’s script, but those who did use it found it very helpful.

We’ve all be through the transition, so there’s plenty of people who can help out if you run into trouble.

Things are new to OH2, and are not the actual zwave devices. As Mark pointed out, this does not mean excluding and reincluding every device. Chances are good that you haven’t even configured any of them, though there is some configuration that could be done… like polling interval. To clarify a little further, these configurations are specific to OH and are not the actual device configuration parameters which are stored in the devices. Those stay where they’re at.

If you haven’t changed any of the Thing configs, then there should be no issue to just delete them and then kick off a Z-Wave discovery to add them to the Inbox, and then approve them to get everything back the way it was. For ~20 devices, just do it manually. It’s a few clicks each. More than that, then you will probably appreciate the script. Worst thing that can happen with the script is that it doesn’t work, and you need to do it manually. Always good to have a good backup though!

Just give a shout if you have questions or run into trouble!

Yes, trouble. I don’t know what to say, because I realize of course that sometimes you need to break things in order to make it better. But, if 2.4.0 is to become a stable release, and people that then upgrade from 2.3 thinking it will be safe to upgrade, they will be disappointed I think. If you are a serious user of z-wave for your home.

After switching to M5 and running the script I now have this list of Things:

zwave:serial_zstick:edde6877 (Type=Bridge, Status=ONLINE, Label=Razberry 2, Bridge=null)
zwave:device:edde6877:node52 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 052, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node51 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 051, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node50 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 050, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node13 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 013, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node57 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 057, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node12 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 012, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node56 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 056, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node11 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 011, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node55 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 055, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node10 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 010, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node54 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 054, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node9 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 009, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node49 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 049, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node48 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 048, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node47 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 047, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node6 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 006, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node5 (Type=Thing, Status=UNINITIALIZED (HANDLER_CONFIGURATION_PENDING), Label=Z-Wave Node 5: FGD212 Dimmer 2, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node8 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 008, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node7 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 007, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node2 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 002, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node4 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 004, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node3 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 003, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node20 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 020, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node24 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 024, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node23 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 023, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node67 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 067, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node21 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 021, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node17 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 017, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node16 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 016, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node15 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 015, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node59 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 059, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node14 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 014, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node58 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 058, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node19 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 019, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node18 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 018, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node71 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 071, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node31 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 031, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node30 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 030, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node73 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 073, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node72 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 072, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node35 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 035, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node33 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 033, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node77 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 077, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node76 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 076, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node28 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 028, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node27 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 027, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node26 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 026, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node25 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 025, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node29 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 029, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node42 (Type=Thing, Status=ONLINE: Node initialising: GET_CONFIGURATION, Label=Z-Wave Node 042: 004001 Smoke Detector and Siren, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node41 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 041, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node40 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 040, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node44 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 044, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node39 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 039, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node38 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 038, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node37 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 037, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node36 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 036, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node70 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 070: 004001 Smoke Detector and Siren, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node46 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 046: 004001 Smoke Detector and Siren, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node68 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 068: 004001 Smoke Detector and Siren, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node45 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 045: 004001 Smoke Detector and Siren, Bridge=zwave:serial_zstick:edde6877)
zwave:device:edde6877:node69 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 069: 004001 Smoke Detector and Siren, Bridge=zwave:serial_zstick:edde6877)

So, which one is which? The number of clicks to set up the things again and links is an issue, but knowing which switch is which is a bigger one.

Is there no way to migrate also Thing descriptions (and groups)?

Can you expand on why this is? From what I’ve read above, you’ve only just managed to get your system upgraded, and I’m not sure what the problems are that you are having with the binding?

I’m not sure what trouble you’re having. If your Things were removed and rediscovered, then everything should be good. Or are you still having trouble with the migration? Devices> Things> Channels> Links> Items. Coming from OH 1.x, you will have Items files, and your Z-Wave items will need to be modified to link to the Channel. You could also create Items in Paper UI, but they would also need to be linked to a Channel. Managed (Paper UI created) and unmanaged (Item files) Items can coexist too, so you can have a mix of each. Here is an example unmanaged Z-Wave Item:

Dimmer    US_DiningRoom_Dimmer    "Dining Room [%d%%]"    <slider>    (gUS_DiningRoom,gUS_DiningRoom_Action,gLight)    ["Lighting"]    {channel="zwave:device:07cb40a2:node36:switch_dimmer"}

In Paper UI> Configuration> Things> select your Thing, you can view the Channels, and there is a control to copy the Channel to your clipboard to paste it back into the Items file. You can also run smarthome:things show zwave:device:07cb40a2:node36, and scroll to the bottom to see the Channels. It’s the IDs that are the tricky part to find when migrating:

Channels:
        ID: switch_dimmer
        Label: Dimmer
        Type: zwave:switch_dimmer
        Description: The brightness channel allows to control the brightness of a light. It is also possible to switch the light on and off.

        ID: scene_number
        Label: Scene Number
        Type: zwave:scene_number
        Description: Triggers when a scene button is pressed

There is a tutorial on migrating too…

Sorry I mentioned OH 1.x at the onset. I was referring to the way you just added jar files to a directory back then to install bindings. I switched from OH back then and came back to now due to new developments. So I am not migrating a OH1 system.

Sure. Yes, it seems that I have almost all nodes set up and migrated to the new binding. So far so good. What I was referring to was that yes, I have a Thing for node 69 now in my system, but which device in my house is actually controlled by node 69?

I am sure I can go back to the backups I made before upgrading and figure it out and set all names again, make links with the proper names and all that, but effectively I am now starting over with the system.

I hope this does not mean that I will have to do this all again for every new release? Please tell me if I have misunderstood something, or missed a crucial step somewhere.