@avantics/node-red-home-automation 6.1.0 → 6.3.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 +260 -46
- package/dist/lib/activity-lighting-controller.d.ts +1 -0
- package/dist/lib/activity-lighting-controller.js +37 -10
- package/dist/lib/avr-controller.d.ts +3 -0
- package/dist/lib/avr-controller.js +24 -2
- package/dist/lib/backlighting-controller.d.ts +5 -2
- package/dist/lib/backlighting-controller.js +27 -2
- package/dist/lib/cover-publishing.js +20 -6
- package/dist/lib/display-mode-controller.d.ts +3 -0
- package/dist/lib/display-mode-controller.js +43 -16
- package/dist/lib/esphome-sensor.d.ts +73 -0
- package/dist/lib/esphome-sensor.js +261 -0
- 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/occupancy-fusion.d.ts +1 -0
- package/dist/lib/occupancy-fusion.js +15 -2
- package/dist/lib/room-controller.d.ts +1 -0
- package/dist/lib/room-controller.js +5 -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 +69 -0
- package/dist/lib/scene.js +223 -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/source-capability-controller.d.ts +4 -1
- package/dist/lib/source-capability-controller.js +49 -2
- package/dist/lib/target-observation.d.ts +14 -0
- package/dist/lib/target-observation.js +22 -0
- package/dist/lib/theatre-activity-controller.d.ts +5 -0
- package/dist/lib/theatre-activity-controller.js +91 -12
- 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.d.ts +2 -0
- package/dist/lib/theatre-state.js +13 -1
- package/dist/lib/wled.d.ts +48 -0
- package/dist/lib/wled.js +105 -0
- package/dist/lib/z2m-power.d.ts +38 -0
- package/dist/lib/z2m-power.js +83 -0
- package/dist/lib/z2m-sensor.d.ts +37 -0
- package/dist/lib/z2m-sensor.js +88 -0
- package/dist/nodes/apollo-r-pro-1.d.ts +2 -0
- package/dist/nodes/apollo-r-pro-1.html +80 -0
- package/dist/nodes/apollo-r-pro-1.js +4 -0
- package/dist/nodes/avr-controller.html +82 -21
- package/dist/nodes/avr-controller.js +24 -12
- package/dist/nodes/backlighting-controller.js +3 -2
- package/dist/nodes/circadian-policy.html +84 -20
- package/dist/nodes/circadian-policy.js +30 -11
- package/dist/nodes/cover-controller.html +87 -25
- package/dist/nodes/cover-controller.js +25 -12
- package/dist/nodes/device-side.d.ts +21 -0
- package/dist/nodes/device-side.js +76 -0
- package/dist/nodes/display-mode-controller.js +11 -2
- package/dist/nodes/esphome-sensor.d.ts +2 -0
- package/dist/nodes/esphome-sensor.js +77 -0
- package/dist/nodes/everything-presence-one.d.ts +2 -0
- package/dist/nodes/everything-presence-one.html +78 -0
- package/dist/nodes/everything-presence-one.js +4 -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 +70 -5
- package/dist/nodes/house-schedule-mqtt.js +22 -8
- package/dist/nodes/motion-policy.html +87 -22
- 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 +86 -20
- package/dist/nodes/occupancy-fusion.js +25 -12
- package/dist/nodes/publishing-side.d.ts +20 -0
- package/dist/nodes/publishing-side.js +66 -0
- package/dist/nodes/room-controller.html +106 -35
- package/dist/nodes/room-controller.js +63 -16
- package/dist/nodes/scene.d.ts +3 -0
- package/dist/nodes/scene.html +247 -0
- package/dist/nodes/scene.js +128 -0
- package/dist/nodes/shelly-cover.html +47 -2
- package/dist/nodes/shelly-cover.js +19 -4
- package/dist/nodes/shelly-switch.html +76 -6
- package/dist/nodes/shelly-switch.js +32 -7
- package/dist/nodes/source-capability-controller.js +3 -2
- package/dist/nodes/theatre-activity-controller.html +4 -2
- package/dist/nodes/theatre-state-contract.html +72 -9
- package/dist/nodes/theatre-state-contract.js +33 -14
- package/dist/nodes/wled.d.ts +3 -0
- package/dist/nodes/wled.html +56 -0
- package/dist/nodes/wled.js +53 -0
- package/dist/nodes/z2m-cover.html +47 -2
- package/dist/nodes/z2m-cover.js +21 -4
- package/dist/nodes/z2m-light.html +49 -3
- package/dist/nodes/z2m-light.js +40 -4
- package/dist/nodes/z2m-power.d.ts +3 -0
- package/dist/nodes/z2m-power.html +58 -0
- package/dist/nodes/z2m-power.js +53 -0
- package/dist/nodes/z2m-sensor.d.ts +3 -0
- package/dist/nodes/z2m-sensor.html +69 -0
- package/dist/nodes/z2m-sensor.js +62 -0
- package/examples/Cover control.json +38 -91
- package/examples/Cover pair.json +36 -3
- package/examples/Home theatre activity.json +46 -91
- package/examples/Home theatre equipment.json +34 -2
- package/examples/House schedule.json +58 -80
- package/examples/Room lighting.json +45 -44
- package/examples/Scene.json +167 -0
- package/examples/Shelly cover.json +36 -105
- package/examples/Shelly switch.json +52 -148
- package/package.json +8 -2
|
@@ -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,20 +95,6 @@
|
|
|
95
95
|
]
|
|
96
96
|
]
|
|
97
97
|
},
|
|
98
|
-
{
|
|
99
|
-
"id": "example-room-lighting-room-mqtt-connected",
|
|
100
|
-
"type": "status",
|
|
101
|
-
"name": "MQTT out connected",
|
|
102
|
-
"scope": null,
|
|
103
|
-
"x": 150,
|
|
104
|
-
"y": 280,
|
|
105
|
-
"wires": [
|
|
106
|
-
[
|
|
107
|
-
"example-room-lighting-room-lighting-controller",
|
|
108
|
-
"example-room-lighting-circadian"
|
|
109
|
-
]
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
98
|
{
|
|
113
99
|
"id": "example-room-lighting-occupancy-fusion",
|
|
114
100
|
"type": "home-occupancy-fusion",
|
|
@@ -121,7 +107,8 @@
|
|
|
121
107
|
[
|
|
122
108
|
"example-room-lighting-motion-lighting-policy"
|
|
123
109
|
]
|
|
124
|
-
]
|
|
110
|
+
],
|
|
111
|
+
"broker": "example-mqtt-broker"
|
|
125
112
|
},
|
|
126
113
|
{
|
|
127
114
|
"id": "example-room-lighting-motion-lighting-policy",
|
|
@@ -138,7 +125,8 @@
|
|
|
138
125
|
[
|
|
139
126
|
"example-room-lighting-room-lighting-controller"
|
|
140
127
|
]
|
|
141
|
-
]
|
|
128
|
+
],
|
|
129
|
+
"broker": "example-mqtt-broker"
|
|
142
130
|
},
|
|
143
131
|
{
|
|
144
132
|
"id": "example-room-lighting-switch-lighting-policy",
|
|
@@ -171,8 +159,6 @@
|
|
|
171
159
|
"refreshTransitionSeconds": 60,
|
|
172
160
|
"refreshSeconds": 60,
|
|
173
161
|
"initialSleep": false,
|
|
174
|
-
"publishState": false,
|
|
175
|
-
"discovery": false,
|
|
176
162
|
"discoveryPrefix": "homeassistant",
|
|
177
163
|
"idScheme": "node",
|
|
178
164
|
"x": 620,
|
|
@@ -182,7 +168,9 @@
|
|
|
182
168
|
"example-room-lighting-room-lighting-controller"
|
|
183
169
|
],
|
|
184
170
|
[]
|
|
185
|
-
]
|
|
171
|
+
],
|
|
172
|
+
"broker": "example-mqtt-broker",
|
|
173
|
+
"homeAssistant": "off"
|
|
186
174
|
},
|
|
187
175
|
{
|
|
188
176
|
"id": "example-room-lighting-room-lighting-controller",
|
|
@@ -195,17 +183,15 @@
|
|
|
195
183
|
"x": 880,
|
|
196
184
|
"y": 180,
|
|
197
185
|
"wires": [
|
|
198
|
-
[
|
|
199
|
-
"example-room-lighting-room-commands"
|
|
200
|
-
],
|
|
186
|
+
[],
|
|
201
187
|
[
|
|
202
188
|
"example-room-lighting-room-lighting-controller-light-main"
|
|
203
189
|
],
|
|
204
190
|
[]
|
|
205
191
|
],
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"
|
|
192
|
+
"idScheme": "node",
|
|
193
|
+
"broker": "example-mqtt-broker",
|
|
194
|
+
"homeAssistant": "off"
|
|
209
195
|
},
|
|
210
196
|
{
|
|
211
197
|
"id": "example-room-lighting-room-lighting-controller-light-main",
|
|
@@ -218,28 +204,43 @@
|
|
|
218
204
|
"x": 880,
|
|
219
205
|
"y": 240,
|
|
220
206
|
"wires": [
|
|
221
|
-
[
|
|
222
|
-
"example-room-lighting-room-commands"
|
|
223
|
-
],
|
|
207
|
+
[],
|
|
224
208
|
[
|
|
225
209
|
"example-room-lighting-room-lighting-controller"
|
|
226
210
|
]
|
|
227
|
-
]
|
|
211
|
+
],
|
|
212
|
+
"broker": "example-mqtt-broker",
|
|
213
|
+
"publishesThroughOutput": false
|
|
228
214
|
},
|
|
229
215
|
{
|
|
230
|
-
"id": "example-
|
|
231
|
-
"type": "
|
|
232
|
-
"name": "
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
"
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"
|
|
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": ""
|
|
244
245
|
}
|
|
245
246
|
]
|
|
@@ -0,0 +1,167 @@
|
|
|
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 a device's power, from a power meter on its plug, has been used and then stays below 20 W for a minute (its End below).\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 \"a device's power\" inject with a power meter node on the device's plug (such as a zigbee2mqtt power node), wired to the scene; set End below for your device, or clear it for no power end.\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": "a device's power: 5 W",
|
|
63
|
+
"props": [
|
|
64
|
+
{
|
|
65
|
+
"p": "power",
|
|
66
|
+
"v": "{\"kind\":\"observed\",\"watts\":5}",
|
|
67
|
+
"vt": "json"
|
|
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-scene"
|
|
80
|
+
]
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "example-scene-scene",
|
|
85
|
+
"type": "home-scene",
|
|
86
|
+
"name": "Exercise mode",
|
|
87
|
+
"safetyHours": 4,
|
|
88
|
+
"lights": "[{\"area\":\"<your room's area>\",\"target\":\"main\",\"state\":\"OFF\"},{\"area\":\"<your room's area>\",\"target\":\"tv\",\"state\":\"ON\"}]",
|
|
89
|
+
"area": "",
|
|
90
|
+
"discoveryPrefix": "homeassistant",
|
|
91
|
+
"idScheme": "node",
|
|
92
|
+
"x": 720,
|
|
93
|
+
"y": 160,
|
|
94
|
+
"wires": [
|
|
95
|
+
[
|
|
96
|
+
"example-scene-rooms"
|
|
97
|
+
],
|
|
98
|
+
[
|
|
99
|
+
"example-scene-motion"
|
|
100
|
+
],
|
|
101
|
+
[]
|
|
102
|
+
],
|
|
103
|
+
"broker": "example-mqtt-broker",
|
|
104
|
+
"homeAssistant": "off",
|
|
105
|
+
"endBelowWatts": 20,
|
|
106
|
+
"endBelowSeconds": 60
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "example-scene-rooms",
|
|
110
|
+
"type": "debug",
|
|
111
|
+
"name": "to your room lighting controller",
|
|
112
|
+
"active": true,
|
|
113
|
+
"tosidebar": true,
|
|
114
|
+
"console": false,
|
|
115
|
+
"tostatus": false,
|
|
116
|
+
"complete": "true",
|
|
117
|
+
"targetType": "full",
|
|
118
|
+
"x": 990,
|
|
119
|
+
"y": 120,
|
|
120
|
+
"wires": []
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "example-scene-motion",
|
|
124
|
+
"type": "debug",
|
|
125
|
+
"name": "to your motion lighting policy",
|
|
126
|
+
"active": true,
|
|
127
|
+
"tosidebar": true,
|
|
128
|
+
"console": false,
|
|
129
|
+
"tostatus": false,
|
|
130
|
+
"complete": "true",
|
|
131
|
+
"targetType": "full",
|
|
132
|
+
"x": 980,
|
|
133
|
+
"y": 160,
|
|
134
|
+
"wires": []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "example-mqtt-broker",
|
|
138
|
+
"type": "mqtt-broker",
|
|
139
|
+
"name": "your MQTT broker",
|
|
140
|
+
"broker": "your-mqtt-broker",
|
|
141
|
+
"port": 1883,
|
|
142
|
+
"clientid": "",
|
|
143
|
+
"autoConnect": true,
|
|
144
|
+
"usetls": false,
|
|
145
|
+
"protocolVersion": 4,
|
|
146
|
+
"keepalive": 60,
|
|
147
|
+
"cleansession": true,
|
|
148
|
+
"autoUnsubscribe": true,
|
|
149
|
+
"birthTopic": "",
|
|
150
|
+
"birthQos": "0",
|
|
151
|
+
"birthRetain": "false",
|
|
152
|
+
"birthPayload": "",
|
|
153
|
+
"birthMsg": {},
|
|
154
|
+
"closeTopic": "",
|
|
155
|
+
"closeQos": "0",
|
|
156
|
+
"closeRetain": "false",
|
|
157
|
+
"closePayload": "",
|
|
158
|
+
"closeMsg": {},
|
|
159
|
+
"willTopic": "",
|
|
160
|
+
"willQos": "0",
|
|
161
|
+
"willRetain": "false",
|
|
162
|
+
"willPayload": "",
|
|
163
|
+
"willMsg": {},
|
|
164
|
+
"userProps": "",
|
|
165
|
+
"sessionExpiry": ""
|
|
166
|
+
}
|
|
167
|
+
]
|