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
package/CHANGELOG.md ADDED
@@ -0,0 +1,229 @@
1
+ [![Hue Magic Logo](https://gistcdn.githack.com/Foddy/062045775c28f5993ad646aba80e678c/raw/27e90d22bde68d9c92aed520c0c0c2cb8a22b7fd/huemagicv3x.svg)](https://flows.nodered.org/node/node-red-contrib-huemagic)
2
+
3
+ # Changelog
4
+
5
+ ### v3.0.0 (latest)
6
+ * Hue Motion, Hue Brightness, Hue Tap, Hue Switch & Hue Button nodes can now receive a status request
7
+ * New "Universal Mode" for the Hue Motion, Hue Brightness, Hue Tap, Hue Switch & Hue Button nodes
8
+ * The "colorTemp" property for Hue Light & Hue Group nodes can now also be set to "cold", "normal", "warm" or "auto"
9
+ * New dynamic and automatically calculated color temperature based on the current time ("auto" mode in "colorTemp" property)
10
+ * Nodes in "Universal Mode" are now also able to receive all events from devices of its type (optional)
11
+ * Hue Magic animations are now prerendered to improve performance
12
+ * 3 new Hue Magic animations ("Milkyway", "Beach" & "Forest")
13
+ * New (simple) Hue Button example flow
14
+ * Updated docs for almost all nodes and README
15
+ * Fixed an error with future states and the HTTP request node ([#200](https://github.com/Foddy/node-red-contrib-huemagic/pull/200))
16
+ * Other optimizations, dependency updates and clean up
17
+
18
+ ### v2.8.6
19
+ * Optimized random color mode for Hue Magic, Hue Light & Hue Group nodes ([#190](https://github.com/Foddy/node-red-contrib-huemagic/pull/190))
20
+ * New Hue Button node ([#191](https://github.com/Foddy/node-red-contrib-huemagic/pull/191))
21
+ * Updated README and Hue Button node docs (+ localized in German)
22
+
23
+ ### v2.8.2
24
+ * Fixed an issue with Hue Light & Hue Group nodes on extended mode ([#179](https://github.com/Foddy/node-red-contrib-huemagic/issues/179))
25
+ * Dependency updates
26
+
27
+ ### v2.8.1
28
+ * Improved the speed of "future states" in Hue Group & Hue Light nodes
29
+
30
+ ### v2.8.0
31
+ * Hue Light & Hue Group nodes can now receive commands even if the devices are off ([#110](https://github.com/Foddy/node-red-contrib-huemagic/issues/110) & [#155](https://github.com/Foddy/node-red-contrib-huemagic/issues/155))
32
+ * Hue Light nodes now set their status to switched off when they are not reachable ([#170](https://github.com/Foddy/node-red-contrib-huemagic/issues/170))
33
+
34
+ ### v2.7.2
35
+ * Fixed an issue with Hue Group nodes ([#178](https://github.com/Foddy/node-red-contrib-huemagic/issues/178))
36
+
37
+ ### v2.7.1
38
+ * Fixed a problem with "0" as topic in Hue Group nodes ([#166](https://github.com/Foddy/node-red-contrib-huemagic/issues/166))
39
+ * Fixed an issue with the active property on Hue Motion nodes ([#172](https://github.com/Foddy/node-red-contrib-huemagic/issues/172))
40
+ * Fixed a problem with "random" as a color command on Hue Group & Light nodes ([#167](https://github.com/Foddy/node-red-contrib-huemagic/issues/167))
41
+ * Dependency & readme updates
42
+
43
+ ### v2.7.0
44
+ * Fixed an error on Hue Scene nodes ([#164](https://github.com/Foddy/node-red-contrib-huemagic/issues/164))
45
+ * New "lastState" property on every node (except Hue Magic & Hue Scene) with the last state before the update
46
+
47
+ ### v2.6.5
48
+ * Fixed an error on Hue Group & Hue Light nodes ([#161](https://github.com/Foddy/node-red-contrib-huemagic/issues/161))
49
+ * The colorloop effect in Hue Group & Hue Light nodes can now be activated and deactivated manually ([#158](https://github.com/Foddy/node-red-contrib-huemagic/pull/158))
50
+ * New status property for Hue Light, Hue Group & Hue Motion nodes to request the current status of the devices ([#154](https://github.com/Foddy/node-red-contrib-huemagic/issues/154) & [#156](https://github.com/Foddy/node-red-contrib-huemagic/issues/156))
51
+ * Dependency updates
52
+
53
+ ### v2.6.2
54
+ * New original temperature parameter on Hue Temperature nodes
55
+ * Nodes are now sending their status once after passing an action ([#150](https://github.com/Foddy/node-red-contrib-huemagic/issues/150) & [#153](https://github.com/Foddy/node-red-contrib-huemagic/issues/153))
56
+ * Fixed an issue on the Hue Motion node ([#145](https://github.com/Foddy/node-red-contrib-huemagic/issues/145))
57
+ * Dependency updates
58
+
59
+ ### v2.6.1
60
+ * New option "incrementColorTemp" and "decrementBrightness" for Hue Light & Hue Group nodes ([#142](https://github.com/Foddy/node-red-contrib-huemagic/pull/142) / [#141](https://github.com/Foddy/node-red-contrib-huemagic/issues/141))
61
+ * Fixed an issue on the Hue Scene node ([#139](https://github.com/Foddy/node-red-contrib-huemagic/issues/139))
62
+ * Fixed an issue on the Hue Switch node ([#138](https://github.com/Foddy/node-red-contrib-huemagic/issues/138))
63
+ * Removed brightness layer on Hue Magic animation previews due to performance issues
64
+
65
+ ### v2.6.0
66
+ * Hue Bridge node can now fetch "Portal" and "Internet Services" information
67
+ * Global device updates are now also pushed to the Hue Bridge node (check docs under "Global update events")
68
+ * Removed software update logs on the Bridge (#93)
69
+ * Message structures from each node are now outsourced
70
+
71
+ ### v2.5.5
72
+ * Full German help docs translation of every node
73
+ * Delay between bridge requests has been reduced to 500ms from 700ms
74
+ * New "Strobo", "Random Rainbow" & "SOS" animations for the Hue Magic node
75
+ * Hue Magic previews now also display brightness animations
76
+ * Dependency updates
77
+
78
+ ### v2.5.4
79
+ * New option "brightnessLevel" for Hue Light & Hue Group nodes (#134)
80
+ * Fixed an error on Hue Group & Hue Light nodes (#135)
81
+ * Fixed an error on Hue Magic node and Hue Magic examples (#136)
82
+
83
+ ### v2.5.2
84
+ * Fixed an error with the brightness and transitionTime params on Hue Light & Hue Group nodes (#131)
85
+ * New option "ignoreOffLights" for Hue Group nodes to ignore state changes on turned off lights (#128)
86
+
87
+ ### v2.5.1
88
+ * HueMagic nodes are now available in German
89
+ * All HueMagic nodes are now compatible with the new Node-RED "complete" & "catch" nodes (Node-RED v1.0+)
90
+ * Hue Bridge fetch actions now also send out an "info" object with further bridge information
91
+ * New Hue Bridge sample flow can be imported directly from Node-RED
92
+ * Fixed an issue with light & group nodes (#122)
93
+ * Code optimizations and clean up
94
+
95
+ ### v2.2.6
96
+ * Hue scenes can now be applied on specific groups
97
+ * Hue Group nodes now support the option to select all groups / lights
98
+ * Optimized Hue Magic node to load dependencies locally
99
+
100
+ ### v2.2.3
101
+ * API requests are called again via the absolute path
102
+
103
+ ### v2.2.2
104
+ * New "Hue Magic" node with 12 animations included (check docs and examples)
105
+ * Sample flows for each node are now available and can be imported directly from Node-RED
106
+ * Fixed an issue which prevented output events on the nodes (#116)
107
+
108
+ ### v2.1.1
109
+ * Fixed an issue with the new option "skip events" on each node
110
+
111
+ ### v2.1.0
112
+ * Node updates can now be deactivated individually or globally (check node settings or Hue Bridge configuration)
113
+ * The "pressButton" option has been removed due to API restrictions on newer Hue Bridge firmwares (1.31+)
114
+
115
+ ### v2.0.5
116
+ * A delay has been added to minimize API limit problems to the Hue Bridge
117
+ * The color parameter now supports random colors via "any" or "random" as input (Hue Light & Group nodes)
118
+
119
+ ### v2.0.4
120
+ * Support of the Hue Smart plug (BETA)
121
+ * Support of alternative dimmer switches (check node docs, new property available)
122
+ * Fixed a problem in recheck loop ([#96](https://github.com/Foddy/node-red-contrib-huemagic/issues/96#issuecomment-530469447))
123
+ * Dependency updates
124
+
125
+ ### v2.0.2
126
+ * New "Hue Rule" node (check node docs)
127
+ * New "fetch" command for the Hue Bridge node to get various information
128
+ * New "toggle" and "image" command for Hue Light and Group nodes
129
+ * Transitions and colorloop effects now support millisecond values (comma values)
130
+ * Optimized sequential requests to the bridge to avoid API limit errors
131
+ * Fixed validation errors when group or light nodes are used in universal mode
132
+ * Fixed a problem with human readable color names ([e354c0b](https://github.com/Foddy/node-red-contrib-huemagic/pull/84/commits/e354c0b3596d169fb25bd1e830df39adaf04dc73))
133
+ * Updated readme
134
+ * Dependency updates
135
+
136
+ ### v1.9.0
137
+ * New "Hue Bridge" node (check node docs)
138
+ * New event-based algorithm improves the stability of all nodes
139
+ * New option to specify your own, alternative Hue Bridge port has been added (check node docs)
140
+ * Fixed Hue Bridge API limit errors for bridges with a large number of devices
141
+ * Other improvements
142
+ * Dependency updates
143
+
144
+ ### v1.5.6
145
+ * New increment/decrement brightness setting in Hue Light and Hue Group nodes ([3a6977a](https://github.com/Foddy/node-red-contrib-huemagic/pull/54/commits/3a6977a1f8090917556f6ee4bdf4142fad7f7d85))
146
+ * New real lux property to Hue Brightness event outputs ([thanks @Travelbacon](https://github.com/Foddy/node-red-contrib-huemagic/issues/49))
147
+ * Added colorTemp property to Hue Light event outputs ([f8d237d](https://github.com/Foddy/node-red-contrib-huemagic/pull/52/commits/f8d237d6edf6772dbb73d9bd408e81a4ad4bd99a))
148
+ * Manipulation of the update interval setting to avoid API errors with many devices
149
+ * Fixed some annoying typos
150
+ * Dependency updates
151
+
152
+ ### v1.5.4
153
+ * Dependency updates
154
+
155
+ ### v1.5.3
156
+ * Fixed a typo in Hue Temperature node
157
+
158
+ ### v1.5.2
159
+ * Added option to disable color naming in Hue Light & Hue Group config
160
+ * Fixed hex color conversion for Hue Light and Hue Group nodes
161
+ * More accurate color handling for light bulbs
162
+ * Added reachable attribute to Hue Light node
163
+ * Hue Tap can now send the same button action twice
164
+ * Fixed Hue Brightness event trigger when lux is 0
165
+ * UTC formatted "updated" date for Hue Brightness node
166
+ * Better error handling for all nodes
167
+ * Dependency updates
168
+
169
+ ### v1.4.1
170
+ * New color name setting in Hue Light and Hue Group nodes (check docs)
171
+ * Human readable color names for Hue Lights and Hue Groups
172
+ * HueMagic nodes are now all under the new "HueMagic" category in the palette
173
+ * Support of Philips Hue API version v1.19.0+ and Node.js 8+
174
+ * Dependency updates
175
+
176
+ ### v1.3.4
177
+ * Improved status messages for transition commands
178
+ * Dependency updates
179
+
180
+ ### v1.3.2
181
+ * Fixed incorrect msg.topic handlings
182
+ * Small improvements
183
+
184
+ ### v1.3.1
185
+ * New "saturation" setting in Hue Light and Hue Group nodes
186
+ * Improved input algorithm for Hue Lights and Groups nodes
187
+ * Added range validation for the "brightness" setting
188
+ * Setting the brightness level to "0" percent now turns off the lamp / group
189
+ * Fixed an error where nodes are losing their Id
190
+ * Fixed an error with the Hue Switch / Hue Tap node
191
+ * Typo corrections in README and several node's information
192
+
193
+ ### v1.2.3
194
+ * Fixed an error on the Hue Switch and Hue Tap nodes
195
+ * Fixed an error with the "Universal Mode" on several nodes
196
+
197
+ ### v1.2.1
198
+ * Support of Hue Taps and Wireless Dimmer Switches *(new nodes available)*
199
+ * Improved connection handling with automatic reconnection
200
+ * New option to configure color temperature on lights and groups ([28277f4](https://github.com/Foddy/node-red-contrib-huemagic/commit/28277f49eeb58d59377a609eb75573d7816c11fd))
201
+ * Dependency updates
202
+
203
+ ### v1.1.9
204
+ * Improved alert function with configurable amount of seconds
205
+ * Several fixes and optimizations
206
+
207
+ ### v1.1.8
208
+ * New "universal mode" for Hue Light and Hue Group nodes
209
+
210
+ ### v1.1.7
211
+ * Replacing "superagent" dependency with "request" due to security vulnerabilities
212
+ * Several small fixes and optimizations for hue bridge node
213
+
214
+ ### v1.1.3
215
+ * Several fixes for the Hue Light and Hue Group nodes
216
+
217
+ ### v1.1.2
218
+ * Fixed block-scoped declarations for Node.js below version 6.x
219
+
220
+ ### v1.1.0
221
+ * Support of Hue Scenes (new scene node)!
222
+ * Removed "id, "lightIds" and "battery" parameter in msg.payload of sensors / lights / groups
223
+ * Added msg.info object on all node events with extended device information
224
+
225
+ ### v1.0.3
226
+ * Typo corrections and small improvements
227
+
228
+ ### v1.0.0
229
+ * Initial release