@@ -66,30 +66,16 @@ command class 37:
6666``` js
6767zwave .setValue (3 , 37 , 1 , 0 , true ); // node 3: turn on
6868zwave .setValue (3 , 37 , 1 , 0 , false ); // node 3: turn off
69+ zwave .setValue ({ node_id: 3 , class_id: 37 , instance: 1 , index: 0 }, false ); // the same turn-off command using an object
6970```
7071
7172Another example: if Zwave Node #5 is a dimmer, use class 38:
7273
7374``` js
7475zwave .setValue (5 , 38 , 1 , 0 , 50 ); // 1) passing each individual ValueID constituent:
7576zwave .setValue ({ node_id: 5 , class_id: 38 , instance: 1 , index: 0 }, 50 ); // 2) or a valueID object (emitted by ValueAdded event):
76-
77- /*
78- * Turn a binary switch on/off.
79- */
80- zwave .setNodeOn (3 ); // node 3: switch ON
81- zwave .setNodeOff (3 );// node 3: switch OFF
82-
83- /*
84- * Set a multi-level device to the specified level (between 0-99).
85- * See warning below
86- */
87- zwave .setLevel (5 , 50 ); // node 5: dim to 50%
8877```
8978
90- * WARNING: setNodeOn/Off/Level _ don't work reliably with all devices_ * , as they are
91- mere aliases to the BASIC command class. Not all devices support this. Please
92- consult your device's manual to see if it supports this command class.
9379The 'standard' way to control your devices is by ` setValue ` which is also the
9480_ only_ way to control multi-instance devices, such as the Fibaro FGS-221
9581(double in-wall 2x1,5kw relay) for example:
@@ -99,6 +85,7 @@ zwave.setValue(8, 37, 1, 0, false);// node 8: turn off 1st relay
9985zwave .setValue (8 , 37 , 2 , 0 , true ); // node 8: turn on 2nd relay
10086zwave .setValue (8 , 37 , 2 , 0 , false );// node 8: turn off 2nd relay
10187```
88+
10289Useful documentation on [ command classes can be found on MiCasaVerde website] ( http://wiki.micasaverde.com/index.php/ZWave_Command_Classes )
10390
10491Writing to device metadata (stored in the ` zwcfg-<homeId>.xml ` file, under ` UserPath ` ):
@@ -135,20 +122,6 @@ zwave.hardReset(); // destructive! will wipe out all known configuration
135122zwave .softReset (); // non-destructive, just resets the chip
136123```
137124
138- Scenes control:
139- ``` js
140- zwave .createScene (label); // create a scene and assign a label, return its numeric id.
141- zwave .removeScene (sceneId); // perform #GRExit
142- zwave .getScenes (); // get all scenes as an array
143- // add a zwave value to a scene
144- zwave .addSceneValue (sceneId, nodeId, commandclass, instance, index, value);
145- zwave .addSceneValue (sceneId, { node_id: 5 , class_id: 38 , instance: 1 , index: 0 }, 50 ); // Seconds arg can be a valueID object (emitted by ValueAdded event):
146- // remove a zwave value from a scene
147- zwave .removeSceneValue (sceneId, nodeId, commandclass, instance, index);
148- zwave .sceneGetValues (sceneId); // return array of values associated with this scene
149- zwave .activateScene (sceneId); // The Show Must Go On...
150- ```
151-
152125ZWave network commands:
153126``` js
154127zwave .healNetworkNode (nodeId, doReturnRoutes= false );
0 commit comments