added _instance to SetValue to support multi-instance devices#31
added _instance to SetValue to support multi-instance devices#31ekarak wants to merge 6 commits intojperkin:masterfrom
Conversation
|
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). Cheers! |
|
KNX+Zwave working together in harmony in Node-Red: 2014-07-15 21:58 GMT+03:00 Jonathan Perkin notifications@github.com:
Elias Karakoulakis |
…or nodeJS 0.12 compilability
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.