OH2 Z-Wave refactoring and testing... and SECURITY

Nevermind, found them. Also this document might be helpful once we get to the level of being able to program lock codes by day / time.

http://s7d5.scene7.com/is/content/BDHHI/ApplicationNote-UsingASCII-Z-Wave-Locks

1 Like

WOW i dont know what you have done but now my Fibaro Wall-Plugs works without a DB Warning ans now i have a Battery Status for all my Devices. Only my Fibaro Window Sensor dosnt work correct but its not important.

THANK YOU!!

Is it necessary to do a reinitialization(advanced option on the thing in Habmin)) ofhe device to pull down database updates? And will a reinitialization open up the possibility to move from an unsecured device to a secure device as long as the device supports both modes?

No - not in this way at least.

To update the database if the channel definitions have changed, you need to delete the thing, click on discovery, and add it back in again. No need to exclude/include the device again.

If the database has changes only to configuration information then thereā€™s no need to do anything.

No - it shouldnā€™t. The binding should detect that the device is already securely included - this is the same as if the XML file gets removed. The binding therefore sends a few secure commands during initialisation to see if the device responds - if it does it re-queries the secure classes and will work securely.

Done! :slight_smile:

Thanks!
br,
Raymond

I downloaded newest zwave binding to test it and put it under /usr/share/openhab2/addons/ folder.

  1. How do I tell openhab2 to reload binding? Is the full openhab restart the only option or there is some shorter way?
  2. where do I find a zwave.log people are talking here about?

Try the console bundle:restart command -:

http://docs.openhab.org/administration/console.html#using-the-console

Generally itā€™s stored in the openhab log -:

http://docs.openhab.org/administration/logging.html

as to the restart: simply puting file there didnt work due to the ongoing conflicts from original zwave bundle.

After downloading file (as you described in the thread),
bundle:list shows two bindings (original 20170331, and downloaded 0415).
bundle:start of the new one fails, due to the original having ā€˜singularity=trueā€™. Simply stopping 0331 and starting 0415 also didnt work due to the same error.

What somehow resolved the problem was bundle:uninstall for the 0331, and then bundle:start for 0415. But then after restaring whole OH2 (different reasons) both bundles are again listed and singularity exception is thrown, thankfully, 0415 is one which is active. But still 0331 is not being ā€˜shadowedā€™/ā€˜upgradedā€™ automatically.

So to summarize: simple downloading file to /usr/share/openhab2/addons does not allow for easy update for bundles WHICH are already installed from base OH installationā€¦
I think it would be valuable to have it easier/automatic, or am I doing some mistake?

As to the logging, I have both openhab.log and events.log but saw people mentioned zwave.log specifcally, so I thought there is some kind of ā€˜officialā€™ log appender logconfig definition to use for zwave.log. If you have one, Iā€™d gladly see it. Also probably I must enable debug messages?

Yes - you need to remove this. Please check the instructions for installing this binding toward the top of this thread -:

You need to uninstall the original binding. If you have zwave listed in your addons config file, then you also need to remove this or it will reload on startup.

Of course, but this is a test version for development - not the mainstream binding. Once it is merged into the master branch then it will be easier.

In OH1 this was easy to configure, for OH2 itā€™s a bit more difficult so the openhab log is normally fine if you then use the online log viewer.

Yes, of course - I think the default level is INFO. Again, this is described in the documentation I linked above.

Thank you for your help.

One more question: you said ā€˜(remove) zwave listed in your addons config fileā€™ - it is, but the name is very the same as your updated version. I though that I can not remove it from there as ONE zwave binding is a must?

as to the logging, solution (for others interested) to have additional zwave.log with DEBUG messages, but keeping original openhab.log WITHOUT debug (just add it to the end of org.ops4j.pax.logging.cfg):

# DEBUG logging for ZWAVE
log4j.logger.org.openhab.binding.zwave = DEBUG, zwave
log4j.additivity.org.openhab.binding.zwave = false

log4j.appender.zwave=org.apache.log4j.RollingFileAppender
log4j.appender.zwave.layout=org.apache.log4j.PatternLayout
log4j.appender.zwave.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-26.26c{1}] - %m%n
log4j.appender.zwave.file=${openhab.logdir}/zwave.log
log4j.appender.zwave.append=true
log4j.appender.zwave.maxFileSize=10MB
log4j.appender.zwave.maxBackupIndex=0

Yes, but if you manually install a binding, then the system doesnā€™t know this and it will then install the binding on startup and you will have the conflict you mentioned earlier.

So I can remove this ā€˜zwaveā€™ from org.openhab.addons.cfg, and as long as I have org.openhab.binding.zwave-2.1.0-SNAPSHOT.jar in /usr/share/openhab2/addons it will be enough to zwave binding being started?

Yes - it will start the version you put in the addons folder.

1 Like

I will swap this around today.

[edit] Done

So wait, are you saying yours is currently showing ON as unlocked, and OFF as locked? Or that is how you would expect it to work?

While Iā€™d love the OFF to mean locked, itā€™s been easier to make the connection in our brains here in our home, that ON means security is ON and thus the door is locked. While OFF would mean security is not on and thus the door is unlocked. Same mantra weā€™re using for the garage door, ON equals closed because security is enabled/on and the door is closed. While OFF of course means there is no security and the door is open.

Correct.

The standard is On=Locked. You can always create a virtual lock and then set it up that way.

Note that itā€™s now this way around in the latest bindingā€¦

Just tested and works!! Thanks.!!

Are the user codes supposed to go from HABmin to the lock? My old user codes got erased from the lock and if I try to set them through HABmin they arenā€™t working?

Yes - Iā€™ve been discussing this with @shawnmix as well so Iā€™m aware thereā€™s an issue here. Iā€™ll try and look into this, but it might be one for next week.

What, you want to actually have a life outside of taking care of all our requests for help;-) Thanks as always for all the hard work!!!