node-red-contrib-huemagic 2.8.2 → 4.0.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.
Files changed (165) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/README.md +806 -729
  3. package/examples/Hue Bridge.json +189 -35
  4. package/examples/Hue Brightness.json +124 -14
  5. package/examples/Hue Buttons.json +88 -0
  6. package/examples/Hue Group.json +575 -63
  7. package/examples/Hue Light.json +805 -58
  8. package/examples/Hue Magic.json +69 -24
  9. package/examples/Hue Motion.json +110 -42
  10. package/examples/Hue Rules.json +105 -37
  11. package/examples/Hue Scene.json +145 -28
  12. package/examples/Hue Temperature.json +124 -14
  13. package/huemagic/animations/001-sunny.json +22 -22
  14. package/huemagic/animations/002-cloudy.json +46 -46
  15. package/huemagic/animations/003-nightsky.json +20 -20
  16. package/huemagic/animations/004-sunrise.json +54 -54
  17. package/huemagic/animations/005-sunset.json +46 -46
  18. package/huemagic/animations/006-fireplace.json +74 -74
  19. package/huemagic/animations/007-spring.json +31 -31
  20. package/huemagic/animations/008-autmn.json +23 -23
  21. package/huemagic/animations/009-winter.json +23 -23
  22. package/huemagic/animations/010-dirtyfog.json +23 -23
  23. package/huemagic/animations/011-lgbt.json +49 -50
  24. package/huemagic/animations/012-rasta.json +28 -29
  25. package/huemagic/animations/013-strobo.json +30 -31
  26. package/huemagic/animations/014-randomrainbow.json +30 -31
  27. package/huemagic/animations/015-sos.json +158 -159
  28. package/huemagic/animations/016-milkyway.json +83 -0
  29. package/huemagic/animations/017-beach.json +40 -0
  30. package/huemagic/animations/018-forest.json +43 -0
  31. package/huemagic/animations/019-christmas.json +30 -0
  32. package/huemagic/animations/020-superhero.json +56 -0
  33. package/huemagic/animations/021-neoncity.json +52 -0
  34. package/huemagic/animations/previews/001-sunny.gif +0 -0
  35. package/huemagic/animations/previews/002-cloudy.gif +0 -0
  36. package/huemagic/animations/previews/003-nightsky.gif +0 -0
  37. package/huemagic/animations/previews/004-sunrise.gif +0 -0
  38. package/huemagic/animations/previews/005-sunset.gif +0 -0
  39. package/huemagic/animations/previews/006-fireplace.gif +0 -0
  40. package/huemagic/animations/previews/007-spring.gif +0 -0
  41. package/huemagic/animations/previews/008-autmn.gif +0 -0
  42. package/huemagic/animations/previews/009-winter.gif +0 -0
  43. package/huemagic/animations/previews/010-dirtyfog.gif +0 -0
  44. package/huemagic/animations/previews/011-lgbt.gif +0 -0
  45. package/huemagic/animations/previews/012-rasta.gif +0 -0
  46. package/huemagic/animations/previews/013-strobo.gif +0 -0
  47. package/huemagic/animations/previews/014-randomrainbow.gif +0 -0
  48. package/huemagic/animations/previews/015-sos.gif +0 -0
  49. package/huemagic/animations/previews/016-milkyway.gif +0 -0
  50. package/huemagic/animations/previews/017-beach.gif +0 -0
  51. package/huemagic/animations/previews/018-forest.gif +0 -0
  52. package/huemagic/animations/previews/019-christmas.gif +0 -0
  53. package/huemagic/animations/previews/020-superhero.gif +0 -0
  54. package/huemagic/animations/previews/021-neoncity.gif +0 -0
  55. package/huemagic/hue-bridge-config.html +105 -61
  56. package/huemagic/hue-bridge-config.js +629 -319
  57. package/huemagic/hue-bridge.html +41 -21
  58. package/huemagic/hue-bridge.js +191 -398
  59. package/huemagic/hue-brightness.html +130 -49
  60. package/huemagic/hue-brightness.js +131 -35
  61. package/huemagic/hue-buttons.html +197 -0
  62. package/huemagic/hue-buttons.js +152 -0
  63. package/huemagic/hue-group.html +137 -60
  64. package/huemagic/hue-group.js +394 -367
  65. package/huemagic/hue-light.html +133 -59
  66. package/huemagic/hue-light.js +551 -336
  67. package/huemagic/hue-magic.html +91 -237
  68. package/huemagic/hue-magic.js +57 -27
  69. package/huemagic/hue-motion.html +128 -50
  70. package/huemagic/hue-motion.js +116 -87
  71. package/huemagic/hue-rules.html +121 -50
  72. package/huemagic/hue-rules.js +84 -64
  73. package/huemagic/hue-scene.html +96 -115
  74. package/huemagic/hue-scene.js +65 -96
  75. package/huemagic/hue-temperature.html +130 -49
  76. package/huemagic/hue-temperature.js +136 -32
  77. package/huemagic/icons/hue-bridge.png +0 -0
  78. package/huemagic/icons/hue-bridge.svg +3 -0
  79. package/huemagic/icons/hue-brightness.png +0 -0
  80. package/huemagic/icons/hue-brightness.svg +11 -0
  81. package/huemagic/icons/hue-buttons.png +0 -0
  82. package/huemagic/icons/hue-buttons.svg +4 -0
  83. package/huemagic/icons/hue-group.png +0 -0
  84. package/huemagic/icons/hue-group.svg +12 -0
  85. package/huemagic/icons/hue-light.png +0 -0
  86. package/huemagic/icons/hue-light.svg +3 -0
  87. package/huemagic/icons/hue-magic.png +0 -0
  88. package/huemagic/icons/hue-magic.svg +3 -0
  89. package/huemagic/icons/hue-motion.png +0 -0
  90. package/huemagic/icons/hue-motion.svg +9 -0
  91. package/huemagic/icons/hue-rules.png +0 -0
  92. package/huemagic/icons/hue-rules.svg +4 -0
  93. package/huemagic/icons/hue-scene.png +0 -0
  94. package/huemagic/icons/hue-scene.svg +5 -0
  95. package/huemagic/icons/hue-temperature.png +0 -0
  96. package/huemagic/icons/hue-temperature.svg +7 -0
  97. package/huemagic/locales/de/hue-bridge-config.html +17 -12
  98. package/huemagic/locales/de/hue-bridge-config.json +7 -5
  99. package/huemagic/locales/de/hue-bridge.html +64 -145
  100. package/huemagic/locales/de/hue-bridge.json +6 -17
  101. package/huemagic/locales/de/hue-brightness.html +52 -38
  102. package/huemagic/locales/de/hue-brightness.json +7 -2
  103. package/huemagic/locales/de/hue-buttons.html +58 -0
  104. package/huemagic/locales/de/hue-buttons.json +28 -0
  105. package/huemagic/locales/de/hue-group.html +46 -122
  106. package/huemagic/locales/de/hue-group.json +4 -2
  107. package/huemagic/locales/de/hue-light.html +68 -116
  108. package/huemagic/locales/de/hue-light.json +5 -2
  109. package/huemagic/locales/de/hue-magic.html +65 -57
  110. package/huemagic/locales/de/hue-magic.json +2 -1
  111. package/huemagic/locales/de/hue-motion.html +48 -44
  112. package/huemagic/locales/de/hue-motion.json +6 -3
  113. package/huemagic/locales/de/hue-rules.html +68 -73
  114. package/huemagic/locales/de/hue-rules.json +5 -2
  115. package/huemagic/locales/de/hue-scene.html +23 -32
  116. package/huemagic/locales/de/hue-scene.json +5 -2
  117. package/huemagic/locales/de/hue-temperature.html +53 -36
  118. package/huemagic/locales/de/hue-temperature.json +7 -2
  119. package/huemagic/locales/en-US/hue-bridge-config.html +17 -12
  120. package/huemagic/locales/en-US/hue-bridge-config.json +5 -3
  121. package/huemagic/locales/en-US/hue-bridge.html +64 -145
  122. package/huemagic/locales/en-US/hue-bridge.json +5 -16
  123. package/huemagic/locales/en-US/hue-brightness.html +52 -38
  124. package/huemagic/locales/en-US/hue-brightness.json +10 -3
  125. package/huemagic/locales/en-US/hue-buttons.html +58 -0
  126. package/huemagic/locales/en-US/hue-buttons.json +34 -0
  127. package/huemagic/locales/en-US/hue-group.html +46 -122
  128. package/huemagic/locales/en-US/hue-group.json +7 -3
  129. package/huemagic/locales/en-US/hue-light.html +68 -116
  130. package/huemagic/locales/en-US/hue-light.json +8 -3
  131. package/huemagic/locales/en-US/hue-magic.html +65 -57
  132. package/huemagic/locales/en-US/hue-magic.json +3 -1
  133. package/huemagic/locales/en-US/hue-motion.html +48 -44
  134. package/huemagic/locales/en-US/hue-motion.json +9 -4
  135. package/huemagic/locales/en-US/hue-rules.html +68 -73
  136. package/huemagic/locales/en-US/hue-rules.json +5 -2
  137. package/huemagic/locales/en-US/hue-scene.html +23 -32
  138. package/huemagic/locales/en-US/hue-scene.json +5 -2
  139. package/huemagic/locales/en-US/hue-temperature.html +53 -36
  140. package/huemagic/locales/en-US/hue-temperature.json +10 -3
  141. package/huemagic/utils/api.js +290 -0
  142. package/huemagic/utils/color.js +382 -0
  143. package/{utils → huemagic/utils}/merge.js +9 -6
  144. package/huemagic/utils/messages.js +447 -0
  145. package/package.json +12 -12
  146. package/examples/Hue Switch.json +0 -40
  147. package/examples/Hue Tap.json +0 -40
  148. package/huemagic/assets/anime.js +0 -8
  149. package/huemagic/hue-switch.html +0 -119
  150. package/huemagic/hue-switch.js +0 -113
  151. package/huemagic/hue-tap.html +0 -119
  152. package/huemagic/hue-tap.js +0 -74
  153. package/huemagic/icons/hue-button.png +0 -0
  154. package/huemagic/icons/hue-switch.png +0 -0
  155. package/huemagic/icons/hue-tap.png +0 -0
  156. package/huemagic/locales/de/hue-switch.html +0 -50
  157. package/huemagic/locales/de/hue-switch.json +0 -31
  158. package/huemagic/locales/de/hue-tap.html +0 -41
  159. package/huemagic/locales/de/hue-tap.json +0 -23
  160. package/huemagic/locales/en-US/hue-switch.html +0 -50
  161. package/huemagic/locales/en-US/hue-switch.json +0 -31
  162. package/huemagic/locales/en-US/hue-tap.html +0 -41
  163. package/huemagic/locales/en-US/hue-tap.json +0 -23
  164. package/utils/messages.js +0 -571
  165. package/utils/rgb.js +0 -188
@@ -1,146 +1,893 @@
1
1
  [
2
2
  {
3
- "id": "a1d70652.ec672",
3
+ "id": "bfc496b5dc528777",
4
4
  "type": "tab",
5
5
  "label": "Hue Light (example)",
6
6
  "disabled": false,
7
7
  "info": "Example use of the Hue Light node"
8
8
  },
9
9
  {
10
- "id": "44976f84.e3eef8",
10
+ "id": "fd1b0ea2e9b0c530",
11
+ "type": "comment",
12
+ "z": "bfc496b5dc528777",
13
+ "name": "FIRST STEPS (double click me)",
14
+ "info": "Click on the \"Hue Light\" node and select both your bridge and a light from the list. If you have not yet set up a bridge, you will be asked to set one up before you can finish configuring the node.\n\nAs soon as the node is connected to your bridge and the light and you have deployed the changes in Node-RED, the node can receive and execute your commands. The \"Hue Light\" node automatically sends a message as soon as the status of the light on the bridge has been updated. You will receive the updated status and all of its information in the message that is issued.\n\nIf you would like to receive more information about this node, the possible commands and output values, then click on it once in your flow and navigate to the Node-RED book icon (top right corner).",
15
+ "x": 150,
16
+ "y": 40,
17
+ "wires": [],
18
+ "icon": "font-awesome/fa-question-circle"
19
+ },
20
+ {
21
+ "id": "2af2dc166c3bb8f2",
22
+ "type": "debug",
23
+ "z": "bfc496b5dc528777",
24
+ "name": "Information",
25
+ "active": true,
26
+ "tosidebar": true,
27
+ "console": false,
28
+ "tostatus": false,
29
+ "complete": "true",
30
+ "targetType": "full",
31
+ "statusVal": "",
32
+ "statusType": "auto",
33
+ "x": 770,
34
+ "y": 160,
35
+ "wires": [],
36
+ "icon": "font-awesome/fa-info-circle"
37
+ },
38
+ {
39
+ "id": "eaadbf2396415deb",
40
+ "type": "comment",
41
+ "z": "bfc496b5dc528777",
42
+ "name": "Get the current status",
43
+ "info": "",
44
+ "x": 120,
45
+ "y": 120,
46
+ "wires": []
47
+ },
48
+ {
49
+ "id": "b1aab91f47400d0a",
11
50
  "type": "inject",
12
- "z": "a1d70652.ec672",
51
+ "z": "bfc496b5dc528777",
52
+ "name": "Status",
53
+ "props": [
54
+ {
55
+ "p": "payload"
56
+ }
57
+ ],
58
+ "repeat": "",
59
+ "crontab": "",
60
+ "once": false,
61
+ "onceDelay": 0.1,
62
+ "topic": "",
63
+ "payload": "{\"status\":true}",
64
+ "payloadType": "json",
65
+ "x": 110,
66
+ "y": 160,
67
+ "wires": [
68
+ [
69
+ "736b63eb9b5c3731"
70
+ ]
71
+ ],
72
+ "icon": "node-red/alert.svg"
73
+ },
74
+ {
75
+ "id": "78b75b84ed839cfd",
76
+ "type": "comment",
77
+ "z": "bfc496b5dc528777",
78
+ "name": "Turn on / off the light",
79
+ "info": "",
80
+ "x": 110,
81
+ "y": 220,
82
+ "wires": []
83
+ },
84
+ {
85
+ "id": "6bcf026ef5794bcd",
86
+ "type": "inject",
87
+ "z": "bfc496b5dc528777",
13
88
  "name": "Turn on",
89
+ "props": [
90
+ {
91
+ "p": "payload"
92
+ }
93
+ ],
94
+ "repeat": "",
95
+ "crontab": "",
96
+ "once": false,
97
+ "onceDelay": 0.1,
14
98
  "topic": "",
15
99
  "payload": "true",
16
100
  "payloadType": "bool",
101
+ "x": 110,
102
+ "y": 260,
103
+ "wires": [
104
+ [
105
+ "736b63eb9b5c3731"
106
+ ]
107
+ ],
108
+ "icon": "font-awesome/fa-circle"
109
+ },
110
+ {
111
+ "id": "c24ad6204076c4cb",
112
+ "type": "inject",
113
+ "z": "bfc496b5dc528777",
114
+ "name": "Turn off",
115
+ "props": [
116
+ {
117
+ "p": "payload"
118
+ }
119
+ ],
120
+ "repeat": "",
121
+ "crontab": "",
122
+ "once": false,
123
+ "onceDelay": 0.1,
124
+ "topic": "",
125
+ "payload": "false",
126
+ "payloadType": "bool",
127
+ "x": 110,
128
+ "y": 300,
129
+ "wires": [
130
+ [
131
+ "736b63eb9b5c3731"
132
+ ]
133
+ ],
134
+ "icon": "font-awesome/fa-circle-o"
135
+ },
136
+ {
137
+ "id": "3bf60cb5d6cd549a",
138
+ "type": "comment",
139
+ "z": "bfc496b5dc528777",
140
+ "name": "Play effects on the light",
141
+ "info": "",
142
+ "x": 120,
143
+ "y": 660,
144
+ "wires": []
145
+ },
146
+ {
147
+ "id": "bc3258d179d76888",
148
+ "type": "inject",
149
+ "z": "bfc496b5dc528777",
150
+ "name": "Red alert for 3 seconds",
151
+ "props": [
152
+ {
153
+ "p": "payload"
154
+ }
155
+ ],
156
+ "repeat": "",
157
+ "crontab": "",
158
+ "once": false,
159
+ "onceDelay": 0.1,
160
+ "topic": "",
161
+ "payload": "{\"on\":true,\"alert\":3,\"color\":\"red\"}",
162
+ "payloadType": "json",
163
+ "x": 160,
164
+ "y": 700,
165
+ "wires": [
166
+ [
167
+ "736b63eb9b5c3731"
168
+ ]
169
+ ],
170
+ "icon": "font-awesome/fa-warning"
171
+ },
172
+ {
173
+ "id": "7829a2ce62655ecf",
174
+ "type": "inject",
175
+ "z": "bfc496b5dc528777",
176
+ "name": "Loop though all colors for 5 seconds",
177
+ "props": [
178
+ {
179
+ "p": "payload"
180
+ }
181
+ ],
182
+ "repeat": "",
183
+ "crontab": "",
184
+ "once": false,
185
+ "onceDelay": 0.1,
186
+ "topic": "",
187
+ "payload": "{\"colorloop\":5,\"brightness\":100}",
188
+ "payloadType": "json",
189
+ "x": 200,
190
+ "y": 740,
191
+ "wires": [
192
+ [
193
+ "736b63eb9b5c3731"
194
+ ]
195
+ ],
196
+ "icon": "node-red-contrib-huemagic/hue-scene.svg"
197
+ },
198
+ {
199
+ "id": "b024d72eb9b7776c",
200
+ "type": "comment",
201
+ "z": "bfc496b5dc528777",
202
+ "name": "Change color of the light",
203
+ "info": "",
204
+ "x": 130,
205
+ "y": 800,
206
+ "wires": []
207
+ },
208
+ {
209
+ "id": "3b804f60a04c3a7b",
210
+ "type": "inject",
211
+ "z": "bfc496b5dc528777",
212
+ "name": "Red color by name",
213
+ "props": [
214
+ {
215
+ "p": "payload"
216
+ }
217
+ ],
218
+ "repeat": "",
219
+ "crontab": "",
220
+ "once": false,
221
+ "onceDelay": 0.1,
222
+ "topic": "",
223
+ "payload": "{\"color\":\"red\"}",
224
+ "payloadType": "json",
225
+ "x": 150,
226
+ "y": 840,
227
+ "wires": [
228
+ [
229
+ "736b63eb9b5c3731"
230
+ ]
231
+ ],
232
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
233
+ },
234
+ {
235
+ "id": "b2f8f62480275d8a",
236
+ "type": "inject",
237
+ "z": "bfc496b5dc528777",
238
+ "name": "Green color by HEX",
239
+ "props": [
240
+ {
241
+ "p": "payload"
242
+ }
243
+ ],
244
+ "repeat": "",
245
+ "crontab": "",
246
+ "once": false,
247
+ "onceDelay": 0.1,
248
+ "topic": "",
249
+ "payload": "{\"hex\":\"#00FF00\"}",
250
+ "payloadType": "json",
251
+ "x": 150,
252
+ "y": 880,
253
+ "wires": [
254
+ [
255
+ "736b63eb9b5c3731"
256
+ ]
257
+ ],
258
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
259
+ },
260
+ {
261
+ "id": "6f19d2c69ee5753c",
262
+ "type": "inject",
263
+ "z": "bfc496b5dc528777",
264
+ "name": "Blue color by RGB",
265
+ "props": [
266
+ {
267
+ "p": "payload"
268
+ }
269
+ ],
17
270
  "repeat": "",
18
271
  "crontab": "",
19
272
  "once": false,
20
273
  "onceDelay": 0.1,
274
+ "topic": "",
275
+ "payload": "{\"rgb\":[0,0,255]}",
276
+ "payloadType": "json",
277
+ "x": 150,
278
+ "y": 920,
279
+ "wires": [
280
+ [
281
+ "736b63eb9b5c3731"
282
+ ]
283
+ ],
284
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
285
+ },
286
+ {
287
+ "id": "f15b96643d181980",
288
+ "type": "comment",
289
+ "z": "bfc496b5dc528777",
290
+ "name": "Change color temperature of the light",
291
+ "info": "",
21
292
  "x": 170,
22
- "y": 60,
293
+ "y": 1300,
294
+ "wires": []
295
+ },
296
+ {
297
+ "id": "e2f4f9c624637c41",
298
+ "type": "inject",
299
+ "z": "bfc496b5dc528777",
300
+ "name": "Cold color temperature",
301
+ "props": [
302
+ {
303
+ "p": "payload"
304
+ }
305
+ ],
306
+ "repeat": "",
307
+ "crontab": "",
308
+ "once": false,
309
+ "onceDelay": 0.1,
310
+ "topic": "",
311
+ "payload": "{\"colorTemp\":\"cold\",\"brightness\":100}",
312
+ "payloadType": "json",
313
+ "x": 160,
314
+ "y": 1380,
23
315
  "wires": [
24
316
  [
25
- "3f633f39.45661"
317
+ "736b63eb9b5c3731"
26
318
  ]
27
319
  ],
28
- "icon": "font-awesome/fa-power-off"
320
+ "icon": "node-red-contrib-huemagic/hue-temperature.svg"
29
321
  },
30
322
  {
31
- "id": "7a33997e.4744d",
323
+ "id": "a0fb4dee0110b1b4",
32
324
  "type": "inject",
33
- "z": "a1d70652.ec672",
34
- "name": "Turn off",
325
+ "z": "bfc496b5dc528777",
326
+ "name": "Normal color temperature",
327
+ "props": [
328
+ {
329
+ "p": "payload"
330
+ }
331
+ ],
332
+ "repeat": "",
333
+ "crontab": "",
334
+ "once": false,
335
+ "onceDelay": 0.1,
35
336
  "topic": "",
36
- "payload": "false",
37
- "payloadType": "bool",
337
+ "payload": "{\"colorTemp\":\"normal\",\"brightness\":100}",
338
+ "payloadType": "json",
339
+ "x": 170,
340
+ "y": 1420,
341
+ "wires": [
342
+ [
343
+ "736b63eb9b5c3731"
344
+ ]
345
+ ],
346
+ "icon": "node-red-contrib-huemagic/hue-temperature.svg"
347
+ },
348
+ {
349
+ "id": "0c72f77de7b888a9",
350
+ "type": "inject",
351
+ "z": "bfc496b5dc528777",
352
+ "name": "Warm color temperature",
353
+ "props": [
354
+ {
355
+ "p": "payload"
356
+ }
357
+ ],
38
358
  "repeat": "",
39
359
  "crontab": "",
40
360
  "once": false,
41
361
  "onceDelay": 0.1,
362
+ "topic": "",
363
+ "payload": "{\"colorTemp\":\"warm\",\"brightness\":100}",
364
+ "payloadType": "json",
42
365
  "x": 170,
43
- "y": 120,
366
+ "y": 1460,
44
367
  "wires": [
45
368
  [
46
- "3f633f39.45661"
369
+ "736b63eb9b5c3731"
47
370
  ]
48
371
  ],
49
- "icon": "font-awesome/fa-power-off"
372
+ "icon": "node-red-contrib-huemagic/hue-temperature.svg"
50
373
  },
51
374
  {
52
- "id": "78de99d5.f8ae",
375
+ "id": "bf88a3c2c20c5206",
53
376
  "type": "inject",
54
- "z": "a1d70652.ec672",
55
- "name": "Extended mode",
377
+ "z": "bfc496b5dc528777",
378
+ "name": "Hot color temperature",
379
+ "props": [
380
+ {
381
+ "p": "payload"
382
+ }
383
+ ],
384
+ "repeat": "",
385
+ "crontab": "",
386
+ "once": false,
387
+ "onceDelay": 0.1,
56
388
  "topic": "",
57
- "payload": "{\"on\":true,\"brightness\":100,\"color\":\"any\"}",
389
+ "payload": "{\"colorTemp\":\"hot\",\"brightness\":100}",
58
390
  "payloadType": "json",
391
+ "x": 160,
392
+ "y": 1500,
393
+ "wires": [
394
+ [
395
+ "736b63eb9b5c3731"
396
+ ]
397
+ ],
398
+ "icon": "node-red-contrib-huemagic/hue-temperature.svg"
399
+ },
400
+ {
401
+ "id": "968d22b4ae536233",
402
+ "type": "inject",
403
+ "z": "bfc496b5dc528777",
404
+ "name": "Normal temperature by exact value",
405
+ "props": [
406
+ {
407
+ "p": "payload"
408
+ }
409
+ ],
59
410
  "repeat": "",
60
411
  "crontab": "",
61
412
  "once": false,
62
413
  "onceDelay": 0.1,
414
+ "topic": "",
415
+ "payload": "{\"colorTemp\":240,\"brightness\":100}",
416
+ "payloadType": "json",
417
+ "x": 200,
418
+ "y": 1540,
419
+ "wires": [
420
+ [
421
+ "736b63eb9b5c3731"
422
+ ]
423
+ ],
424
+ "icon": "node-red-contrib-huemagic/hue-temperature.svg"
425
+ },
426
+ {
427
+ "id": "7321a6f9e0121315",
428
+ "type": "inject",
429
+ "z": "bfc496b5dc528777",
430
+ "name": "Automatic (based on current time)",
431
+ "props": [
432
+ {
433
+ "p": "payload"
434
+ }
435
+ ],
436
+ "repeat": "",
437
+ "crontab": "",
438
+ "once": false,
439
+ "onceDelay": 0.1,
440
+ "topic": "",
441
+ "payload": "{\"colorTemp\":\"auto\",\"brightness\":100}",
442
+ "payloadType": "json",
443
+ "x": 200,
444
+ "y": 1340,
445
+ "wires": [
446
+ [
447
+ "736b63eb9b5c3731"
448
+ ]
449
+ ],
450
+ "icon": "node-red-contrib-huemagic/hue-temperature.svg"
451
+ },
452
+ {
453
+ "id": "1b68cc5d584de2f2",
454
+ "type": "comment",
455
+ "z": "bfc496b5dc528777",
456
+ "name": "Change brightness of the light",
457
+ "info": "",
63
458
  "x": 140,
64
- "y": 180,
459
+ "y": 400,
460
+ "wires": []
461
+ },
462
+ {
463
+ "id": "c6bdf85c484f37c2",
464
+ "type": "inject",
465
+ "z": "bfc496b5dc528777",
466
+ "name": "Set to 100%",
467
+ "props": [
468
+ {
469
+ "p": "payload"
470
+ }
471
+ ],
472
+ "repeat": "",
473
+ "crontab": "",
474
+ "once": false,
475
+ "onceDelay": 0.1,
476
+ "topic": "",
477
+ "payload": "{\"brightness\":100}",
478
+ "payloadType": "json",
479
+ "x": 130,
480
+ "y": 480,
481
+ "wires": [
482
+ [
483
+ "736b63eb9b5c3731"
484
+ ]
485
+ ],
486
+ "icon": "font-awesome/fa-sun-o"
487
+ },
488
+ {
489
+ "id": "60cbd0cf886f9213",
490
+ "type": "inject",
491
+ "z": "bfc496b5dc528777",
492
+ "name": "Set to 25%",
493
+ "props": [
494
+ {
495
+ "p": "payload"
496
+ }
497
+ ],
498
+ "repeat": "",
499
+ "crontab": "",
500
+ "once": false,
501
+ "onceDelay": 0.1,
502
+ "topic": "",
503
+ "payload": "{\"brightness\":25}",
504
+ "payloadType": "json",
505
+ "x": 130,
506
+ "y": 440,
507
+ "wires": [
508
+ [
509
+ "736b63eb9b5c3731"
510
+ ]
511
+ ],
512
+ "icon": "font-awesome/fa-moon-o"
513
+ },
514
+ {
515
+ "id": "f2f9d1903643268b",
516
+ "type": "inject",
517
+ "z": "bfc496b5dc528777",
518
+ "name": "Toggle on/off",
519
+ "props": [
520
+ {
521
+ "p": "payload"
522
+ }
523
+ ],
524
+ "repeat": "",
525
+ "crontab": "",
526
+ "once": false,
527
+ "onceDelay": 0.1,
528
+ "topic": "",
529
+ "payload": "{\"toggle\":true}",
530
+ "payloadType": "json",
531
+ "x": 130,
532
+ "y": 340,
533
+ "wires": [
534
+ [
535
+ "736b63eb9b5c3731"
536
+ ]
537
+ ],
538
+ "icon": "font-awesome/fa-dot-circle-o"
539
+ },
540
+ {
541
+ "id": "54accf85a04c2304",
542
+ "type": "inject",
543
+ "z": "bfc496b5dc528777",
544
+ "name": "Random color",
545
+ "props": [
546
+ {
547
+ "p": "payload"
548
+ }
549
+ ],
550
+ "repeat": "",
551
+ "crontab": "",
552
+ "once": false,
553
+ "onceDelay": 0.1,
554
+ "topic": "",
555
+ "payload": "{\"color\":\"random\"}",
556
+ "payloadType": "json",
557
+ "x": 130,
558
+ "y": 1240,
559
+ "wires": [
560
+ [
561
+ "736b63eb9b5c3731"
562
+ ]
563
+ ],
564
+ "icon": "node-red/swap.svg"
565
+ },
566
+ {
567
+ "id": "5647ce83310616b2",
568
+ "type": "inject",
569
+ "z": "bfc496b5dc528777",
570
+ "name": "Node-RED theme color by XY",
571
+ "props": [
572
+ {
573
+ "p": "payload"
574
+ }
575
+ ],
576
+ "repeat": "",
577
+ "crontab": "",
578
+ "once": false,
579
+ "onceDelay": 0.1,
580
+ "topic": "",
581
+ "payload": "{\"xyColor\":{\"x\":0.7401,\"y\":0.2718}}",
582
+ "payloadType": "json",
583
+ "x": 180,
584
+ "y": 960,
65
585
  "wires": [
66
586
  [
67
- "3f633f39.45661"
587
+ "736b63eb9b5c3731"
68
588
  ]
69
589
  ],
70
- "icon": "node-red/cog.svg"
590
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
71
591
  },
72
592
  {
73
- "id": "3f633f39.45661",
593
+ "id": "af76f17f661aa0a5",
594
+ "type": "inject",
595
+ "z": "bfc496b5dc528777",
596
+ "name": "Dominant color from image url",
597
+ "props": [
598
+ {
599
+ "p": "payload"
600
+ }
601
+ ],
602
+ "repeat": "",
603
+ "crontab": "",
604
+ "once": false,
605
+ "onceDelay": 0.1,
606
+ "topic": "",
607
+ "payload": "{\"image\":\"https://user-images.githubusercontent.com/5302050/148616400-b7e7b35d-c779-4b6d-baff-c91ac2980d8f.jpg\"}",
608
+ "payloadType": "json",
609
+ "x": 180,
610
+ "y": 1000,
611
+ "wires": [
612
+ [
613
+ "736b63eb9b5c3731"
614
+ ]
615
+ ],
616
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
617
+ },
618
+ {
619
+ "id": "736b63eb9b5c3731",
74
620
  "type": "hue-light",
75
- "z": "a1d70652.ec672",
76
- "name": "",
77
- "lightid": "",
621
+ "z": "bfc496b5dc528777",
78
622
  "colornamer": true,
79
623
  "skipevents": false,
80
- "x": 380,
81
- "y": 180,
624
+ "initevents": false,
625
+ "x": 600,
626
+ "y": 160,
82
627
  "wires": [
83
628
  [
84
- "ca264931.323e48"
629
+ "2af2dc166c3bb8f2"
85
630
  ]
86
631
  ]
87
632
  },
88
633
  {
89
- "id": "9a5a0fe8.f813c",
634
+ "id": "55973d3aa06fc9e6",
90
635
  "type": "inject",
91
- "z": "a1d70652.ec672",
92
- "name": "Toggle",
636
+ "z": "bfc496b5dc528777",
637
+ "name": "Increment brightness by 50%",
638
+ "props": [
639
+ {
640
+ "p": "payload"
641
+ }
642
+ ],
643
+ "repeat": "",
644
+ "crontab": "",
645
+ "once": false,
646
+ "onceDelay": 0.1,
93
647
  "topic": "",
94
- "payload": "{\"toggle\":true}",
648
+ "payload": "{\"incrementBrightness\":50}",
95
649
  "payloadType": "json",
650
+ "x": 180,
651
+ "y": 520,
652
+ "wires": [
653
+ [
654
+ "736b63eb9b5c3731"
655
+ ]
656
+ ],
657
+ "icon": "font-awesome/fa-plus-square"
658
+ },
659
+ {
660
+ "id": "b97b12cf862e3eae",
661
+ "type": "inject",
662
+ "z": "bfc496b5dc528777",
663
+ "name": "Decrement brightness by 25%",
664
+ "props": [
665
+ {
666
+ "p": "payload"
667
+ }
668
+ ],
96
669
  "repeat": "",
97
670
  "crontab": "",
98
671
  "once": false,
99
672
  "onceDelay": 0.1,
100
- "x": 170,
101
- "y": 240,
673
+ "topic": "",
674
+ "payload": "{\"decrementBrightness\":25}",
675
+ "payloadType": "json",
676
+ "x": 190,
677
+ "y": 560,
102
678
  "wires": [
103
679
  [
104
- "3f633f39.45661"
680
+ "736b63eb9b5c3731"
105
681
  ]
106
682
  ],
107
- "icon": "font-awesome/fa-power-off"
683
+ "icon": "font-awesome/fa-minus-square"
108
684
  },
109
685
  {
110
- "id": "b3e7c62e.7cb6a",
686
+ "id": "73599da840b5c18f",
111
687
  "type": "inject",
112
- "z": "a1d70652.ec672",
113
- "name": "Play red alert",
688
+ "z": "bfc496b5dc528777",
689
+ "name": "Increment color temperature by 50",
690
+ "props": [
691
+ {
692
+ "p": "payload"
693
+ }
694
+ ],
695
+ "repeat": "",
696
+ "crontab": "",
697
+ "once": false,
698
+ "onceDelay": 0.1,
114
699
  "topic": "",
115
- "payload": "{\"alert\":5,\"hex\":\"#ff0000\"}",
700
+ "payload": "{\"incrementColorTemp\":50}",
116
701
  "payloadType": "json",
702
+ "x": 200,
703
+ "y": 1580,
704
+ "wires": [
705
+ [
706
+ "736b63eb9b5c3731"
707
+ ]
708
+ ],
709
+ "icon": "font-awesome/fa-plus-square"
710
+ },
711
+ {
712
+ "id": "b7f6d89717fcee28",
713
+ "type": "inject",
714
+ "z": "bfc496b5dc528777",
715
+ "name": "Decrement color temperature by 50",
716
+ "props": [
717
+ {
718
+ "p": "payload"
719
+ }
720
+ ],
117
721
  "repeat": "",
118
722
  "crontab": "",
119
723
  "once": false,
120
724
  "onceDelay": 0.1,
121
- "x": 150,
122
- "y": 300,
725
+ "topic": "",
726
+ "payload": "{\"decrementColorTemp\":50}",
727
+ "payloadType": "json",
728
+ "x": 200,
729
+ "y": 1620,
123
730
  "wires": [
124
731
  [
125
- "3f633f39.45661"
732
+ "736b63eb9b5c3731"
126
733
  ]
127
734
  ],
128
- "icon": "node-red/alert.svg"
735
+ "icon": "font-awesome/fa-minus-square"
129
736
  },
130
737
  {
131
- "id": "ca264931.323e48",
132
- "type": "debug",
133
- "z": "a1d70652.ec672",
134
- "name": "Information",
135
- "active": true,
136
- "tosidebar": true,
137
- "console": false,
138
- "tostatus": false,
139
- "complete": "payload",
140
- "targetType": "msg",
141
- "x": 610,
142
- "y": 180,
143
- "wires": [],
144
- "icon": "font-awesome/fa-info-circle"
738
+ "id": "97b9b1051bdee695",
739
+ "type": "inject",
740
+ "z": "bfc496b5dc528777",
741
+ "name": "Increment saturation by 50%",
742
+ "props": [
743
+ {
744
+ "p": "payload"
745
+ }
746
+ ],
747
+ "repeat": "",
748
+ "crontab": "",
749
+ "once": false,
750
+ "onceDelay": 0.1,
751
+ "topic": "",
752
+ "payload": "{\"saturation\":90}",
753
+ "payloadType": "json",
754
+ "x": 180,
755
+ "y": 1040,
756
+ "wires": [
757
+ [
758
+ "736b63eb9b5c3731"
759
+ ]
760
+ ],
761
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
762
+ },
763
+ {
764
+ "id": "567501938ec6efe1",
765
+ "type": "inject",
766
+ "z": "bfc496b5dc528777",
767
+ "name": "Set gradient from two colors",
768
+ "props": [
769
+ {
770
+ "p": "payload"
771
+ }
772
+ ],
773
+ "repeat": "",
774
+ "crontab": "",
775
+ "once": false,
776
+ "onceDelay": 0.1,
777
+ "topic": "",
778
+ "payload": "{\"gradient\":{\"hex\":[\"#03adfc\",\"#fc037b\"]}}",
779
+ "payloadType": "json",
780
+ "x": 180,
781
+ "y": 1200,
782
+ "wires": [
783
+ [
784
+ "736b63eb9b5c3731"
785
+ ]
786
+ ],
787
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
788
+ },
789
+ {
790
+ "id": "ea044d3b72784ff7",
791
+ "type": "inject",
792
+ "z": "bfc496b5dc528777",
793
+ "name": "Mix current color with red (hex)",
794
+ "props": [
795
+ {
796
+ "p": "payload"
797
+ }
798
+ ],
799
+ "repeat": "",
800
+ "crontab": "",
801
+ "once": false,
802
+ "onceDelay": 0.1,
803
+ "topic": "",
804
+ "payload": "{\"mixColor\":{\"hex\":\"#ff0000\"}}",
805
+ "payloadType": "json",
806
+ "x": 190,
807
+ "y": 1080,
808
+ "wires": [
809
+ [
810
+ "736b63eb9b5c3731"
811
+ ]
812
+ ],
813
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
814
+ },
815
+ {
816
+ "id": "2b12d720883fa1c5",
817
+ "type": "inject",
818
+ "z": "bfc496b5dc528777",
819
+ "name": "Mix current color with blue (RGB)",
820
+ "props": [
821
+ {
822
+ "p": "payload"
823
+ }
824
+ ],
825
+ "repeat": "",
826
+ "crontab": "",
827
+ "once": false,
828
+ "onceDelay": 0.1,
829
+ "topic": "",
830
+ "payload": "{\"mixColor\":{\"rgb\":[0,0,255]}}",
831
+ "payloadType": "json",
832
+ "x": 190,
833
+ "y": 1160,
834
+ "wires": [
835
+ [
836
+ "736b63eb9b5c3731"
837
+ ]
838
+ ],
839
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
840
+ },
841
+ {
842
+ "id": "2bae389d87f650c8",
843
+ "type": "inject",
844
+ "z": "bfc496b5dc528777",
845
+ "name": "Mix current color with 70% green (named + amount)",
846
+ "props": [
847
+ {
848
+ "p": "payload"
849
+ }
850
+ ],
851
+ "repeat": "",
852
+ "crontab": "",
853
+ "once": false,
854
+ "onceDelay": 0.1,
855
+ "topic": "",
856
+ "payload": "{\"mixColor\":{\"color\":\"green\",\"amount\":70}}",
857
+ "payloadType": "json",
858
+ "x": 250,
859
+ "y": 1120,
860
+ "wires": [
861
+ [
862
+ "736b63eb9b5c3731"
863
+ ]
864
+ ],
865
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
866
+ },
867
+ {
868
+ "id": "2187049b0e0584b3",
869
+ "type": "inject",
870
+ "z": "bfc496b5dc528777",
871
+ "name": "Automatic brightness",
872
+ "props": [
873
+ {
874
+ "p": "payload"
875
+ }
876
+ ],
877
+ "repeat": "",
878
+ "crontab": "",
879
+ "once": false,
880
+ "onceDelay": 0.1,
881
+ "topic": "",
882
+ "payload": "{\"brightness\":\"auto\"}",
883
+ "payloadType": "json",
884
+ "x": 160,
885
+ "y": 600,
886
+ "wires": [
887
+ [
888
+ "736b63eb9b5c3731"
889
+ ]
890
+ ],
891
+ "icon": "node-red-contrib-huemagic/hue-magic.svg"
145
892
  }
146
893
  ]