-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwindowcovering.html
214 lines (195 loc) · 7.86 KB
/
windowcovering.html
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
<script type="text/javascript">
RED.nodes.registerType('matterwindowcovering',{
category: 'Matter',
color: '#669966',
icon: "font-awesome/fa-window-maximize",
inputs:1,
outputs:1,
defaults: {
name: {value:""},
bridge: { value: "", type: "matterbridge", required: true },
tilt: {value: ""},
lift: {value: ""},
reversed: {value: false},
coveringType: {value: 255},
productType: {value: 255},
passthrough: {value: true},
bat: {value : false},
topic: {}
},
label: function() {
return this.name||"Window Covering";
},
paletteLabel: "Window Covering"
});
</script>
<script type="text/x-red" data-template-name="matterwindowcovering">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-config-input-bridge">Bridge</label>
<input type="text" id="node-input-bridge" style="width:70%;">
</div>
<div class="form-row">
<label for="node-input-Lift">Lift</label>
<select type="text" id="node-input-lift" style="width:50%;" >
<option value="">None</option>
<option value="lift">Lift</option>
<option value="pos">Position Aware Lift</option>
</select>
</div>
<div class="form-row">
<label for="node-input-tilt">Tilt</label>
<select type="text" id="node-input-tilt" style="width:50%;" >
<option value="">None</option>
<option value="tilt">Tilt</option>
<option value="pos">Position Aware Tilt</option>
</select>
</div>
<div class="form-row">
<label for="node-input-reversed">Reverse Direction</label>
<input type="checkbox" id="node-input-reversed" style="margin-left:10px; vertical-align:top; width:auto;">
</div>
<div class="form-row">
<label for="node-input-passthrough">Passthrough Input msg to Output</label>
<select type="text" id="node-input-passthrough" style="width:50%;" >
<option value=true>True</option>
<option value=false>False</option>
</select>
</div>
<!--
<div class="form-row">
<label for="node-input-coveringType">Type</label>
<select type="text" id="node-input-coveringType" style="width:50%;" >
<option value=0>Roller Shade</option>
<option value=1>Roller Shade 2 Motor</option>
<option value=2>Roller Shade Exterior</option>
<option value=3>Roller Shade Exterior 2 Motor</option>
<option value=4>Curtain</option>
<option value=5>Awning</option>
<option value=6>Shutter</option>
<option value=7>Tilt Blind</option>
<option value=8>Lift and Tilt Blind Shade</option>
<option value=9>Projector Screen</option>
<option value=255>Unknown</option>
</select>
<div class="form-row">
<label for="node-input-productType">Product Type </label>
<select type="text" id="node-input-productType" style="width:50%;" >
<option value=0>SimpleRoller Shade</option>
<option value=1>Roman Shade</option>
<option value=2>Balloon Shade</option>
<option value=3>Woven Wood</option>
<option value=4>Pleated Shade</option>
<option value=5>Cellular Shade</option>
<option value=6>Layered Shade</option>
<option value=7>Layered Shade 2D</option>
<option value=8>Sheer Shade</option>
<option value=9>Tilt only Interior Blind</option>
<option value=10>Interior Blind</option>
<option value=11>Vertical Blind Strip Curtain</option>
<option value=12>Interior Venetian Blind</option>
<option value=13>Exterior Venetian Blind</option>
<option value=14>Left Curtain</option>
<option value=15>Right Curtain</option>
<option value=16>Central Curtain</option>
<option value=17>Roller Shutter</option>
<option value=18>Exterior Virtical Screen</option>
<option value=19>Awning Terrace</option>
<option value=20>Awning Vertical Screen</option>
<option value=21>Tilt Only Pergola</option>
<option value=22>Swinging Shutter</option>
<option value=23>Sliding Shutter</option>
<option value=255>Unknown</option>
</select>
</div>
-->
<div class="form-row">
<label for="node-input-bat">Battery</label>
<select type="text" id="node-input-bat" style="width:50%;" >
<option value=false>None</option>
<option value="recharge">Rechargeable</option>
<option value="replace">Replaceable</option>
</select>
</div>
<div class="form-row">
<label for="node-input-topic">Topic</label>
<input type="text" id="node-input-topic" placeholder="Topic for new msgs">
</div>
</script>
<script type="text/x-red" data-help-name="matterwindowcovering">
<p>A Bridged Window Covering</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>
payload.liftPosition
<span class="property-type">
number
</span>
</dt>
<dd>
Value between 0 - 10000 representing the percentage value of open in steps of 0.01%
</dd>
<dt>
payload.tiltPosition
<span class="property-type">
number
</span>
</dt>
<dd>
Value between 0 - 10000 representing the percentage value of open in steps of 0.01%
</dd>
</dl>
</dl>
<h3>Outputs</h3>
Position Aware actuators will output their Position.
<dl class="message-properties">
<dt>
payload.liftPosition
<span class="property-type">
number
</span>
</dt>
<dd>
Value between 0 - 10000 representing the percentage value of open in steps of 0.01%
</dd>
<dt>
payload.tiltPosition
<span class="property-type">
number
</span>
</dt>
<dd>
Value between 0 - 10000 representing the percentage value of open in steps of 0.01%
</dd>
</dl>
<br>
Whereas Simple Actuators wil output the actuator and direction only
<dl class="message-properties">
<dt>
payload.action
<span class="property-type">
string
</span>
</dt>
<dd>
either <code>lift</code> or <code>tilt</code> inducating the actuator
</dd>
<dt>
payload.direction
<span class="property-type">
string
</span>
</dt>
<dd>
either <code>up</code> or <code>down</code> inducating the direction
</dd>
</dl>
<br>
<h3>Details</h3>
A Window Covering can be in one of 2 modes, Simple or Position Aware, and can then have 2 actuators Lift and Tilt.
Position aware actuators communicate their position between 0-100% back to the fabric, whereas simple just have basic Up & Down commands.
Only poistiion aware actuators can accept input. Simple is purely an output node.
</script>