@avantics/node-red-home-automation 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +276 -48
- package/dist/lib/cover-publishing.js +20 -6
- package/dist/lib/home-assistant-setting.d.ts +23 -0
- package/dist/lib/home-assistant-setting.js +39 -0
- package/dist/lib/motion-policy.d.ts +1 -0
- package/dist/lib/motion-policy.js +21 -1
- package/dist/lib/room-controller.d.ts +4 -0
- package/dist/lib/room-controller.js +122 -14
- package/dist/lib/room-holds.d.ts +34 -0
- package/dist/lib/room-holds.js +66 -0
- package/dist/lib/room-publishing.d.ts +1 -0
- package/dist/lib/room-publishing.js +11 -0
- package/dist/lib/scene-publishing.d.ts +30 -0
- package/dist/lib/scene-publishing.js +63 -0
- package/dist/lib/scene.d.ts +61 -0
- package/dist/lib/scene.js +170 -0
- package/dist/lib/shelly-cover.js +5 -0
- package/dist/lib/shelly-relay-light.d.ts +24 -0
- package/dist/lib/shelly-relay-light.js +93 -0
- package/dist/lib/shelly-switch.d.ts +8 -0
- package/dist/lib/shelly-switch.js +37 -8
- package/dist/lib/theatre-activity-controller.js +4 -0
- package/dist/lib/theatre-metrics.js +6 -4
- package/dist/lib/theatre-slo.js +3 -0
- package/dist/lib/theatre-state-contract.d.ts +4 -2
- package/dist/lib/theatre-state-contract.js +51 -8
- package/dist/lib/theatre-state.js +3 -0
- package/dist/nodes/activity-lighting-controller.html +1 -1
- package/dist/nodes/adapter.d.ts +5 -1
- package/dist/nodes/adapter.js +35 -2
- package/dist/nodes/avr-controller.html +86 -20
- package/dist/nodes/avr-controller.js +23 -11
- package/dist/nodes/circadian-policy.html +88 -19
- package/dist/nodes/circadian-policy.js +30 -11
- package/dist/nodes/cover-controller.html +91 -24
- package/dist/nodes/cover-controller.js +25 -12
- package/dist/nodes/device-side.d.ts +20 -0
- package/dist/nodes/device-side.js +72 -0
- package/dist/nodes/home-assistant-discovery.d.ts +26 -0
- package/dist/nodes/home-assistant-discovery.js +64 -0
- package/dist/nodes/house-schedule-mqtt.html +74 -4
- package/dist/nodes/house-schedule-mqtt.js +22 -8
- package/dist/nodes/motion-policy.html +91 -21
- package/dist/nodes/motion-policy.js +44 -11
- package/dist/nodes/mqtt-broker-link.d.ts +41 -0
- package/dist/nodes/mqtt-broker-link.js +91 -0
- package/dist/nodes/occupancy-fusion.html +87 -19
- package/dist/nodes/occupancy-fusion.js +23 -11
- package/dist/nodes/publishing-side.d.ts +20 -0
- package/dist/nodes/publishing-side.js +66 -0
- package/dist/nodes/room-controller.html +128 -43
- package/dist/nodes/room-controller.js +63 -16
- package/dist/nodes/scene.d.ts +3 -0
- package/dist/nodes/scene.html +226 -0
- package/dist/nodes/scene.js +121 -0
- package/dist/nodes/shelly-cover.html +46 -2
- package/dist/nodes/shelly-cover.js +19 -4
- package/dist/nodes/shelly-switch.html +80 -6
- package/dist/nodes/shelly-switch.js +32 -7
- package/dist/nodes/theatre-state-contract.html +76 -8
- package/dist/nodes/theatre-state-contract.js +33 -14
- package/dist/nodes/z2m-cover.html +46 -2
- package/dist/nodes/z2m-cover.js +21 -4
- package/dist/nodes/z2m-light.html +50 -2
- package/dist/nodes/z2m-light.js +26 -6
- package/examples/Cover control.json +38 -102
- package/examples/Cover pair.json +36 -3
- package/examples/Home theatre activity.json +46 -102
- package/examples/Home theatre equipment.json +34 -2
- package/examples/House schedule.json +58 -80
- package/examples/Room lighting.json +45 -55
- package/examples/Scene.json +215 -0
- package/examples/Shelly cover.json +36 -116
- package/examples/Shelly switch.json +52 -148
- package/package.json +2 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "example-house-schedule-house-schedule-example",
|
|
4
4
|
"type": "comment",
|
|
5
5
|
"name": "House schedule example",
|
|
6
|
-
"info": "
|
|
6
|
+
"info": "Needs: Two Zigbee2MQTT lights on your broker, one per room.\n\nA house schedule shared by two areas. Each area's circadian lighting policy chooses the house schedule as its Schedule and follows it without wires, and styles its own room. \"wake earlier\" changes the schedule through the optional MQTT node, which publishes its times and reads changes to them on its set topics, with Home Assistant time entities. Each room reaches its light through a zigbee2mqtt light node: set its friendly name.\n\nBefore deploying, open the \"your MQTT broker\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.",
|
|
7
7
|
"x": 170,
|
|
8
8
|
"y": 40,
|
|
9
9
|
"wires": []
|
|
@@ -37,16 +37,15 @@
|
|
|
37
37
|
"type": "home-house-schedule-mqtt",
|
|
38
38
|
"name": "",
|
|
39
39
|
"schedule": "example-house-schedule-house",
|
|
40
|
-
"discovery": true,
|
|
41
40
|
"discoveryPrefix": "homeassistant",
|
|
42
41
|
"idScheme": "node",
|
|
43
42
|
"x": 340,
|
|
44
43
|
"y": 120,
|
|
45
44
|
"wires": [
|
|
46
|
-
[
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
[]
|
|
46
|
+
],
|
|
47
|
+
"broker": "example-mqtt-broker",
|
|
48
|
+
"homeAssistant": "discovery"
|
|
50
49
|
},
|
|
51
50
|
{
|
|
52
51
|
"id": "example-house-schedule-living-circadian",
|
|
@@ -63,8 +62,6 @@
|
|
|
63
62
|
"refreshTransitionSeconds": 60,
|
|
64
63
|
"refreshSeconds": 60,
|
|
65
64
|
"initialSleep": false,
|
|
66
|
-
"publishState": false,
|
|
67
|
-
"discovery": false,
|
|
68
65
|
"discoveryPrefix": "homeassistant",
|
|
69
66
|
"idScheme": "node",
|
|
70
67
|
"x": 340,
|
|
@@ -74,7 +71,9 @@
|
|
|
74
71
|
"example-house-schedule-living"
|
|
75
72
|
],
|
|
76
73
|
[]
|
|
77
|
-
]
|
|
74
|
+
],
|
|
75
|
+
"broker": "example-mqtt-broker",
|
|
76
|
+
"homeAssistant": "off"
|
|
78
77
|
},
|
|
79
78
|
{
|
|
80
79
|
"id": "example-house-schedule-bedroom-circadian",
|
|
@@ -91,8 +90,6 @@
|
|
|
91
90
|
"refreshTransitionSeconds": 60,
|
|
92
91
|
"refreshSeconds": 60,
|
|
93
92
|
"initialSleep": false,
|
|
94
|
-
"publishState": false,
|
|
95
|
-
"discovery": false,
|
|
96
93
|
"discoveryPrefix": "homeassistant",
|
|
97
94
|
"idScheme": "node",
|
|
98
95
|
"x": 340,
|
|
@@ -102,7 +99,9 @@
|
|
|
102
99
|
"example-house-schedule-bedroom"
|
|
103
100
|
],
|
|
104
101
|
[]
|
|
105
|
-
]
|
|
102
|
+
],
|
|
103
|
+
"broker": "example-mqtt-broker",
|
|
104
|
+
"homeAssistant": "off"
|
|
106
105
|
},
|
|
107
106
|
{
|
|
108
107
|
"id": "example-house-schedule-living",
|
|
@@ -115,17 +114,15 @@
|
|
|
115
114
|
"x": 600,
|
|
116
115
|
"y": 100,
|
|
117
116
|
"wires": [
|
|
118
|
-
[
|
|
119
|
-
"example-house-schedule-living-commands"
|
|
120
|
-
],
|
|
117
|
+
[],
|
|
121
118
|
[
|
|
122
119
|
"example-house-schedule-living-light-main"
|
|
123
120
|
],
|
|
124
121
|
[]
|
|
125
122
|
],
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
123
|
+
"idScheme": "node",
|
|
124
|
+
"broker": "example-mqtt-broker",
|
|
125
|
+
"homeAssistant": "off"
|
|
129
126
|
},
|
|
130
127
|
{
|
|
131
128
|
"id": "example-house-schedule-living-light-main",
|
|
@@ -138,13 +135,13 @@
|
|
|
138
135
|
"x": 470,
|
|
139
136
|
"y": 100,
|
|
140
137
|
"wires": [
|
|
141
|
-
[
|
|
142
|
-
"example-house-schedule-living-commands"
|
|
143
|
-
],
|
|
138
|
+
[],
|
|
144
139
|
[
|
|
145
140
|
"example-house-schedule-living"
|
|
146
141
|
]
|
|
147
|
-
]
|
|
142
|
+
],
|
|
143
|
+
"broker": "example-mqtt-broker",
|
|
144
|
+
"publishesThroughOutput": false
|
|
148
145
|
},
|
|
149
146
|
{
|
|
150
147
|
"id": "example-house-schedule-bedroom",
|
|
@@ -157,17 +154,15 @@
|
|
|
157
154
|
"x": 600,
|
|
158
155
|
"y": 160,
|
|
159
156
|
"wires": [
|
|
160
|
-
[
|
|
161
|
-
"example-house-schedule-bedroom-commands"
|
|
162
|
-
],
|
|
157
|
+
[],
|
|
163
158
|
[
|
|
164
159
|
"example-house-schedule-bedroom-light-main"
|
|
165
160
|
],
|
|
166
161
|
[]
|
|
167
162
|
],
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
163
|
+
"idScheme": "node",
|
|
164
|
+
"broker": "example-mqtt-broker",
|
|
165
|
+
"homeAssistant": "off"
|
|
171
166
|
},
|
|
172
167
|
{
|
|
173
168
|
"id": "example-house-schedule-bedroom-light-main",
|
|
@@ -180,61 +175,13 @@
|
|
|
180
175
|
"x": 470,
|
|
181
176
|
"y": 160,
|
|
182
177
|
"wires": [
|
|
183
|
-
[
|
|
184
|
-
"example-house-schedule-bedroom-commands"
|
|
185
|
-
],
|
|
178
|
+
[],
|
|
186
179
|
[
|
|
187
180
|
"example-house-schedule-bedroom"
|
|
188
181
|
]
|
|
189
|
-
]
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"id": "example-house-schedule-living-commands",
|
|
193
|
-
"type": "debug",
|
|
194
|
-
"name": "living room commands",
|
|
195
|
-
"active": true,
|
|
196
|
-
"tosidebar": true,
|
|
197
|
-
"console": false,
|
|
198
|
-
"tostatus": false,
|
|
199
|
-
"complete": "true",
|
|
200
|
-
"targetType": "full",
|
|
201
|
-
"statusVal": "",
|
|
202
|
-
"statusType": "auto",
|
|
203
|
-
"x": 850,
|
|
204
|
-
"y": 100,
|
|
205
|
-
"wires": []
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"id": "example-house-schedule-bedroom-commands",
|
|
209
|
-
"type": "debug",
|
|
210
|
-
"name": "bedroom commands",
|
|
211
|
-
"active": true,
|
|
212
|
-
"tosidebar": true,
|
|
213
|
-
"console": false,
|
|
214
|
-
"tostatus": false,
|
|
215
|
-
"complete": "true",
|
|
216
|
-
"targetType": "full",
|
|
217
|
-
"statusVal": "",
|
|
218
|
-
"statusType": "auto",
|
|
219
|
-
"x": 850,
|
|
220
|
-
"y": 160,
|
|
221
|
-
"wires": []
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"id": "example-house-schedule-publications",
|
|
225
|
-
"type": "debug",
|
|
226
|
-
"name": "MQTT publications",
|
|
227
|
-
"active": true,
|
|
228
|
-
"tosidebar": true,
|
|
229
|
-
"console": false,
|
|
230
|
-
"tostatus": false,
|
|
231
|
-
"complete": "true",
|
|
232
|
-
"targetType": "full",
|
|
233
|
-
"statusVal": "",
|
|
234
|
-
"statusType": "auto",
|
|
235
|
-
"x": 560,
|
|
236
|
-
"y": 240,
|
|
237
|
-
"wires": []
|
|
182
|
+
],
|
|
183
|
+
"broker": "example-mqtt-broker",
|
|
184
|
+
"publishesThroughOutput": false
|
|
238
185
|
},
|
|
239
186
|
{
|
|
240
187
|
"id": "example-house-schedule-house",
|
|
@@ -242,5 +189,36 @@
|
|
|
242
189
|
"name": "house",
|
|
243
190
|
"wakeTime": "07:00",
|
|
244
191
|
"bedTime": "23:00"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "example-mqtt-broker",
|
|
195
|
+
"type": "mqtt-broker",
|
|
196
|
+
"name": "your MQTT broker",
|
|
197
|
+
"broker": "your-mqtt-broker",
|
|
198
|
+
"port": 1883,
|
|
199
|
+
"clientid": "",
|
|
200
|
+
"autoConnect": true,
|
|
201
|
+
"usetls": false,
|
|
202
|
+
"protocolVersion": 4,
|
|
203
|
+
"keepalive": 60,
|
|
204
|
+
"cleansession": true,
|
|
205
|
+
"autoUnsubscribe": true,
|
|
206
|
+
"birthTopic": "",
|
|
207
|
+
"birthQos": "0",
|
|
208
|
+
"birthRetain": "false",
|
|
209
|
+
"birthPayload": "",
|
|
210
|
+
"birthMsg": {},
|
|
211
|
+
"closeTopic": "",
|
|
212
|
+
"closeQos": "0",
|
|
213
|
+
"closeRetain": "false",
|
|
214
|
+
"closePayload": "",
|
|
215
|
+
"closeMsg": {},
|
|
216
|
+
"willTopic": "",
|
|
217
|
+
"willQos": "0",
|
|
218
|
+
"willRetain": "false",
|
|
219
|
+
"willPayload": "",
|
|
220
|
+
"willMsg": {},
|
|
221
|
+
"userProps": "",
|
|
222
|
+
"sessionExpiry": ""
|
|
245
223
|
}
|
|
246
224
|
]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"id": "example-room-lighting-room-lighting-example",
|
|
4
4
|
"type": "comment",
|
|
5
5
|
"name": "Room lighting example",
|
|
6
|
-
"info": "
|
|
6
|
+
"info": "Needs: A Zigbee2MQTT light on your broker. Injects stand in for the sensors and wall switch.\n\nMotion and illuminance feed occupancy fusion and the motion policy; a wall switch feeds the switch policy. Both send lighting intents to the room controller, which owns the light's commands. The circadian lighting policy sends the room how its lights should look over the day; the room uses it for lights nobody has set otherwise.\n\nReplace the inject nodes with your sensors. The room reaches its light through the zigbee2mqtt light node: set its friendly name. Set the circadian policy's wake and bed times (Node-RED host time) before deploying. To see the room in Home Assistant, give the room controller an area and choose what it publishes (each light's control state, and its discovery); the same for the circadian policy's circadian and sleep switches. They control and style the lights either way.\n\nBefore deploying, open the \"your MQTT broker\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.",
|
|
7
7
|
"x": 170,
|
|
8
8
|
"y": 40,
|
|
9
9
|
"wires": []
|
|
@@ -95,31 +95,6 @@
|
|
|
95
95
|
]
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
|
-
{
|
|
99
|
-
"id": "example-room-lighting-room-startup",
|
|
100
|
-
"type": "inject",
|
|
101
|
-
"name": "startup",
|
|
102
|
-
"props": [
|
|
103
|
-
{
|
|
104
|
-
"p": "lighting",
|
|
105
|
-
"v": "{\"kind\":\"startup\"}",
|
|
106
|
-
"vt": "json"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"repeat": "",
|
|
110
|
-
"crontab": "",
|
|
111
|
-
"once": true,
|
|
112
|
-
"onceDelay": 3,
|
|
113
|
-
"topic": "",
|
|
114
|
-
"x": 150,
|
|
115
|
-
"y": 280,
|
|
116
|
-
"wires": [
|
|
117
|
-
[
|
|
118
|
-
"example-room-lighting-room-lighting-controller",
|
|
119
|
-
"example-room-lighting-circadian"
|
|
120
|
-
]
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
98
|
{
|
|
124
99
|
"id": "example-room-lighting-occupancy-fusion",
|
|
125
100
|
"type": "home-occupancy-fusion",
|
|
@@ -132,7 +107,8 @@
|
|
|
132
107
|
[
|
|
133
108
|
"example-room-lighting-motion-lighting-policy"
|
|
134
109
|
]
|
|
135
|
-
]
|
|
110
|
+
],
|
|
111
|
+
"broker": "example-mqtt-broker"
|
|
136
112
|
},
|
|
137
113
|
{
|
|
138
114
|
"id": "example-room-lighting-motion-lighting-policy",
|
|
@@ -149,7 +125,8 @@
|
|
|
149
125
|
[
|
|
150
126
|
"example-room-lighting-room-lighting-controller"
|
|
151
127
|
]
|
|
152
|
-
]
|
|
128
|
+
],
|
|
129
|
+
"broker": "example-mqtt-broker"
|
|
153
130
|
},
|
|
154
131
|
{
|
|
155
132
|
"id": "example-room-lighting-switch-lighting-policy",
|
|
@@ -182,8 +159,6 @@
|
|
|
182
159
|
"refreshTransitionSeconds": 60,
|
|
183
160
|
"refreshSeconds": 60,
|
|
184
161
|
"initialSleep": false,
|
|
185
|
-
"publishState": false,
|
|
186
|
-
"discovery": false,
|
|
187
162
|
"discoveryPrefix": "homeassistant",
|
|
188
163
|
"idScheme": "node",
|
|
189
164
|
"x": 620,
|
|
@@ -193,7 +168,9 @@
|
|
|
193
168
|
"example-room-lighting-room-lighting-controller"
|
|
194
169
|
],
|
|
195
170
|
[]
|
|
196
|
-
]
|
|
171
|
+
],
|
|
172
|
+
"broker": "example-mqtt-broker",
|
|
173
|
+
"homeAssistant": "off"
|
|
197
174
|
},
|
|
198
175
|
{
|
|
199
176
|
"id": "example-room-lighting-room-lighting-controller",
|
|
@@ -206,17 +183,15 @@
|
|
|
206
183
|
"x": 880,
|
|
207
184
|
"y": 180,
|
|
208
185
|
"wires": [
|
|
209
|
-
[
|
|
210
|
-
"example-room-lighting-room-commands"
|
|
211
|
-
],
|
|
186
|
+
[],
|
|
212
187
|
[
|
|
213
188
|
"example-room-lighting-room-lighting-controller-light-main"
|
|
214
189
|
],
|
|
215
190
|
[]
|
|
216
191
|
],
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
"
|
|
192
|
+
"idScheme": "node",
|
|
193
|
+
"broker": "example-mqtt-broker",
|
|
194
|
+
"homeAssistant": "off"
|
|
220
195
|
},
|
|
221
196
|
{
|
|
222
197
|
"id": "example-room-lighting-room-lighting-controller-light-main",
|
|
@@ -229,28 +204,43 @@
|
|
|
229
204
|
"x": 880,
|
|
230
205
|
"y": 240,
|
|
231
206
|
"wires": [
|
|
232
|
-
[
|
|
233
|
-
"example-room-lighting-room-commands"
|
|
234
|
-
],
|
|
207
|
+
[],
|
|
235
208
|
[
|
|
236
209
|
"example-room-lighting-room-lighting-controller"
|
|
237
210
|
]
|
|
238
|
-
]
|
|
211
|
+
],
|
|
212
|
+
"broker": "example-mqtt-broker",
|
|
213
|
+
"publishesThroughOutput": false
|
|
239
214
|
},
|
|
240
215
|
{
|
|
241
|
-
"id": "example-
|
|
242
|
-
"type": "
|
|
243
|
-
"name": "
|
|
244
|
-
"
|
|
245
|
-
"
|
|
246
|
-
"
|
|
247
|
-
"
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
"
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"
|
|
254
|
-
"
|
|
216
|
+
"id": "example-mqtt-broker",
|
|
217
|
+
"type": "mqtt-broker",
|
|
218
|
+
"name": "your MQTT broker",
|
|
219
|
+
"broker": "your-mqtt-broker",
|
|
220
|
+
"port": 1883,
|
|
221
|
+
"clientid": "",
|
|
222
|
+
"autoConnect": true,
|
|
223
|
+
"usetls": false,
|
|
224
|
+
"protocolVersion": 4,
|
|
225
|
+
"keepalive": 60,
|
|
226
|
+
"cleansession": true,
|
|
227
|
+
"autoUnsubscribe": true,
|
|
228
|
+
"birthTopic": "",
|
|
229
|
+
"birthQos": "0",
|
|
230
|
+
"birthRetain": "false",
|
|
231
|
+
"birthPayload": "",
|
|
232
|
+
"birthMsg": {},
|
|
233
|
+
"closeTopic": "",
|
|
234
|
+
"closeQos": "0",
|
|
235
|
+
"closeRetain": "false",
|
|
236
|
+
"closePayload": "",
|
|
237
|
+
"closeMsg": {},
|
|
238
|
+
"willTopic": "",
|
|
239
|
+
"willQos": "0",
|
|
240
|
+
"willRetain": "false",
|
|
241
|
+
"willPayload": "",
|
|
242
|
+
"willMsg": {},
|
|
243
|
+
"userProps": "",
|
|
244
|
+
"sessionExpiry": ""
|
|
255
245
|
}
|
|
256
246
|
]
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "example-scene-comment",
|
|
4
|
+
"type": "comment",
|
|
5
|
+
"name": "Scene example",
|
|
6
|
+
"info": "Needs: No devices: Debug nodes stand in for your room lighting controller and motion lighting policy.\n\nOne scene, \"Exercise mode\": while it is on, it holds the room's main light off and its tv socket on, and pauses motion lighting. It ends by request, by its safety timer (4 hours), or when the trainer's power falls below 20 W for this flow's end trigger.\n\nWire output 1 to your room lighting controller, whose Targets JSON names main and tv (mark the socket \"onOffOnly\": true), and set each light's area in the scene's Lights to the room's Area (a room acts only on a scene's lights for its own Area). Wire output 2 to your motion lighting policy. To start and stop it from Home Assistant, give it an area and set Publish to MQTT state and Home Assistant discovery: it reads home/<area>/scene/exercise_mode/set from the broker. Replace the \"trainer power\" inject with your power reading: the switch and change nodes are the end trigger, so the condition is yours to set.\n\nWhen it ends, the room gives each light back what it was before the scene, and motion lighting resumes.\n\nBefore deploying, open the \"your MQTT broker\" config node (any node's Broker setting) and set your broker's host: every node here that talks MQTT subscribes and publishes through it, with no MQTT in, MQTT out or status nodes.",
|
|
7
|
+
"x": 150,
|
|
8
|
+
"y": 40,
|
|
9
|
+
"wires": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "example-scene-start",
|
|
13
|
+
"type": "inject",
|
|
14
|
+
"name": "start",
|
|
15
|
+
"props": [
|
|
16
|
+
{
|
|
17
|
+
"p": "scene",
|
|
18
|
+
"v": "{\"kind\":\"start\"}",
|
|
19
|
+
"vt": "json"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"repeat": "",
|
|
23
|
+
"crontab": "",
|
|
24
|
+
"once": false,
|
|
25
|
+
"onceDelay": 0.1,
|
|
26
|
+
"topic": "",
|
|
27
|
+
"x": 130,
|
|
28
|
+
"y": 140,
|
|
29
|
+
"wires": [
|
|
30
|
+
[
|
|
31
|
+
"example-scene-scene"
|
|
32
|
+
]
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "example-scene-end",
|
|
37
|
+
"type": "inject",
|
|
38
|
+
"name": "end",
|
|
39
|
+
"props": [
|
|
40
|
+
{
|
|
41
|
+
"p": "scene",
|
|
42
|
+
"v": "{\"kind\":\"end\"}",
|
|
43
|
+
"vt": "json"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"repeat": "",
|
|
47
|
+
"crontab": "",
|
|
48
|
+
"once": false,
|
|
49
|
+
"onceDelay": 0.1,
|
|
50
|
+
"topic": "",
|
|
51
|
+
"x": 130,
|
|
52
|
+
"y": 180,
|
|
53
|
+
"wires": [
|
|
54
|
+
[
|
|
55
|
+
"example-scene-scene"
|
|
56
|
+
]
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "example-scene-power",
|
|
61
|
+
"type": "inject",
|
|
62
|
+
"name": "trainer power",
|
|
63
|
+
"props": [
|
|
64
|
+
{
|
|
65
|
+
"p": "payload",
|
|
66
|
+
"v": "5",
|
|
67
|
+
"vt": "num"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"repeat": "",
|
|
71
|
+
"crontab": "",
|
|
72
|
+
"once": false,
|
|
73
|
+
"onceDelay": 0.1,
|
|
74
|
+
"topic": "",
|
|
75
|
+
"x": 140,
|
|
76
|
+
"y": 240,
|
|
77
|
+
"wires": [
|
|
78
|
+
[
|
|
79
|
+
"example-scene-below"
|
|
80
|
+
]
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "example-scene-below",
|
|
85
|
+
"type": "switch",
|
|
86
|
+
"name": "below 20 W",
|
|
87
|
+
"property": "payload",
|
|
88
|
+
"propertyType": "msg",
|
|
89
|
+
"rules": [
|
|
90
|
+
{
|
|
91
|
+
"t": "lt",
|
|
92
|
+
"v": "20",
|
|
93
|
+
"vt": "num"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"checkall": "true",
|
|
97
|
+
"repair": false,
|
|
98
|
+
"outputs": 1,
|
|
99
|
+
"x": 330,
|
|
100
|
+
"y": 240,
|
|
101
|
+
"wires": [
|
|
102
|
+
[
|
|
103
|
+
"example-scene-to-end"
|
|
104
|
+
]
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "example-scene-to-end",
|
|
109
|
+
"type": "change",
|
|
110
|
+
"name": "end: trainer off",
|
|
111
|
+
"rules": [
|
|
112
|
+
{
|
|
113
|
+
"t": "set",
|
|
114
|
+
"p": "scene",
|
|
115
|
+
"pt": "msg",
|
|
116
|
+
"to": "{\"kind\":\"end\",\"by\":\"trainer off\"}",
|
|
117
|
+
"tot": "json"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"action": "",
|
|
121
|
+
"property": "",
|
|
122
|
+
"from": "",
|
|
123
|
+
"to": "",
|
|
124
|
+
"reg": false,
|
|
125
|
+
"x": 520,
|
|
126
|
+
"y": 240,
|
|
127
|
+
"wires": [
|
|
128
|
+
[
|
|
129
|
+
"example-scene-scene"
|
|
130
|
+
]
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "example-scene-scene",
|
|
135
|
+
"type": "home-scene",
|
|
136
|
+
"name": "Exercise mode",
|
|
137
|
+
"safetyHours": 4,
|
|
138
|
+
"lights": "[{\"area\":\"<your room's area>\",\"target\":\"main\",\"state\":\"OFF\"},{\"area\":\"<your room's area>\",\"target\":\"tv\",\"state\":\"ON\"}]",
|
|
139
|
+
"area": "",
|
|
140
|
+
"discoveryPrefix": "homeassistant",
|
|
141
|
+
"idScheme": "node",
|
|
142
|
+
"x": 720,
|
|
143
|
+
"y": 160,
|
|
144
|
+
"wires": [
|
|
145
|
+
[
|
|
146
|
+
"example-scene-rooms"
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
"example-scene-motion"
|
|
150
|
+
],
|
|
151
|
+
[]
|
|
152
|
+
],
|
|
153
|
+
"broker": "example-mqtt-broker",
|
|
154
|
+
"homeAssistant": "off"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "example-scene-rooms",
|
|
158
|
+
"type": "debug",
|
|
159
|
+
"name": "to your room lighting controller",
|
|
160
|
+
"active": true,
|
|
161
|
+
"tosidebar": true,
|
|
162
|
+
"console": false,
|
|
163
|
+
"tostatus": false,
|
|
164
|
+
"complete": "true",
|
|
165
|
+
"targetType": "full",
|
|
166
|
+
"x": 990,
|
|
167
|
+
"y": 120,
|
|
168
|
+
"wires": []
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "example-scene-motion",
|
|
172
|
+
"type": "debug",
|
|
173
|
+
"name": "to your motion lighting policy",
|
|
174
|
+
"active": true,
|
|
175
|
+
"tosidebar": true,
|
|
176
|
+
"console": false,
|
|
177
|
+
"tostatus": false,
|
|
178
|
+
"complete": "true",
|
|
179
|
+
"targetType": "full",
|
|
180
|
+
"x": 980,
|
|
181
|
+
"y": 160,
|
|
182
|
+
"wires": []
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"id": "example-mqtt-broker",
|
|
186
|
+
"type": "mqtt-broker",
|
|
187
|
+
"name": "your MQTT broker",
|
|
188
|
+
"broker": "your-mqtt-broker",
|
|
189
|
+
"port": 1883,
|
|
190
|
+
"clientid": "",
|
|
191
|
+
"autoConnect": true,
|
|
192
|
+
"usetls": false,
|
|
193
|
+
"protocolVersion": 4,
|
|
194
|
+
"keepalive": 60,
|
|
195
|
+
"cleansession": true,
|
|
196
|
+
"autoUnsubscribe": true,
|
|
197
|
+
"birthTopic": "",
|
|
198
|
+
"birthQos": "0",
|
|
199
|
+
"birthRetain": "false",
|
|
200
|
+
"birthPayload": "",
|
|
201
|
+
"birthMsg": {},
|
|
202
|
+
"closeTopic": "",
|
|
203
|
+
"closeQos": "0",
|
|
204
|
+
"closeRetain": "false",
|
|
205
|
+
"closePayload": "",
|
|
206
|
+
"closeMsg": {},
|
|
207
|
+
"willTopic": "",
|
|
208
|
+
"willQos": "0",
|
|
209
|
+
"willRetain": "false",
|
|
210
|
+
"willPayload": "",
|
|
211
|
+
"willMsg": {},
|
|
212
|
+
"userProps": "",
|
|
213
|
+
"sessionExpiry": ""
|
|
214
|
+
}
|
|
215
|
+
]
|