Razberry not discovering other devices

Discussions about RaZberry - Z-Wave board for Raspberry computer
ps2k
Posts: 11
Joined: 09 Sep 2021 02:38

Re: Razberry not discovering other devices

Post by ps2k »

Hi PoltoS,
I have another question, may be I should open up a new thread. I'm working on a PoC. It needs sensor data to be read and fed to another system. I can't use Zway controller application. Instead I'm using the z-way-test with the SDK library. It looks great although all the data structures are abstracted. My only issue is I'm unable to read the data sent by the binary sensor I have. I don't see the tag "level" which seem to hold the value in the path. But the log generated by the library has this. I tried printing all the child nodes. Could you please guide me on this one?

Log message generated by the lib:
[2021-09-15 12:59:49.489] [D] SETDATA devices.33.instances.0.commandClasses.48.data.10.level = True

Logs generated by me using DataChangeCallback API:
[2021-09-15 12:59:49.489] [D] Basic set value - root path = devices.33.instances.0.commandClasses.48.data, type=0xc1, datatype=0

[2021-09-15 12:59:49.489] [D] iter: Basic set value = 1, type = 193, path=devices.33.instances.0.commandClasses.48.data.supported, datatype=1
[2021-09-15 12:59:49.489] [D] iter: Basic set value = 1, type = 193, path=devices.33.instances.0.commandClasses.48.data.version, datatype=2
[2021-09-15 12:59:49.489] [D] iter: Basic set value = 0, type = 193, path=devices.33.instances.0.commandClasses.48.data.security, datatype=1
[2021-09-15 12:59:49.489] [D] iter: Basic set value = 1, type = 193, path=devices.33.instances.0.commandClasses.48.data.interviewDone, datatype=1
[2021-09-15 12:59:49.489] [D] iter: Basic set value = 1, type = 193, path=devices.33.instances.0.commandClasses.48.data.interviewCounter, datatype=2
[2021-09-15 12:59:49.489] [D] iter: Basic set value = 1, type = 193, path=devices.33.instances.0.commandClasses.48.data.typemask, datatype=2
[2021-09-15 12:59:49.489] [D] iter: Basic set value = 1, type = 193, path=devices.33.instances.0.commandClasses.48.data.10, datatype=0
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Razberry not discovering other devices

Post by PoltoS »

In your case you re better to bind on the devices.33.instances.0.commandClasses.48.data.10.level rather than devices.33.instances.0.commandClasses.48.data

For this use:

ZDataHolder levelDH = zway_find_device_instance_cc_data(zway, 33, 0, 48, "10.level");
zdata_add_callback(levelDH, cbk, 0, NULL);

In this case cbk will be called each time 10.level is updated.

Why Z-Way with JS/HTTP API is not a go for you?
Anyway, using Z-Way library is an easy way for you, especially after the network was set up with Z-Way (use same config files for your project using libzway).
ps2k
Posts: 11
Joined: 09 Sep 2021 02:38

Re: Razberry not discovering other devices

Post by ps2k »

Thanks PoltoS for your quick response. I will try this out.
ps2k
Posts: 11
Joined: 09 Sep 2021 02:38

Re: Razberry not discovering other devices

Post by ps2k »

I had tried several path options including "10.level". Only NULL or "." works and the root is pointing to "data". With other path strings, callback is never getting triggered. I even tried the full path starting with devices.<node_id> even that doesn't work. Any other suggestions please?
ps2k
Posts: 11
Joined: 09 Sep 2021 02:38

Re: Razberry not discovering other devices

Post by ps2k »

I figured out a workaround for it. In the callback i could call zdata_find("10.level") to read the value. Now i can make progress with it. Only catch is the callback gets called twice. I think that should be fine. Thanks PoltoS for your help.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Razberry not discovering other devices

Post by PoltoS »

You can check flags - those should be different events. And you can always correlate them with the log.
Post Reply