Page 1 of 1

Help with Binding

Posted: 10 Dec 2015 05:11
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?