-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
virtual-device.html
809 lines (752 loc) · 21.8 KB
/
virtual-device.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
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
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
<script type="text/javascript">
function vshOnEditPrepare() {
$('#node-input-deviceId').val('vshd-' + this.id.replace('.', ''))
$('#node-input-metadata').typedInput({
type: 'json',
types: ['json'],
})
const vshConnectionNodeId = $('#node-input-connection')[0].value
if (vshConnectionNodeId === '_ADD_') {
return
}
$.getJSON(
'vsh-connection/' + vshConnectionNodeId + '?_=' + new Date().getTime(),
function ({ plan }) {
$('#vsh-current-plan')
.text(plan.toUpperCase())
.addClass('vsh-plan-' + plan)
if (plan === 'free') {
setTimeout(() => $('#subscription-hint').fadeIn('slow'), 1500)
}
if (plan === 'pro') {
$('#node-input-retrievable').prop('disabled', false)
$('#retrievable-label').removeClass('retrievable-option-disabled')
}
}
)
}
RED.nodes.registerType('vsh-virtual-device', {
category: 'virtual smart home',
defaults: {
name: { value: '', required: true },
//deviceId: { value: 'vshd-xxx', required: false },
topic: { value: '', required: false },
metadata: {
value: '',
required: false,
validate: (value) => {
if (value === '') {
// empty metadata should not be marked as invalid
return true
}
try {
return typeof JSON.parse(value) === 'object'
} catch (e) {
return false
}
},
},
connection: { type: 'vsh-connection', required: true },
template: { value: 'SWITCH', required: true },
retrievable: { value: false },
passthrough: { value: false },
diff: { value: false },
filter: { value: false },
filterTopic: { value: false },
plan: { value: 'free' },
},
inputs: 1,
outputs: 1,
icon: 'vsh_icon.svg',
color: '#31C4F3',
paletteLabel: 'virtual device',
label: function () {
return this.name || 'virtual device'
},
oneditprepare: vshOnEditPrepare,
})
</script>
<style>
#subscription-hint {
display: none;
padding: 12px;
text-align: center;
border: 3px #00691c solid;
margin-top: 30px;
background-color: #e3fddd;
color: #00691c;
width: 90%;
}
#subscription-hint > h1 {
line-height: normal;
}
#subscription-hint > h2 {
margin-top: 50px;
}
#subscription-hint > ul > li {
list-style-position: inside;
}
#subscription-hint > ul > li a {
text-decoration: underline;
color: #00691c;
}
#subscription-hint img {
height: 5em;
}
.retrievable-option-disabled {
color: var(--red-ui-secondary-text-color-disabled);
}
.vsh-plan-unknown {
padding: 3px;
border: #615f5f solid 1px;
background-color: rgb(190, 190, 190);
}
.vsh-plan-free {
padding: 3px;
border: #f8dc09 solid 1px;
background-color: #ffff7a;
}
.vsh-plan-pro {
padding: 3px;
border: #00691c solid 1px;
background-color: #e3fddd;
}
</style>
<script type="text/html" data-template-name="vsh-virtual-device">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-topic"><i class="fa fa-tasks"></i> Topic</label>
<input type="text" id="node-input-topic" placeholder="Topic" />
</div>
<div class="form-row">
<label><i class="fa fa-code"></i> Metadata</label>
<input
type="text"
id="node-input-metadata"
placeholder="arbitrary optional metadata"
/>
</div>
<div class="form-row">
<label for="node-input-deviceId"
><i class="fa fa-hashtag"></i> Device ID</label
>
<input
type="text"
readonly
id="node-input-deviceId"
placeholder="vshd-???"
/>
</div>
<div class="form-row">
<label for="node-input-connection"
><i class="fa fa-amazon"></i> Connection</label
>
<input type="text" id="node-input-connection" placeholder="connection" />
</div>
<div class="form-row">
<label><i class="fa fa-credit-card"></i> Plan</label>
<span id="vsh-current-plan">
<i>available when at least 1 device is connected</i>
</span>
</div>
<div class="form-row">
<label for="node-input-template"><i class="fa fa-cubes"></i> Type</label>
<select id="node-input-template">
<option value="BLINDS">Blinds</option>
<option value="COLOR_CHANGING_LIGHT_BULB">
Color Changing Light Bulb
</option>
<option value="CONTACT_SENSOR">Contact Sensor</option>
<option value="DIMMABLE_LIGHT_BULB">Dimmable Light Bulb</option>
<option value="DIMMER_SWITCH">Dimmer Switch</option>
<option value="DOORBELL_EVENT_SOURCE">Doorbell Event Source</option>
<option value="ENTERTAINMENT_DEVICE">Entertainment Device</option>
<option value="FAN">Fan</option>
<option value="GARAGE_DOOR_OPENER">Garage Door Opener</option>
<option value="LOCK">Lock</option>
<option value="MOTION_SENSOR">Motion Sensor</option>
<option value="PLUG">Plug</option>
<option value="SCENE">Scene</option>
<option value="SWITCH">Switch</option>
<option value="TEMPERATURE_SENSOR">Temperature Sensor</option>
<option value="THERMOSTAT">Thermostat (Single-setpoint)</option>
<option value="THERMOSTAT_2">Thermostat (Dual-setpoint)</option>
</select>
</div>
<div class="form-row">
<label for="node-input-retrievable"
><i class="fa fa-arrow-up"></i> Retrievable</label
>
<input
type="checkbox"
id="node-input-retrievable"
disabled
style="display:inline-block;width:22px;vertical-align:top;"
autocomplete="off"
/>
<span id="retrievable-label" class="retrievable-option-disabled"
>Alexa can retrieve device state ("Pro" feature)</span
>
</div>
<div class="form-row">
<label for="node-input-passthrough"
><i class="fa fa-forward"></i> Passthrough</label
>
<input
type="checkbox"
id="node-input-passthrough"
style="display:inline-block;width:22px;vertical-align:top;"
autocomplete="off"
/>
Emit state on inbound message
</div>
<div class="form-row">
<label for="node-input-filter"
><i class="fa fa-filter"></i> Filter by name</label
>
<input
type="checkbox"
id="node-input-filter"
style="display:inline-block;width:22px;vertical-align:top;"
autocomplete="off"
/>
Ignore inbound messages unless "name" matches
</div>
<div class="form-row">
<label for="node-input-filterTopic"
><i class="fa fa-filter"></i> Filter by topic</label
>
<input
type="checkbox"
id="node-input-filterTopic"
style="display:inline-block;width:22px;vertical-align:top;"
autocomplete="off"
/>
Ignore inbound messages unless "topic" matches
</div>
<div class="form-row">
<label for="node-input-diff"><i class="fa fa-clone"></i> Diff</label>
<input
type="checkbox"
id="node-input-diff"
style="display:inline-block;width:22px;vertical-align:top;"
autocomplete="off"
/>
Emit only attributes set by Alexa
</div>
<div id="subscription-hint">
<h1>Upgrade to VSH Pro</h1>
<ul>
<li>control up to 200 virtual devices</li>
<li>device status retrievable by Alexa</li>
<li>cancellable at any time</li>
</ul>
<p>Switch to "Pro" on the <i>Connection</i> page</p>
</div>
</script>
<script type="text/html" data-help-name="vsh-virtual-device">
<p>A virtual device that can be controlled via Amazon Alexa.</p>
<p>
The node gets invoked through Amazon Alexa (either via a voice command or
via the Alexa app) and outputs a <code>msg</code> object containing the
updated device state as <code>payload</code>.
</p>
<p>
If the "Diff" option is enabled, the outgoing msg object will only
contain those attributes that were set by the Alexa command. For example,
"Alexa, dim the light to fifty percent" results in only the
'directive' and 'brightness' attributes being emitted.
</p>
<p>
The node also accepts inbound messages that can be used to inform Alexa
about local device changes, which will then be reflected in the Alexa app.
If the "Passthrough" option is enabled, this will also trigger an
outgoing message with the complete current local state. In this case
<code>payload.source</code> is set to 'device' instead of 'alexa'. If the
inbound message has a <code>topic</code> attribute, its value will be
present in the outbound msg instead of the topic configured in the editor.
</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>
payload
<span class="property-type">object</span>
</dt>
<dd>
key/value pairs of device attributes to update. Invalid attributes will be
silently ignored. (Available attributes are documented below). If the
'Filter' option is enabled, inbound messages will also be ignored unless
<code>msg.payload.name</code> matches the device name. If the 'Filter
topic' option is enabled, inbound messages will also be ignored unless
<code>msg.topic</code> matches the topic of the node.
</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>
topic
<span class="property-type">string</span>
</dt>
<dd>topic string as configured in the virtual device node</dd>
</dl>
<dl class="message-properties">
<dt>
metadata
<span class="property-type">object</span>
</dt>
<dd>metadata as configured in the virtual device node</dd>
</dl>
<dl class="message-properties">
<dt>
payload
<span class="property-type">object</span>
</dt>
<dd>key/value pairs of device attributes.</dd>
</dl>
<h3>Details</h3>
<p>
This node requires a connection to be configured, which links the node to an
Amazon account. This can be done by clicking the pencil icon. Also, the
Alexa skill 'virtual smart home' needs to be enabled for the same Amazon
account.
</p>
<p>
All virtual device nodes that belong to one Alexa account should share the
same connection!
</p>
<h3>Payload attributes</h3>
<p>
Depending on the configured device type, the node accepts and outputs
payloads with different attributes. For example, a switch device has the
attribute 'powerState' and a dimmable light bulb device has an additional
'brightness' attribute.
</p>
<p>
This node ships with examples that illustrate the payload structure. They
can be found in the 'import nodes' section underneath the 'import' menu.
</p>
<h4>General Attributes (always present unless stated otherwise)</h4>
<dl class="message-properties">
<dt>
payload.name
<span class="property-type">string</span>
</dt>
<dd>Name of the virtual device</dd>
</dl>
<dl class="message-properties">
<dt>
payload.type
<span class="property-type">string</span>
</dt>
<dd>Type of the virtual device</dd>
</dl>
<dl class="message-properties">
<dt>
payload.source
<span class="property-type">string</span>
</dt>
<dd>
<ul>
<li>'alexa' if the device update was triggered by Alexa</li>
<li>
'device' if the device update was triggered by an inbound message.
</li>
</ul>
</dd>
</dl>
<dl class="message-properties">
<dt>
payload.directive
<span class="property-type">string</span>
</dt>
<dd>
Name of the directive that was invoked by Alexa, e.g. 'TurnOn'. Only
present for state changes triggered by Alexa (payload.source == 'alexa')
</dd>
</dl>
<dl class="message-properties">
<dt>
payload.rawDirective
<span class="property-type">object</span>
</dt>
<dd>
Raw directive object received from the
<a
href="https://developer.amazon.com/en-US/docs/alexa/device-apis/smart-home-general-apis.html"
>Alexa Smart Home Skill API</a
>. Sensitive attributes (e.g. OAuth tokens) are excluded on purpose. Only
present for state changes triggered by Alexa (payload.source == 'alexa')
</dd>
</dl>
<h4>Blinds</h4>
<dl class="message-properties">
<dt>
payload.percentage
<span class="property-type">int</span>
</dt>
<dd>Position in % (0...100). 100 = Open</dd>
</dl>
<h4>Color Changing Light Bulb</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.brightness
<span class="property-type">int</span>
</dt>
<dd>Brightness in % (0...100)</dd>
<dt>
payload.lightMode
<span class="property-type">string</span>
</dt>
<dd>
<ul>
<li>'temp': colorTemperatureInKelvin attribute is applied</li>
<li>
'hsb': color attribute is applied. For convenience, the color will
also be populated as <code>payload.color_rgb</code>,
<code>payload.color_hex</code>, and <code>payload.color_cmyk</code>.
</li>
</ul>
</dd>
<dt>
payload.colorTemperatureInKelvin
<span class="property-type">int</span>
</dt>
<dd>Color Temperature in Kelvin (1000...10000)</dd>
<dt>
payload.color
<span class="property-type">object</span>
</dt>
<dd>Color expressed as hue, saturation and brightness (hsb)</dd>
<dt>
payload.color.hue
<span class="property-type">int</span>
</dt>
<dd>Hue (0...360)</dd>
<dt>
payload.color.saturation
<span class="property-type">float</span>
</dt>
<dd>Saturation (0.0...1.0)</dd>
<dt>
payload.color.brightness
<span class="property-type">float</span>
</dt>
<dd>Brightness (0.0...1.0)</dd>
<dt>
payload.color_rgb
<span class="property-type">array(3)</span>
</dt>
<dd>RGB representation of <code>payload.color</code> (0...255)</dd>
<dt>
payload.color_hex
<span class="property-type">string</span>
</dt>
<dd>
Hexadecimal representation of <code>payload.color</code>, e.g.
"#FF00AA"
</dd>
<dt>
payload.color_cmyk
<span class="property-type">array(4)</span>
</dt>
<dd>CMYK representation of <code>payload.color</code> (0...100)</dd>
<dt>
payload.color_lab
<span class="property-type">array(3)</span>
</dt>
<dd>[EXPERIMENTAL] LAB representation of <code>payload.color</code></dd>
<dt>
payload.color_xy
<span class="property-type">array(2)</span>
</dt>
<dd>
[EXPERIMENTAL] XY representation of <code>payload.color</code>. color_xy
is only set for outbound messages and cannot yet be set on inbound
messages.
</dd>
<dt>
payload.color_xyz
<span class="property-type">array(3)</span>
</dt>
<dd>[EXPERIMENTAL] XYZ representation of <code>payload.color</code></dd>
</dl>
<h4>Contact Sensor</h4>
<dl class="message-properties">
<dt>
payload.detectionState
<span class="property-type">string</span>
</dt>
<dd>
'DETECTED' = The sensor is open and the two pieces of the sensor are not
in contact with each other. For example, after a window has been opened.
</dd>
<dd>
'NOT_DETECTED' = The sensor is closed and the two pieces of the sensor are
in contact with each other.
</dd>
</dl>
<h4>Dimmable Light Bulb</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.brightness
<span class="property-type">int</span>
</dt>
<dd>Brightness in % (0...100)</dd>
</dl>
<h4>Dimmer Switch</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.brightness
<span class="property-type">int</span>
</dt>
<dd>Brightness in % (0...100)</dd>
</dl>
<h4>Doorbell Event Source</h4>
<dl class="message-properties">
<dt>
payload.detectionState
<span class="property-type">string</span>
</dt>
<dd>'DETECTED' = Doorbell is pressed.</dd>
<dd>'NOT_DETECTED' = Doorbell is not pressed.</dd>
</dl>
<h4>Entertainment Device</h4>
<dl class="message-properties">
<dt>
payload.channel
<span class="property-type">int</span>
</dt>
<dd>Channel number (1...999)</dd>
<dt>
payload.input
<span class="property-type">string</span>
</dt>
<dd>
Input source (e.g. 'HDMI 1',
<a
href="https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-inputcontroller.html"
>etc.</a
>)
</dd>
<dt>
payload.muted
<span class="property-type">boolean</span>
</dt>
<dd>
<code>true</code> when the speaker is muted, otherwise <code>false</code>
</dd>
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.volume
<span class="property-type">int</span>
</dt>
<dd>Volume in % (0...100)</dd>
</dl>
<h4>Fan</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.speed
<span class="property-type">int</span>
</dt>
<dd>Fan speed (0...10)</dd>
</dl>
<h4>Garage Door Opener</h4>
<p>
Garage Door Opener is supported by Alexa only in the following locales:
en-US.
</p>
<dl class="message-properties">
<dt>
payload.mode
<span class="property-type">string</span>
</dt>
<dd>'Position.Up' or 'Position.Down'</dd>
</dl>
<h4>Lock</h4>
<dl class="message-properties">
<dt>
payload.lockState
<span class="property-type">string</span>
</dt>
<dd>'LOCKED' = The device is currently locked.</dd>
<dd>'UNLOCKED' = The device is currently unlocked.</dd>
<dd>
'JAMMED' = The lock can't transition to locked or unlocked because the
locking mechanism is jammed.
</dd>
</dl>
<h4>Motion Sensor</h4>
<dl class="message-properties">
<dt>
payload.detectionState
<span class="property-type">string</span>
</dt>
<dd>'DETECTED' = Motion is detected.</dd>
<dd>'NOT_DETECTED' = Motion is not detected.</dd>
</dl>
<h4>Plug</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
</dl>
<h4>Switch</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
</dl>
<h4>Scene</h4>
<p>
Scene nodes do not accept inbound messages and can only be triggered by
Alexa.
</p>
<dl class="message-properties">
<dt>
payload.isActivated
<span class="property-type">boolean</span>
</dt>
<dd>
<code>true</code> when the scene was activated, <code>false</code> when
the scene was deactivated
</dd>
</dl>
<h4>Temperature Sensor</h4>
<dl class="message-properties">
<dt>
payload.temperature
<span class="property-type">float</span>
</dt>
<dd>Temperature</dd>
<dt>
payload.scale
<span class="property-type">string</span>
</dt>
<dd>
Scale / unit of temperature. Allowed values: 'CELSIUS', 'FAHRENHEIT',
'KELVIN'
</dd>
</dl>
<h4>Thermostat (Single-setpoint)</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.temperature
<span class="property-type">float</span>
</dt>
<dd>Measured temperature</dd>
<dt>
payload.scale
<span class="property-type">string</span>
</dt>
<dd>
Scale / unit of temperature. Allowed values: 'CELSIUS', 'FAHRENHEIT',
'KELVIN'
</dd>
<dt>
payload.targetTemperature
<span class="property-type">float</span>
</dt>
<dd>Target temperature</dd>
<dt>
payload.targetScale
<span class="property-type">string</span>
</dt>
<dd>
Scale / unit of targetTemperature. Allowed values: 'CELSIUS',
'FAHRENHEIT', 'KELVIN'
</dd>
<dt>
payload.thermostatMode
<span class="property-type">string</span>
</dt>
<dd>'AUTO', 'HEAT', 'COOL', 'ECO', 'OFF'</dd>
</dl>
<h4>Thermostat (Dual-setpoint)</h4>
<dl class="message-properties">
<dt>
payload.powerState
<span class="property-type">string</span>
</dt>
<dd>'ON' or 'OFF'</dd>
<dt>
payload.lowerSetpoint
<span class="property-type">float</span>
</dt>
<dd>Lower setpoint temperature</dd>
<dt>
payload.lowerSetpointScale
<span class="property-type">string</span>
</dt>
<dd>
Scale / unit of lowerSetpoint. Allowed values: 'CELSIUS', 'FAHRENHEIT',
'KELVIN'
</dd>
<dt>
payload.upperSetpoint
<span class="property-type">float</span>
</dt>
<dd>Upper setpoint temperature</dd>
<dt>
payload.upperSetpointScale
<span class="property-type">string</span>
</dt>
<dd>
Scale / unit of upperSetpoint. Allowed values: 'CELSIUS', 'FAHRENHEIT',
'KELVIN'
</dd>
<dt>
payload.temperature
<span class="property-type">float</span>
</dt>
<dd>Measured temperature</dd>
<dt>
payload.scale
<span class="property-type">string</span>
</dt>
<dd>
Scale / unit of temperature. Allowed values: 'CELSIUS', 'FAHRENHEIT',
'KELVIN'
</dd>
<dt>
payload.thermostatMode
<span class="property-type">string</span>
</dt>
<dd>'AUTO', 'HEAT', 'COOL', 'ECO', 'OFF'</dd>
</dl>
</script>