Testing Z-Wave binding on openHAB-2

I just wrote some small code to load one of your FGS221 XML files (node 9) and run it through the code that finds the database entry, and it works fine. So, assuming you’re running the latest version (and I don’t doubt that) then the database should be ok I think…

There’s one thing I can think of and that is your system is starting up quicker than the database is being generated… The ZWave binding creates a list of all ZWave devices from the XML files, and then uses this to search through. If your discovery is starting before this list is generated, or fully generated, then it might not find the device.

Can you run your system in debug mode and have a look for the following entries -:

Reading the XML document '/ESH-INF/thing/aeon_zw100_0_0.xml'

There should be lots of these entries. Additionally, at some stage you should also see -:

NODE 2: Device discovery completed

I’d be interested to know if the discovery message comes before the XML file messages… If this is the problem then I’ll need to find another way of processing these files…

Chris

Maybe the old version is still installed even though the jar has been replaced. Sometimes you need to uninstall the bundle rather than just removing the jar.

any tip how I can save zwave log? Previously I was using OH 1.x logging mechanism and now I’m just connecting to SSH port and use:

log:tail

which in my case shows A LOT od data very quickly.

EDIT: I’ll try with:

log:set DEBUG org.openhab.binding.zwave
and
log:tail org.openhab.binding.zwave

but it would be nice to have some kind of log file for later inspecting.

EDIT2: Does Reading the XML document should come from zwave binding or maybe some other namespace?

Should be in /opt/openhab/userdata/logs

It comes from another namespace unfortunately (org.eclipse.smarthome.config I think off the top of my head).

Hi all,
I’ve just put a new version of ZWave and HABmin JARs on Github. This fixes issues setting associations and the multi-select dropdown in HABmin and updates new devices in the database…

Chris

Where were they pushed to? The ones in the theme/output are showing as pushed 2 days ago.

Ooops - sorry :blush: . I forked a new branch on HABmin to refactor the multiselect code so it was pushed into that branch. I’ve now merged this so it should be back in the usual place…

I think I’ll try and find a better way to distribute the files - putting them in Github isn’t very nice…

Just let me know when you think you are ready to move it over to openHAB itself - we can then run it on the build servers and include it in the beta distro easily.

Hi Kai,
I guess the question is iff you want to merge the code into the master branch while it’s still being worked ok (which isn’t the normal way)?

Chris

@Kai slightly off-topic but will be pertinent to ZWave also when it’s merged over to the OH2 github. Is there a karaf command to go and fetch the latest beta bundles similar to what happens on first run of the online install?

There are two parts: ZWave and HABmin.

  • HABmin: This would be only a transfer of the repo, and an integration as a feature in the distro - I think there is nothing that holds us back doing that.
  • ZWave Binding: The distro is still a beta that is heavily worked on in all different places. As it seems that there are already MANY people using and testing the ZWave binding, it is not in a state where it would only be useless balast. Adding it to the distro and continuing to work on it is alright. You will get full access to the openhab2-addons repo, so you can work on the code as you like. Only thing to change is probably that you should also do your changes through PRs.

Is there a karaf command to go and fetch the latest beta bundles similar to what happens on first run of the online install?

I haven’t tested it yet, but I would hope that it is easy to update, if you are using the online distro: The downloaded snapshots are put in userdata/tmp/mvn. If you uninstall the ZWave feature, delete this folder and re-install the ZWave feature, it should pick up the latest build from the remote repo. So far the theory :wink:

Hi Kai,
Yep - I was mainly referring to the ZWave binding - I didn’t think you’d want to merge that into master until it had been completed/reviewed etc. If that’s not the case, then I’ll look to merge that across in the coming days - likewise for HABmin. That will certainly make things easier :slightly_smiling:

Cheers
Chris

I have a bunch of Aeon Labs DSC18 devices that were not probably recognised. How do I go about loading the XML files to the database? I found no email address to write you to get editing privileges :slight_smile:

I’ve updated your access - you’re good to go :sunglasses:

Agreed - I need to add a contact link to the page :blush:

Excellent, thanks.

Files uploaded, and it seems that you have approved everything. How do I go about refreshing information for the discovered nodes from the online database?

I need to recompile the JAR - I’ll do this again later this afternoon and I’ll make sure the database is up to date at that time…

Thanks.

@chris, I am trying to create an item the way you describe, but I always get “Error saving item switch” no matter what I do. I have tried delete the existing channel, but it seams that it must remain, and I have tried both firefox and chromium.
I think it is related to umlauts and UTF8 or something along those lines - I receive the following log output upon start-up;

15:36:50.476 [INFO ] [age.SerialApiGetInitDataMessageClass] - ------------Number of Nodes Found Registered to ZWave Controller------------                                                                                     
15:36:50.477 [INFO ] [age.SerialApiGetInitDataMessageClass] - # Nodes = 7                                                                                                                                                      
15:36:50.477 [INFO ] [age.SerialApiGetInitDataMessageClass] - ----------------------------------------------------------------------------                                                                                     
15:36:50.479 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:152fde20d52' changed from INITIALIZING to ONLINE                                                                                            
15:36:50.486 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_152fde20d52_serial_ack changed from 6 to 7                                                                                                   
15:36:50.486 [INFO ] [marthome.event.ItemStateChangedEvent] - zwave_serial_zstick_152fde20d52_serial_sof changed from 6 to 7                                                                                                   
15:36:50.554 [ERROR] [ve.internal.protocol.ZWaveController] - NODE 5: Restore from config: Error deserialising XML file. com.thoughtworks.xstream.converters.ConversionException:  : ParseError at [row,col]:[113,20]
Message: Character reference "&# :  : ParseError at [row,col]:[113,20]                                                                                                                                                         
Message: Character reference "&#                                                                                                                                                                                               
---- Debugging information ----                                                                                                                                                                                                
message             :  : ParseError at [row,col]:[113,20]                                                                                                                                                                      
Message: Character reference "&#                                                                                                                                                                                               
cause-exception     : com.thoughtworks.xstream.io.StreamException                                                                                                                                                              
cause-message       :  : ParseError at [row,col]:[113,20]                                                                                                                                                                      
Message: Character reference "&#                                                                                                                                                                                               
class               : java.lang.String                                                                                                                                                                                         
required-type       : java.lang.String                                                                                                                                                                                         
converter-type      : com.thoughtworks.xstream.converters.SingleValueConverterWrapper                                                                                                                                          
wrapped-converter   : com.thoughtworks.xstream.converters.basic.StringConverter                                                                                                                                                
path                : /node/supportedCommandClasses/entry[7]/nameLocationCommandClass/name                                                                                                                                     
line number         : 113                                                                                                                                                                                                      
class[1]            : org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveNodeNamingCommandClass                                                                                                                     
converter-type[1]   : com.thoughtworks.xstream.converters.reflection.ReflectionConverter                                                                                                                                       
class[2]            : java.util.HashMap                                                                                                                                                                                        
converter-type[2]   : com.thoughtworks.xstream.converters.collections.MapConverter                                                                                                                                             
class[3]            : org.openhab.binding.zwave.internal.protocol.ZWaveNode                                                                                                                                                    
version             : 1.4.7                                                                                                                                                                                                    
-------------------------------                                                                                                                                                                                                

Can I instead manually add the switch item in my .items file, and how would the line look like then?

I suspect that this is coming from your saved node5.xml file - if so, it won’t matter what you do… Can you attach the node5.xml file? It’s probably related to have the & character in the file at a guess…

Yes, I get as soon as I enter a Swedish character in the name field. (or likely any field, but I mostly do english in the other fields).

Here’s the offending part;
<nameLocationCommandClass> <version>1</version> <instances>1</instances> <name>&#x0;&#x2;&#x4;&#x6;&#x8; &#xc;&#xe;&#x1;&#x3;&#x5;&#x7; &#xb;&#xd;&#xf;</name> <location></location> </nameLocationCommandClass>