-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paththermostat.html
129 lines (118 loc) · 4.77 KB
/
thermostat.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
<script type="text/javascript">
RED.nodes.registerType('matterthermostat',{
category: 'Matter',
color: '#289db6',
icon: "font-awesome/fa-thermometer-empty",
inputs:1,
outputs:1,
defaults: {
name: {value:""},
bridge: { value: "", type: "matterbridge", required: true },
mode: {value: "heat"},
passthrough: {value: true},
bat: {value : false},
topic: {}
},
label: function() {
return this.name||"Thermostat";
},
paletteLabel: "Thermostat"
});
</script>
<script type="text/x-red" data-template-name="matterthermostat">
<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-mode">Mode</label>
<select type="text" id="node-input-mode" style="width:50%;" >
<option value="heat">Heat</option>
<option value="cool">Cool</option>
<option value="heatcool">Heat & Cool</option>
</select>
</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-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="matterthermostat">
<p>A Bridged Thermostat</p>
The Thermostat device has mulitple functions, it tracks the local temperature, it allows you to select a mode, heating or cooling and has setPoints (eg the desired temperature) for each of the modes.
Note that the Thermostat device does not currently control the call for heat/cool it simple tracks the temperature and setPoint, any control of heating or cooling devices needs to be implemented in your flow.
<h3>Inputs</h3>
<dl class="message-properties">
<dt>
payload.temperature
<span class="property-type">
number
</span>
</dt>
<dd>
Value between -27315 - 32767 representing the temperature in degrees celsuius in steps of 0.01 degree (eg 18C would be represented as 1800),
</dd>
<dt>
payload.setPoint
<span class="property-type">
number
</span>
</dt>
<dd>
Value between 0 - 3500 representing the desired temperature in degrees celsuius in steps of 0.01 degree (eg 18C would be represented as 1800),
Note the device will hold different setPoints for heat and cool mode, if the mode is not in the payload then the current mode will be used.
</dd>
<dt>
payload.mode
<span class="property-type">
string
</span>
</dt>
<dd>
The current mode, either <code>heat</code> <code>cool</code> or <code>off</code>
</dd>
</dl>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>
payload.setPoint
<span class="property-type">
number
</span>
</dt>
<dd>
Value between 0 - 3500 representing the desired temperature in degrees celsuius in steps of 0.01 degree (eg 18C would be represented as 1800),
Note the device will hold different setPoints for heat and cool mode, whenever either value is updates both mode and setPoint are output
<dt>
payload.mode
<span class="property-type">
string
</span>
</dt>
<dd>
The current mode, either <code>heat</code> <code>cool</code> or <code>off</code>
</dd>
</dl>
</dl>
<h3>Details</h3>
</script>