Help with Binding

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
markolbert
Posts: 64
Joined: 16 Oct 2014 06:09

Help with Binding

Post by markolbert »

I am trying to set up bindings to communicate level changes for all switches in my ZWave network, whether SwitchBinary devices or SwitchMultilevel devices.

I'm having trouble understanding the docs. I tried inserting the following into main.js as a test:

Code: Select all

zway.devices[9].instances[0].SwitchMultilevel.data.level.bind(function(value)
{
    debugPrint("hello: " + value);
});
And it seemed to work. But then it stopped working (i.e., subsequent changes to the light level via the dimmer that is device 9 didn't generate any additional output to the log file.

What's the proper way to go about setting up the bind() callback?
Post Reply