You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-events.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,17 +38,19 @@ their unique identifiers are:
38
38
39
39
*`COMMAND_CLASS_SWITCH_BINARY` (37)
40
40
*`COMMAND_CLASS_SWITCH_MULTILEVEL` (38)
41
-
*`COMMAND_CLASS_VERSION` (134)
42
41
43
42
Binary switches can be controlled with `.setNodeOn()` and `.setNodeOff()`.
44
43
Dimmer (multi-level) devices can be set with `.setLevel()` (*if of course they
45
-
support the **BASIC** command class, which is not supported by most dimmers!*
44
+
support the **BASIC** command class, which is not always supported by most dimmers!*
46
45
Use `setValue` instead)
47
46
47
+
*`COMMAND_CLASS_VERSION` (134)
48
+
48
49
The version class is informational only and cannot be controlled.
49
50
50
51
The `value` object differs between command classes, and contains all the useful
51
-
information about values stored for the particular class.
52
+
information about values stored for the particular class. You can use this object
53
+
as the 1st argument in `setValue` to alter its state.
52
54
53
55
###### `.on('value changed', function(nodeid, commandclass, valueId){})` : A value has changed. Use this to keep track of value state across the network. When values are first discovered, the module enables polling on those values so that we will receive change messages. Prior to the 'node ready' event, there may be 'value changed' events even when no values were actually changed.
- The first argument is the command name, and its the *only mandatory*, which can be any of the following:
73
76
74
77
```
75
-
["AddDevice"]
76
-
["CreateNewPrimary"]
77
-
["ReceiveConfiguration"]
78
-
["RemoveDevice"]
79
-
["RemoveFailedNode"]
80
-
["HasNodeFailed"]
81
-
["ReplaceFailedNode"]
82
-
["TransferPrimaryRole"]
83
-
["RequestNetworkUpdate"]
84
-
["RequestNodeNeighborUpdate"]
85
-
["AssignReturnRoute"]
86
-
["DeleteAllReturnRoutes"]
87
-
["SendNodeInformation"]
88
-
["ReplicationSend"]
89
-
["CreateButton"]
90
-
["DeleteButton"]
78
+
"AddDevice"
79
+
"CreateNewPrimary"
80
+
"ReceiveConfiguration"
81
+
"RemoveDevice"
82
+
"RemoveFailedNode"
83
+
"HasNodeFailed"
84
+
"ReplaceFailedNode"
85
+
"TransferPrimaryRole"
86
+
"RequestNetworkUpdate"
87
+
"RequestNodeNeighborUpdate"
88
+
"AssignReturnRoute"
89
+
"DeleteAllReturnRoutes"
90
+
"SendNodeInformation"
91
+
"ReplicationSend"
92
+
"CreateButton"
93
+
"DeleteButton"
91
94
```
92
95
93
-
94
-
- The second argument is a boolean ("highpower") - should be true/false
96
+
- The second argument ("highpower") is a boolean and tells OpenZWave to use low or high power mode - should be true/false. You shouldn't use high power for inclusions though.
95
97
- The third argument is the first ZWave node to be passed to the command (if applicable for the command)
96
98
- The fourth argument is the second ZWave node to be passed to the command
0 commit comments