Enumerating command classes using the c-library fail

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
tor
Posts: 6
Joined: 06 Aug 2015 15:14

Enumerating command classes using the c-library fail

Post by tor »

Hi!

I'm currently working with the zway c-library to prototype some zwave functionality. I however have some problems scanning which command classes a particular device and instance supports.

I use the zway_devices_list -> zway_instances_list -> zway_command_classes_list to get information on what devices are available. (Is this an acceptable way to enumerate the device tree?)

Everything seems to work ok but for a particular device i don't get all command classes that is reported when i run the zway-server and the expert UI.

The device in question is an Aeotech Smart Switch. The above code reports the command classes

20 56 5e 72 86 98

while the expert UI says

"Basic, SwitchBinary, SwitchAll, SceneActivation, SceneActuatorConf, Meter, CRC16, AssociationGroupInformation, ZWavePlusInfo, Configuration, ManufacturerSpecific, PowerLevel, FirmwareUpdate, Association, Version, Security, "

How come i miss all these commandclasses when using zway_command_classes_list?

Code is loosely based on the example code provided for the clib api.
tor
Posts: 6
Joined: 06 Aug 2015 15:14

Re: Enumerating command classes using the c-library fail

Post by tor »

Ok, the problem seems to be with me running two separate instances of the z-way stack. The config xml stores where out of sync and i where unable to do a NIF request/interview on the devices earlier enumerated by the zway-server.

When excluding the devices and then re-include them again i get sensible data back.

Hopefully i will be on my way with this now :)
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Enumerating command classes using the c-library fail

Post by pz1 »

Thanks for sharing your experiences. Not many work with the c-library, or at least don't report it here
Moderator
tor
Posts: 6
Joined: 06 Aug 2015 15:14

Re: Enumerating command classes using the c-library fail

Post by tor »

Thanks and no problem.

To add on above comments, when the system works properly i also get nice, added events, callbacks upon start with all devices, instances and command classes.

Thus you most likely don't have to do the zway_devices_list -> zway_instances_list -> zway_command_classes_list traversal and instead just listen on the callbacks and build your shadow on the network topology.

/Tor
Post Reply