Skip to content

Commit 0644c73

Browse files
committed
release 1.5.1
1 parent 1f1ae42 commit 0644c73

File tree

4 files changed

+58
-30
lines changed

4 files changed

+58
-30
lines changed

README-api.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,16 @@ command class 37:
6666
```js
6767
zwave.setValue(3, 37, 1, 0, true); // node 3: turn on
6868
zwave.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

7172
Another example: if Zwave Node #5 is a dimmer, use class 38:
7273

7374
```js
7475
zwave.setValue(5, 38, 1, 0, 50); // 1) passing each individual ValueID constituent:
7576
zwave.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.
9379
The '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
9985
zwave.setValue(8, 37, 2, 0, true); // node 8: turn on 2nd relay
10086
zwave.setValue(8, 37, 2, 0, false);// node 8: turn off 2nd relay
10187
```
88+
10289
Useful documentation on [command classes can be found on MiCasaVerde website](http://wiki.micasaverde.com/index.php/ZWave_Command_Classes)
10390

10491
Writing 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
135122
zwave.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-
152125
ZWave network commands:
153126
```js
154127
zwave.healNetworkNode(nodeId, doReturnRoutes=false);

README-deprecated-16.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Usage of deprecated API calls in OpenZWave 1.6
2+
3+
There are numerous changes in the upcoming 1.6 release. This document describes these changes
4+
5+
### SetNodeOn/Off, SetLevel
6+
Just define `OPENZWAVE_DEPRECATED` preprocessor symbol to have these included in the build:
7+
8+
```
9+
/*
10+
* Turn a binary switch on/off.
11+
*/
12+
zwave.setNodeOn(3); // node 3: switch ON
13+
zwave.setNodeOff(3);// node 3: switch OFF
14+
15+
/*
16+
* Set a multi-level device to the specified level (between 0-99).
17+
* See warning below
18+
*/
19+
zwave.setLevel(5, 50); // node 5: dim to 50%
20+
```
21+
22+
*WARNING: setNodeOn/Off/Level _don't work reliably with all devices_*, as they are
23+
mere aliases to the BASIC command class. Not all devices support this. Please
24+
consult your device's manual to see if it supports this command class.
25+
26+
27+
28+
## Scenes control:
29+
Just define `OPENZWAVE_SCENES` preprocessor symbol to have these included in the build:
30+
31+
```js
32+
zwave.createScene(label); // create a scene and assign a label, return its numeric id.
33+
zwave.removeScene(sceneId); // perform #GRExit
34+
zwave.getScenes(); // get all scenes as an array
35+
// add a zwave value to a scene
36+
zwave.addSceneValue(sceneId, nodeId, commandclass, instance, index, value);
37+
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):
38+
// remove a zwave value from a scene
39+
zwave.removeSceneValue(sceneId, nodeId, commandclass, instance, index);
40+
zwave.sceneGetValues(sceneId); // return array of values associated with this scene
41+
zwave.activateScene(sceneId); // The Show Must Go On...
42+
```

package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openzwave-shared",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "Node.JS bindings for OpenZWave including management and security functions",
55
"main": "./lib/openzwave-shared.js",
66
"types": "./types/openzwave-shared.d.ts",

0 commit comments

Comments
 (0)