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
@@ -13,10 +13,10 @@
13
13
  "name": "",
14
14
  "endless": true,
15
15
  "restore": false,
16
- "preset": null,
17
- "steps": null,
18
- "x": 370,
19
- "y": 120,
16
+ "preset": "",
17
+ "steps": "",
18
+ "x": 490,
19
+ "y": 160,
20
20
  "wires": [
21
21
  [
22
22
  "f5819321.8928f8"
@@ -28,32 +28,36 @@
28
28
  "type": "inject",
29
29
  "z": "f6ddc6bb.8646a8",
30
30
  "name": "Start animation",
31
- "topic": "",
32
- "payload": "true",
33
- "payloadType": "bool",
31
+ "props": [
32
+ {
33
+ "p": "payload"
34
+ }
35
+ ],
34
36
  "repeat": "",
35
37
  "crontab": "",
36
38
  "once": false,
37
39
  "onceDelay": 0.1,
38
- "x": 160,
39
- "y": 60,
40
+ "topic": "",
41
+ "payload": "true",
42
+ "payloadType": "bool",
43
+ "x": 140,
44
+ "y": 160,
40
45
  "wires": [
41
46
  [
42
47
  "652f80ad.692fe"
43
48
  ]
44
49
  ],
45
- "icon": "font-awesome/fa-power-off"
50
+ "icon": "font-awesome/fa-circle"
46
51
  },
47
52
  {
48
53
  "id": "f5819321.8928f8",
49
54
  "type": "hue-light",
50
55
  "z": "f6ddc6bb.8646a8",
51
- "name": "",
52
- "lightid": "",
53
56
  "colornamer": true,
54
57
  "skipevents": false,
55
- "x": 580,
56
- "y": 120,
58
+ "initevents": false,
59
+ "x": 680,
60
+ "y": 160,
57
61
  "wires": [
58
62
  []
59
63
  ]
@@ -63,41 +67,82 @@
63
67
  "type": "inject",
64
68
  "z": "f6ddc6bb.8646a8",
65
69
  "name": "Stop animation",
66
- "topic": "",
67
- "payload": "false",
68
- "payloadType": "bool",
70
+ "props": [
71
+ {
72
+ "p": "payload"
73
+ }
74
+ ],
69
75
  "repeat": "",
70
76
  "crontab": "",
71
77
  "once": false,
72
78
  "onceDelay": 0.1,
73
- "x": 160,
74
- "y": 120,
79
+ "topic": "",
80
+ "payload": "false",
81
+ "payloadType": "bool",
82
+ "x": 140,
83
+ "y": 200,
75
84
  "wires": [
76
85
  [
77
86
  "652f80ad.692fe"
78
87
  ]
79
88
  ],
80
- "icon": "font-awesome/fa-power-off"
89
+ "icon": "font-awesome/fa-circle-o"
81
90
  },
82
91
  {
83
92
  "id": "5b111243.1e472c",
84
93
  "type": "inject",
85
94
  "z": "f6ddc6bb.8646a8",
86
95
  "name": "Custom animation",
87
- "topic": "",
88
- "payload": "{\"animate\":true,\"steps\":[{\"delay\":500,\"animation\":{\"hex\":\"#FF0000\",\"transitionTime\":0}},{\"delay\":500,\"animation\":{\"hex\":\"#00FF00\",\"transitionTime\":0}},{\"delay\":500,\"animation\":{\"hex\":\"#0000FF\",\"transitionTime\":0}}]}",
89
- "payloadType": "json",
96
+ "props": [
97
+ {
98
+ "p": "payload"
99
+ }
100
+ ],
90
101
  "repeat": "",
91
102
  "crontab": "",
92
103
  "once": false,
93
104
  "onceDelay": 0.1,
105
+ "topic": "",
106
+ "payload": "{\"animate\":true,\"steps\":[{\"delay\":500,\"animation\":{\"hex\":\"#FF0000\",\"transitionTime\":0}},{\"delay\":500,\"animation\":{\"hex\":\"#00FF00\",\"transitionTime\":0}},{\"delay\":500,\"animation\":{\"hex\":\"#0000FF\",\"transitionTime\":0}}]}",
107
+ "payloadType": "json",
94
108
  "x": 150,
95
- "y": 180,
109
+ "y": 300,
96
110
  "wires": [
97
111
  [
98
112
  "652f80ad.692fe"
99
113
  ]
100
114
  ],
101
115
  "icon": "font-awesome/fa-magic"
116
+ },
117
+ {
118
+ "id": "ea1b64ce5ba37564",
119
+ "type": "comment",
120
+ "z": "f6ddc6bb.8646a8",
121
+ "name": "FIRST STEPS (double click me)",
122
+ "info": "Click on the \"Hue Magic\" node and select a pre-made animation from the list. Then click on the \"Hue Light\" node to select a light that should be animated by the \"Hue Magic\" node. If you have not yet set up a bridge, you will be asked to set one up here before you can complete the configuration of the node.\n\nAs soon as the \"Hue Magic\" node is connected to the \"Hue Light\" node and you have deployed the changes in Node-RED, the node can receive and execute your animation.\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).",
123
+ "x": 150,
124
+ "y": 40,
125
+ "wires": [],
126
+ "icon": "font-awesome/fa-question-circle"
127
+ },
128
+ {
129
+ "id": "b632a445364cbc5d",
130
+ "type": "comment",
131
+ "z": "f6ddc6bb.8646a8",
132
+ "name": "Animation controls",
133
+ "info": "",
134
+ "x": 110,
135
+ "y": 120,
136
+ "wires": []
137
+ },
138
+ {
139
+ "id": "20cdbc9acd4ecf73",
140
+ "type": "comment",
141
+ "z": "f6ddc6bb.8646a8",
142
+ "name": "Custom animation",
143
+ "info": "",
144
+ "x": 110,
145
+ "y": 260,
146
+ "wires": []
102
147
  }
103
148
  ]
@@ -1,81 +1,149 @@
1
1
  [
2
2
  {
3
- "id": "d081bb24.81a8d",
3
+ "id": "073fb607f8039ef2",
4
4
  "type": "tab",
5
5
  "label": "Hue Motion (example)",
6
6
  "disabled": false,
7
7
  "info": "Example use of the Hue Motion node"
8
8
  },
9
9
  {
10
- "id": "c97e16b9.1ce368",
10
+ "id": "3ba8c03bba2a097d",
11
+ "type": "comment",
12
+ "z": "073fb607f8039ef2",
13
+ "name": "FIRST STEPS (double click me)",
14
+ "info": "Click on the \"Hue Motion\" node and select both your bridge and a sensor 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 sensor and you have deployed the changes in Node-RED, the node can receive and execute your commands. The \"Hue Motion\" node automatically outputs a message each time as soon as the status of the sensor on the bridge has been updated (a movement has been registered). 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": "bce07ce0ad34cdf5",
22
+ "type": "debug",
23
+ "z": "073fb607f8039ef2",
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": 810,
34
+ "y": 160,
35
+ "wires": [],
36
+ "icon": "font-awesome/fa-info-circle"
37
+ },
38
+ {
39
+ "id": "23deb12245fdbc7c",
40
+ "type": "comment",
41
+ "z": "073fb607f8039ef2",
42
+ "name": "Get the current status",
43
+ "info": "",
44
+ "x": 120,
45
+ "y": 120,
46
+ "wires": []
47
+ },
48
+ {
49
+ "id": "0b68e8b6eeeb0ed5",
11
50
  "type": "inject",
12
- "z": "d081bb24.81a8d",
13
- "name": "Turn on",
14
- "topic": "",
15
- "payload": "true",
16
- "payloadType": "bool",
51
+ "z": "073fb607f8039ef2",
52
+ "name": "Status",
53
+ "props": [
54
+ {
55
+ "p": "payload"
56
+ }
57
+ ],
17
58
  "repeat": "",
18
59
  "crontab": "",
19
60
  "once": false,
20
61
  "onceDelay": 0.1,
21
- "x": 130,
22
- "y": 60,
62
+ "topic": "",
63
+ "payload": "{\"status\":true}",
64
+ "payloadType": "json",
65
+ "x": 110,
66
+ "y": 160,
23
67
  "wires": [
24
68
  [
25
- "acfd6da8.7d8a58"
69
+ "1a1e1a628faa15dc"
26
70
  ]
27
71
  ],
28
- "icon": "font-awesome/fa-power-off"
72
+ "icon": "node-red/alert.svg"
29
73
  },
30
74
  {
31
- "id": "711947a4.fc72e8",
75
+ "id": "fe83e4d605d6b41d",
76
+ "type": "comment",
77
+ "z": "073fb607f8039ef2",
78
+ "name": "Turn on / off the device",
79
+ "info": "",
80
+ "x": 120,
81
+ "y": 220,
82
+ "wires": []
83
+ },
84
+ {
85
+ "id": "87fc103f2b958513",
32
86
  "type": "inject",
33
- "z": "d081bb24.81a8d",
34
- "name": "Turn off",
35
- "topic": "",
36
- "payload": "false",
37
- "payloadType": "bool",
87
+ "z": "073fb607f8039ef2",
88
+ "name": "Turn on",
89
+ "props": [
90
+ {
91
+ "p": "payload"
92
+ }
93
+ ],
38
94
  "repeat": "",
39
95
  "crontab": "",
40
96
  "once": false,
41
97
  "onceDelay": 0.1,
42
- "x": 130,
43
- "y": 120,
98
+ "topic": "",
99
+ "payload": "true",
100
+ "payloadType": "bool",
101
+ "x": 110,
102
+ "y": 260,
44
103
  "wires": [
45
104
  [
46
- "acfd6da8.7d8a58"
105
+ "1a1e1a628faa15dc"
47
106
  ]
48
107
  ],
49
- "icon": "font-awesome/fa-power-off"
108
+ "icon": "font-awesome/fa-circle"
50
109
  },
51
110
  {
52
- "id": "a9304ae0.8a9bf",
53
- "type": "debug",
54
- "z": "d081bb24.81a8d",
55
- "name": "Information",
56
- "active": true,
57
- "tosidebar": true,
58
- "console": false,
59
- "tostatus": false,
60
- "complete": "payload",
61
- "targetType": "msg",
62
- "x": 590,
63
- "y": 60,
64
- "wires": [],
65
- "icon": "font-awesome/fa-info-circle"
111
+ "id": "e2668753efecb01a",
112
+ "type": "inject",
113
+ "z": "073fb607f8039ef2",
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
+ "1a1e1a628faa15dc"
132
+ ]
133
+ ],
134
+ "icon": "font-awesome/fa-circle-o"
66
135
  },
67
136
  {
68
- "id": "acfd6da8.7d8a58",
137
+ "id": "1a1e1a628faa15dc",
69
138
  "type": "hue-motion",
70
- "z": "d081bb24.81a8d",
71
- "name": "",
72
- "sensorid": "",
139
+ "z": "073fb607f8039ef2",
73
140
  "skipevents": false,
74
- "x": 350,
75
- "y": 60,
141
+ "initevents": false,
142
+ "x": 590,
143
+ "y": 160,
76
144
  "wires": [
77
145
  [
78
- "a9304ae0.8a9bf"
146
+ "bce07ce0ad34cdf5"
79
147
  ]
80
148
  ]
81
149
  }
@@ -7,75 +7,143 @@
7
7
  "info": "Example use of the Hue Rules node"
8
8
  },
9
9
  {
10
- "id": "f55a8fb1.7794c8",
10
+ "id": "a6ec7e31e3edf26b",
11
+ "type": "comment",
12
+ "z": "7bca3b4f.9070fc",
13
+ "name": "FIRST STEPS (double click me)",
14
+ "info": "Click on the \"Hue Rule\" node and select both your bridge and a rule 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 you have deployed the changes in Node-RED, the node can receive and execute your commands. You will receive the updated status and all of its information about the rule 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": "863710a19fb12c5e",
22
+ "type": "debug",
23
+ "z": "7bca3b4f.9070fc",
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": 690,
34
+ "y": 160,
35
+ "wires": [],
36
+ "icon": "font-awesome/fa-info-circle"
37
+ },
38
+ {
39
+ "id": "c3f358fa89e66d78",
40
+ "type": "comment",
41
+ "z": "7bca3b4f.9070fc",
42
+ "name": "Get the current status",
43
+ "info": "",
44
+ "x": 120,
45
+ "y": 120,
46
+ "wires": []
47
+ },
48
+ {
49
+ "id": "403636a610280894",
11
50
  "type": "inject",
12
51
  "z": "7bca3b4f.9070fc",
13
- "name": "Enable rule",
14
- "topic": "",
15
- "payload": "true",
16
- "payloadType": "bool",
52
+ "name": "Status",
53
+ "props": [
54
+ {
55
+ "p": "payload"
56
+ }
57
+ ],
17
58
  "repeat": "",
18
59
  "crontab": "",
19
60
  "once": false,
20
61
  "onceDelay": 0.1,
21
- "x": 160,
22
- "y": 60,
62
+ "topic": "",
63
+ "payload": "{\"status\":true}",
64
+ "payloadType": "json",
65
+ "x": 110,
66
+ "y": 160,
23
67
  "wires": [
24
68
  [
25
- "fe008f45.8665a8"
69
+ "7bc8bf9290a86c68"
26
70
  ]
27
71
  ],
28
- "icon": "font-awesome/fa-power-off"
72
+ "icon": "node-red/alert.svg"
29
73
  },
30
74
  {
31
- "id": "a262b4ba.579538",
75
+ "id": "0fab9398dcc9c797",
76
+ "type": "comment",
77
+ "z": "7bca3b4f.9070fc",
78
+ "name": "Enable / disable the rule",
79
+ "info": "",
80
+ "x": 130,
81
+ "y": 220,
82
+ "wires": []
83
+ },
84
+ {
85
+ "id": "40f06e621e0643f0",
32
86
  "type": "inject",
33
87
  "z": "7bca3b4f.9070fc",
34
- "name": "Disable rule",
35
- "topic": "",
36
- "payload": "false",
37
- "payloadType": "bool",
88
+ "name": "Enable",
89
+ "props": [
90
+ {
91
+ "p": "payload"
92
+ }
93
+ ],
38
94
  "repeat": "",
39
95
  "crontab": "",
40
96
  "once": false,
41
97
  "onceDelay": 0.1,
42
- "x": 150,
43
- "y": 120,
98
+ "topic": "",
99
+ "payload": "true",
100
+ "payloadType": "bool",
101
+ "x": 110,
102
+ "y": 260,
44
103
  "wires": [
45
104
  [
46
- "fe008f45.8665a8"
105
+ "7bc8bf9290a86c68"
47
106
  ]
48
107
  ],
49
- "icon": "font-awesome/fa-power-off"
108
+ "icon": "font-awesome/fa-circle"
50
109
  },
51
110
  {
52
- "id": "a4f953ad.fd937",
53
- "type": "debug",
111
+ "id": "bde15ecaf96f1323",
112
+ "type": "inject",
54
113
  "z": "7bca3b4f.9070fc",
55
- "name": "Information",
56
- "active": true,
57
- "tosidebar": true,
58
- "console": false,
59
- "tostatus": false,
60
- "complete": "payload",
61
- "targetType": "msg",
62
- "x": 550,
63
- "y": 60,
64
- "wires": [],
65
- "icon": "font-awesome/fa-info-circle"
114
+ "name": "Disable",
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
+ "7bc8bf9290a86c68"
132
+ ]
133
+ ],
134
+ "icon": "font-awesome/fa-circle-o"
66
135
  },
67
136
  {
68
- "id": "fe008f45.8665a8",
137
+ "id": "7bc8bf9290a86c68",
69
138
  "type": "hue-rules",
70
139
  "z": "7bca3b4f.9070fc",
71
- "name": "",
72
- "ruleid": "",
73
140
  "skipevents": false,
74
- "x": 360,
75
- "y": 60,
141
+ "initevents": false,
142
+ "x": 510,
143
+ "y": 160,
76
144
  "wires": [
77
145
  [
78
- "a4f953ad.fd937"
146
+ "863710a19fb12c5e"
79
147
  ]
80
148
  ]
81
149
  }