forked from OpenZWave/python-openzwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalue.html
More file actions
487 lines (452 loc) · 18.7 KB
/
Copy pathvalue.html
File metadata and controls
487 lines (452 loc) · 18.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
<div class="section" id="value-documentation">
<h1>Value documentation</h1>
<p>The value.</p>
<div class="toctree-wrapper compound">
<ul class="simple">
</ul>
</div>
<span class="target" id="module-openzwave.value"></span><span class="target" id="module-openzwave.value"></span><dl class="docutils">
<dt>This file is part of <strong>python-openzwave</strong> project <a class="reference external" href="https://github.com/OpenZWave/python-openzwave">https://github.com/OpenZWave/python-openzwave</a>.</dt>
<dd><table class="first last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">platform:</th><td class="field-body">Unix, Windows, MacOS X</td>
</tr>
<tr class="field-even field"><th class="field-name">sinopsis:</th><td class="field-body">openzwave API</td>
</tr>
</tbody>
</table>
</dd>
</dl>
<p>License : GPL(v3)</p>
<p><strong>python-openzwave</strong> is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.</p>
<p><strong>python-openzwave</strong> is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with python-openzwave. If not, see <a class="reference external" href="http://www.gnu.org/licenses">http://www.gnu.org/licenses</a>.</p>
<dl class="class">
<dt id="openzwave.value.ZWaveValue">
<em class="property">class </em><tt class="descclassname">openzwave.value.</tt><tt class="descname">ZWaveValue</tt><big>(</big><em>value_id</em>, <em>network=None</em>, <em>parent=None</em><big>)</big></dt>
<dd><p>Represents a single value.</p>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.check_data">
<tt class="descname">check_data</tt><big>(</big><em>data</em><big>)</big></dt>
<dd><p>Check that data is correct for this value.
Return the data in a correct type. None is data is incorrect.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>data</strong> (<em>lambda</em>) – The data value to check</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A variable of the good type if the data is correct. None otherwise.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">variable</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.command_class">
<tt class="descname">command_class</tt></dt>
<dd><p>The command class of the value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The command class of this value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.data">
<tt class="descname">data</tt></dt>
<dd><p>Get the current data of the value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The data of the value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">depending of the type of the value</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.data_as_string">
<tt class="descname">data_as_string</tt></dt>
<dd><p>Get the value data as String.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.data_items">
<tt class="descname">data_items</tt></dt>
<dd><p>When type of value is list, data_items contains a list of valid values</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The valid values or a help string</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">string or set</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.disable_poll">
<tt class="descname">disable_poll</tt><big>(</big><big>)</big></dt>
<dd><p>Disable poll off this value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if polling was disabled.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.enable_poll">
<tt class="descname">enable_poll</tt><big>(</big><em>intensity=1</em><big>)</big></dt>
<dd><p>Enable the polling of a device’s state.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>intensity</strong> (<em>int</em>) – The intensity of the poll</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">True if polling was enabled.</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.genre">
<tt class="descname">genre</tt></dt>
<dd><p>Get the genre of the value. The genre classifies a value to enable
low-level system or configuration parameters to be filtered out
by the application</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">genre of the value (Basic, User, Config, System)</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.help">
<tt class="descname">help</tt></dt>
<dd><p>Gets a help string describing the value’s purpose and usage.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.id_on_network">
<tt class="descname">id_on_network</tt></dt>
<dd><p>Get an unique id for this value.</p>
<p>The scenes use this to retrieve values</p>
<div class="highlight-xml"><div class="highlight"><pre><span class="nt"><Scene</span> <span class="na">id=</span><span class="s">"1"</span> <span class="na">label=</span><span class="s">"scene1"</span><span class="nt">></span>
<span class="nt"><Value</span> <span class="na">homeId=</span><span class="s">"0x014d0ef5"</span> <span class="na">nodeId=</span><span class="s">"2"</span> <span class="na">genre=</span><span class="s">"user"</span> <span class="na">commandClassId=</span><span class="s">"38"</span> <span class="na">instance=</span><span class="s">"1"</span> <span class="na">index=</span><span class="s">"0"</span> <span class="na">type=</span><span class="s">"byte"</span><span class="nt">></span>54<span class="nt"></Value></span>
<span class="nt"></Scene></span>
</pre></div>
</div>
<p>The format is :</p>
<blockquote>
<div>home_id.node_id.command_class.instance.index</div></blockquote>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.index">
<tt class="descname">index</tt></dt>
<dd><p>Get the value index. The index is used to identify one of multiple
values created and managed by a command class. In the case of configurable
parameters (handled by the configuration command class), the index is the
same as the parameter ID.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">index of the value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.instance">
<tt class="descname">instance</tt></dt>
<dd><p>Get the command class instance of this value. It is possible for there to be
multiple instances of a command class, although currently it appears that
only the SensorMultilevel command class ever does this.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">instance of the value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.is_change_verified">
<tt class="descname">is_change_verified</tt><big>(</big><big>)</big></dt>
<dd><p>determine if value changes upon a refresh should be verified.
If so, the library will immediately refresh the value a second time whenever a change is observed.
This helps to filter out spurious data reported occasionally by some devices.</p>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.is_polled">
<tt class="descname">is_polled</tt></dt>
<dd><p>Verify that the value is polled.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.is_read_only">
<tt class="descname">is_read_only</tt></dt>
<dd><p>Test whether the value is read-only.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the value cannot be changed by the user.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.is_set">
<tt class="descname">is_set</tt></dt>
<dd><p>Test whether the value has been set.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the value has actually been set by a status message
from the device, rather than simply being the default.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.is_write_only">
<tt class="descname">is_write_only</tt></dt>
<dd><p>Test whether the value is write-only.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the value can only be written to and not read.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.label">
<tt class="descname">label</tt></dt>
<dd><p>Get the label of the value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.max">
<tt class="descname">max</tt></dt>
<dd><p>Gets the maximum that this value may contain.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.min">
<tt class="descname">min</tt></dt>
<dd><p>Gets the minimum that this value may contain.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.node">
<tt class="descname">node</tt></dt>
<dd><p>The value_id of the value.</p>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.parent_id">
<tt class="descname">parent_id</tt></dt>
<dd><p>Get the parent_id of the value.</p>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.poll_intensity">
<tt class="descname">poll_intensity</tt></dt>
<dd><p>The poll intensity of the value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">0=none, 1=every time through the list, 2-every other time, etc</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.precision">
<tt class="descname">precision</tt></dt>
<dd><p>Gets a float value’s precision.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">a float value’s precision</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.refresh">
<tt class="descname">refresh</tt><big>(</big><big>)</big></dt>
<dd><p>Refresh the value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the command was transmitted to controller</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.set_change_verified">
<tt class="descname">set_change_verified</tt><big>(</big><em>verify</em><big>)</big></dt>
<dd><p>Sets a flag indicating whether value changes noted upon a refresh should be verified.</p>
<p>If so, the library will immediately refresh the value a second time whenever a change is observed.
This helps to filter out spurious data reported occasionally by some devices.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>verify</strong> (<em>bool</em>) – if true, verify changes; if false, don’t verify changes.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="openzwave.value.ZWaveValue.to_dict">
<tt class="descname">to_dict</tt><big>(</big><em>extras=['all']</em><big>)</big></dt>
<dd><p>Return a dict representation of the node.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>extras</strong> (<em>[]</em>) – The extra inforamtions to add</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">A dict</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">dict()</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.type">
<tt class="descname">type</tt></dt>
<dd><p>Get the type of the value. The type describes the data held by the value
and enables the user to select the correct value accessor method in the
Manager class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">type of the value</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.units">
<tt class="descname">units</tt></dt>
<dd><p>Gets the units that the value is measured in.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="attribute">
<dt id="openzwave.value.ZWaveValue.value_id">
<tt class="descname">value_id</tt></dt>
<dd><p>Get the value_id of the value.</p>
</dd></dl>
</dd></dl>
</div>