Open ekarak opened 9 years ago
Thanks! I don't currently have devices at home I can test this on to ensure it doesn't break existing, will see if I can get some and integrate this.
ooops seems like I broke the other nodes :) - I have to amend this patch...
OK, fixed it, the default index value for ValueId's is 1 (its apparently not 0-based). Now I can control both single and multi-instance devices. I've also updated the README.
Cheers!
KNX+Zwave working together in harmony in Node-Red: https://groups.google.com/forum/#!topic/node-red/LKJEFYZG7MY that's what I like about Open source: Combining the effort!
2014-07-15 21:58 GMT+03:00 Jonathan Perkin notifications@github.com:
Thanks! I don't currently have devices at home I can test this on to ensure it doesn't break existing, will see if I can get some and integrate this.
— Reply to this email directly or view it on GitHub https://github.com/jperkin/node-openzwave/pull/31#issuecomment-49076927.
Elias Karakoulakis Electrical & Computer Engineer NTUA Athens Msc Information Systems, AUEB Athens KNX Advanced Partner
Hi Jonathan, This patch is to let node-openzwave properly control multi-instance devices such as the Fibaro FGS-221 (double in-wall relay switch). It adds the missing "_instance" part of the OZW ValueId.
zwave.setValue(8, 37, 0, 1, true/false); // control 1st relay of node #8 zwave.setValue(8, 37, 0, 2, true/false); // control 2nd relay of node #8
This patch also tightens the search for ValueIds for switchOn/Off and setLevel so that they only apply affect the valueID with instance and index values of 0. This was necessary as a switchOn command affected both relays.