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

So it should be the same for ZWave - and I believe that ZWave complies with the logging guidelines for this level.

:smile:

Well, that may be, but you mean that only I should suffer? :wink:

If we put ALL debug down as TRACE messages, then everytime I ask someone for a DEBUG log, I need to ask them to provide a TRACE log, and this will generate really HUGE files :frowning: . This will cause many people problems I think as the logging will really be big. Yes, I will suffer as Iā€™ll need to process these logs, but also others I think will have problems as they will need to manage these logs as well.

Itā€™s not that I dislike it at all. This goes against the logging guidelines. It will generate a lot of data in a log configuration that is not meant to generate much at all. We already heard above that people will not like this (not just me).

Sorry, but Iā€™m not sure what to suggest. Iā€™ve already said that I plan to reduce logging before this gets merged. That was always the plan stated a long time ago in this thread. The intensive logging here was mainly to allow transactions, and new features to be fully debugged. I donā€™t think we can increase the logging to INFO level or I will get in trouble, and if I reduce all debug logging down to TRACE level, it will cause problems with development.

I guess you donā€™t like my suggestion to manage this in your logback config file as you didnā€™t comment?

To be honest I didnā€™t understand it.
You want me to essentially run at debug and write a log4j filter to do on-the-fly processing/compression of current debug level output to one-liners ?
I wouldnā€™t mind, but Iā€™ve got no experience with that and no idea how to do that reallyā€¦

No - not at all. Simply that you can use the log config file to only log certain class debug if you wanted to eliminate some of the information. Iā€™m not sure that you can produce the one line summary (I donā€™t even know what that would look like), but simply that if you want to reduce the logging, it is easily possible using the log config file (or even Karaf for that matter).

Instead of enabling logging for the whole binding with -:

log:set DEBUG org.openhab.binding.zwave

you could just enable logging from the transaction manager with -:

log:set DEBUG org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager

or if you only wanted to see the converter output to see the processed data

log:set DEBUG org.openhab.binding.zwave.internal.converter

So itā€™s possible for you to reduce the logging significantly by doing this. Sure - you canā€™t get the summary log entries like this, but you can tailor what you do see in the logs.

@chris Clarification needed :slight_smile:

Post #1 uses org.openhab.binding.zwave-2.3.0-SNAPSHOT.jar (shouldnā€™t that be renumbered to 2.4.0 ? :slight_smile:)
File size: 2.028.108 bytes, build date: 04-Jun-2018 17:52

Post #2873 uses org.openhab.binding.zwave_2.4.0.201805312220.jar (with the modified dead nodes handling)
File size: 2.017.323 bytes, build date: 01-Jun-2018 00:21

Q: should I use this one (#2873) or the one from the first post which has a newer timestamp?
Have you implemented the changes wrt the dead nodes handling in the one from the first post?

My (ongoing) testing on the 2.4.0.201805312220 (#2873) showed no issues. Things didnā€™t go OFFLINE and all was good.

1 Like

Yes - I just havenā€™t updated the build as something broke -:

The one in the first post hasnā€™t changed the DEAD node strategy - mainly as @5iver said that half of his system stopped working with that version. I donā€™t think Iā€™ve had any other negative comments though so I should look to change this soon.

2 Likes

cool!

I will continue with the adventurous version (from Post #2873) of the binding and report back if I see any issues

Thanx @sihui. I missed that reply from @chris :slight_smile:

I also found out how to modify the nodeID of the Z-Wave Serial Controller: I had to use Manual addition :stuck_out_tongue: (my bad)

1 Like

Finally I found some time to experiment with command class version overriding using thing-type properties and it works great. I am overriding COMMAND_CLASS_ASSOCIATION version to ā€œ1ā€ and after reinitializing this reincluded device it has lifeline association properly set to the controller and reports are back! :slight_smile:

How can we proceed with this issue? I donā€™t want to rebuild the binding everytime you publish new version. Is there a way to include this setting in your database?

Did you try setting the configuration options to override this, or are you changing the code? It is possible to set the version, and itā€™s possible to add the command class, so maybe by setting the right parameters you can make this work? I think that just setting the ā€œforce versionā€ config option should work.

I need to check the database option to configure this, but if you look at line 600 in the initialisation file you will see the code. If you are making the change there, then the database update will work.

Iā€™ve added a property to xml with thing-type definition (qubino/zmnhda_0_0.xml), something like this:

<property name="commandClass:COMMAND_CLASS_ASSOCIATION">setVersion=1</property>

Can you explain how and where I need to set this option? I am not sure what you are talking about.

Did it work?

As I said above, I need to check how this is set. There will be an option in the database which is set in the command class options - I just need to remember what it is (I think it is FORCEVERSION). This will then generate the XML that I think should look the same as you defined above.

Yes, it did. This is all Iā€™ve done and now the problematic device is initialized properly. There are also other command classes that report version 0, so I am going to override all of them. However ASSOCIATION was the most important and I started my experiments with it.

Ok, I just did a test and confirmed that FORCEVERSION is the correct option. This needs to be added to the command class options -:

image

Can I edit this by myself? My user name is the same like hereā€¦

You can now :slight_smile:

Thanks. I just have added this setting for two more command classes: POWERLEVEL and MANUFACTURER_SPECIFIC. I also updated some other info. Please let me know when a new build is ready.
I will continue testing on my own build until then.

1 Like

Isnt this related to this thread Status updates for Qubino Relays/Dimmers generally do not work
And that you must activate extra channels or add a temperature sensor and exclude unit from controller and then add it back again
*or maybe not didnt read the whole thread before i posted sorry

No - the issue is different. The issue is related to the fact that device reports that it supports version 0 of the command class, and the standards state that if a device reports version 0 it means it doesnā€™t support the command class. The binding therefore removes it.

We had a discussion at the time on this - if you want to reopen the discussion then please have a read above first in case it explains your questions already.

Iā€™ve created a new version of the test binding with the new DEAD node code here.

This only has a few small changes relating to the number of retries during the initial PING stage.

1 Like