Skip to content

Commit 793555d

Browse files
ptphan28rzr
authored andcommitted
UIC-3272: Documentation for the Color Switch command class.
Origin: #146 Signed-off-by: Philippe Coval <[email protected]>
1 parent 94b1365 commit 793555d

File tree

1 file changed

+227
-0
lines changed

1 file changed

+227
-0
lines changed
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
Color Switch
2+
=============
3+
4+
Version supported : 3
5+
6+
.. contents::
7+
:depth: 2
8+
:local:
9+
:backlinks: none
10+
11+
12+
Interview process
13+
*****************
14+
15+
#. :ref:`Color Switch Supported Get <color-switch-supported-get-command>`
16+
#. For each supported Color Component: :ref:`Color Switch Get <color-switch-get-command>`
17+
18+
Command Class Commands
19+
**********************
20+
21+
.. _color-switch-supported-get-command:
22+
23+
Color Switch Supported Get
24+
---------------------------
25+
26+
Trigger on undefined **reported** value of ``SUPPORTED_COLOR_COMPONENT_MASK``
27+
28+
Color Switch Supported Report
29+
------------------------------
30+
31+
Mapping between Report command and attribute store :
32+
33+
.. list-table::
34+
:header-rows: 1
35+
36+
* - Z-Wave Command Attribute
37+
- Z-Wave Attribute Store
38+
* - ``Color Component mask 1 | ((Color Component mask 2) << 8)``
39+
- ``SUPPORTED_COLOR_COMPONENT_MASK``
40+
41+
.. note::
42+
``Color Component mask 1``, ``Color Component mask 2`` used for calculating supported ``COLOR_COMPONENT_ID``
43+
44+
45+
Color Switch Set
46+
-------------------------------
47+
48+
Trigger on new **desired** value of ``VALUE``:
49+
50+
Mapping between attribute store and Set command:
51+
52+
.. list-table::
53+
:header-rows: 1
54+
55+
* - Z-wave Attribute Store
56+
- Attribute State
57+
- Z-wave Set Field
58+
* - ``VALUE``
59+
- Desired or Reported
60+
- ``Value``
61+
* - ``DURATION``
62+
- Desired or Reported
63+
- ``Duration``
64+
* - ``COLOR_COMPONENT_ID``
65+
- Desired or Reported
66+
- ``Color Component ID``
67+
68+
.. _color-switch-get-command:
69+
70+
Color Switch Get
71+
-------------------------------
72+
73+
Trigger on undefined **reported** value of ``VALUE``:
74+
75+
76+
Color Switch Report
77+
----------------------------------
78+
79+
Mapping between Report command and attribute store :
80+
81+
.. list-table::
82+
:header-rows: 1
83+
84+
* - Report Field Command
85+
- Z-Wave Attribute Store
86+
* - ``Color Component ID``
87+
- ``COLOR_COMPONENT_ID``
88+
* - ``Current Value``
89+
- ``VALUE``
90+
* - ``Duration``
91+
- ``DURATION``
92+
93+
Color Switch Start Level Change
94+
--------------------------
95+
96+
Trigger on new **desired** value of ``START_CHANGE``:
97+
98+
Mapping between attribute store and command:
99+
100+
.. list-table::
101+
:header-rows: 1
102+
103+
* - Z-wave Attribute Store
104+
- Attribute State
105+
- Z-wave Set Field
106+
* - ``START_LEVEL``
107+
- Desired or Reported
108+
- ``Start Level``
109+
* - ``UP_DOWN``
110+
- Desired or Reported
111+
- ``Up/Down``
112+
* - ``IGNORE_START_LEVEL``
113+
- Desired or Reported
114+
- ``Ignore Start State``
115+
* - ``COLOR_COMPONENT_ID``
116+
- Desired or Reported
117+
- ``Color Component ID``
118+
* - ``START_LEVEL``
119+
- Desired or Reported
120+
- ``Start Level``
121+
* - ``DURATION``
122+
- Desired or Reported
123+
- ``Duration``
124+
125+
126+
127+
Color Switch Stop Level Change
128+
--------------------------
129+
130+
Trigger on new **desired** value of ``STOP_CHANGE``:
131+
132+
Mapping between attribute store and command:
133+
134+
.. list-table::
135+
:header-rows: 1
136+
137+
* - Z-wave Attribute Store
138+
- Attribute State
139+
- Z-wave Set Field
140+
* - ``COLOR_COMPONENT_ID``
141+
- Desired or Reported
142+
- ``Color Component ID``
143+
144+
.. note::
145+
The structure of the attribute store is :
146+
147+
.. code:: text
148+
149+
|__ SUPPORTED_COLOR_COMPONENT_MASK
150+
|__ STATE
151+
|__ COLOR_COMPONENT_ID
152+
| |__ VALUE
153+
| |__ START_CHANGE
154+
| |__ STOP_CHANGE
155+
|__ DURATION
156+
|__ UP_DOWN
157+
|__ IGNORE_START_LEVEL
158+
|__ START_LEVEL
159+
160+
161+
Unify Clusters
162+
**************
163+
164+
UAM files
165+
---------
166+
167+
.. list-table::
168+
:header-rows: 1
169+
170+
* - UAM File
171+
- Cluster
172+
- Comments
173+
* - ``SwitchColor.uam``
174+
- ``Unify_SwitchColor.xml``
175+
- Mapping between Color Switch command class and Color Switch cluster
176+
177+
Bindings
178+
--------
179+
180+
.. list-table::
181+
:header-rows: 1
182+
183+
* - Z-Wave Attribute Store
184+
- Cluster attribute
185+
- Comments
186+
* - ``VALUE``
187+
- UnifySwitchColor WarmWhite
188+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x00)
189+
* - ``VALUE``
190+
- UnifySwitchColor ColdWhite
191+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x01)
192+
* - ``VALUE``
193+
- UnifySwitchColor Red
194+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x02)
195+
* - ``VALUE``
196+
- UnifySwitchColor Green
197+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x03)
198+
* - ``VALUE``
199+
- UnifySwitchColor Blue
200+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x04)
201+
* - ``VALUE``
202+
- UnifySwitchColor Amber
203+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x05)
204+
* - ``VALUE``
205+
- UnifySwitchColor Cyan
206+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x06)
207+
* - ``VALUE``
208+
- UnifySwitchColor Purple
209+
- Z-Wave <-> Cluster (If ``COMPONENT_ID`` = 0x07)
210+
211+
212+
Command actions
213+
---------------
214+
215+
.. list-table::
216+
:widths: 20 50 30
217+
:header-rows: 1
218+
219+
* - Action
220+
- MQTT Topic
221+
- Comments
222+
* - End user performs set the color
223+
- ``ucl/by-unid/<UNID>/<EP>/UnifySwitchColor/Commands/SetColor {"ColorComponentId" : 4, "Value" : 100, "Duration" : 0}``
224+
- See ``ColorComponentId`` values in Bindings table
225+
* - End user performs start/stop enhancing a color component
226+
- ``ucl/by-unid/<UNID>/<EP>/UnifySwitchColor/Commands/StartStopChange {"StartStop" : true, "UpDown" : false, "IgnorStartLevel" : true, "ColorComponentId" : 2, "StartLevel" : 50, "Duration" : 10}``
227+
- ``StartStop`` = ``true`` for Start level change, = ``false`` for Stop level change; ``UpDown`` = ``true`` for decreasing, = ``false`` for increasing

0 commit comments

Comments
 (0)