Continuing the discussion from ZWave status under OH2:
I think the OH2 Z-Wave binding is ready for testing - thanks to those who have been helping - especially @xsnrg, @avdleeuw and @christianjwaite.
I’ve put a binary for the OH2 Z-Wave binding on the HABmin github site for ‘adventurous’ people to test - it’s not in the master branch at the moment, so you need to go here where you will find the Z-Wave JAR, the HABmin2 JAR, and also the serial transport JAR - you need them all since this is running outside of Karaf, so dependencies need to be added manually.
A few pointers about the OH2 zwave binding…
Firstly, this is new, it will therefore have bugs, and you can expect it not to work ‘properly’ - you have been warned
The database is different in OH2 - the data needs to be added to the online database by uploading the node xml files - you will need to do this, and possibly manually update the data before the new devices are available. This is covered elsewhere, but you can find the database here. If you have a device that isn’t supported by the binding, then the best approach is to go to the database, search to see if the device exists (it might exist with different IDs) and if it doesn’t, create it by uploading the nodeX.xml file that OH2 generates (in the /userdata/zwave folder).
Most of the protocol layers in the biding are basically the same as OH1. I’ve tried to keep the two in sync with new command classes and bug fixes, but I will have inevitably missed something. If you find something that doesn’t work, and you know it was recently fixed/added in OH1, then please try and refer to this when you raise an issue as it will make it easier to fix.
The converters have changed significantly though - this layer translates the zwave data to openhab data, and it was quite complex in OH1. I’ve simplified it, and also brought it in line with OH2/ESH concepts. There may be bugs here as I can’t test every command class since I don’t have them all.
A few new command classes have been implemented - color, zwave-plus-info, device-reset-locally, alarm_v2/3.
Getting Started -:
Copy the files to your addons folder…
Firstly, you need to manually add the controller - in HABmin or PaperUI, you need to go to the add thing option (in HABmin, this is the Configuration | Thing Configuration menu, and click on the + at the top). Select the “Z-Wave Serial Controller” thing. You need to go to the port settings and set the COM port address.
You should soon see a bunch of new things being found - click on the ADD button, and hopefully things will work ok! If the node name isn’t a real name (e.g. instead of device name it shows the Type and ID) then it means the device isn’t detected in the database and we need to work this out… It should still generate the XML files, so we need to feed them into the database. If you’re unsure about what to do here, then please discuss it so we can get this right - once this gets sorted for a device, hopefully everyone else will be able to use the device very easily…
Once the things are generated, the channels and items should also be generated automatically. If this doesn’t work as you expect, then we likely need to sort this out in the database.
Hot tip - if you creating sitemaps, you can use HABmin to copy the item names (since they can be long!). Hover the mouse over the channel name (in thing config, channels), and after a second or so a button will appear - click on this and the item name is copied to clipboard).
Any issues, please let me know (of course ) and I’ll try and sort things out. There will no doubt be some issues, especially as people start to work with devices that I don’t have…
Chris