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/README.md CHANGED
@@ -1,801 +1,878 @@
1
- [![Hue Magic Logo](https://gistcdn.githack.com/Foddy/062045775c28f5993ad646aba80e678c/raw/dd9081c45c947d997bf4c03603f12d5c9b963a12/huemagic.svg)](https://flows.nodered.org/node/node-red-contrib-huemagic)
1
+ [![Hue Magic Logo](https://gist.githubusercontent.com/Foddy/9b647b910d03a31cee40f97c3988dd1c/raw/7ee635bd958ad04d7ba53c6c40ec401f879bffc2/huemagic-logo.svg)](https://flows.nodered.org/node/node-red-contrib-huemagic)
2
2
 
3
3
  # HueMagic - Philips Hue nodes for Node-RED
4
4
 
5
- [![Travis](https://img.shields.io/travis/Foddy/node-red-contrib-huemagic.svg?style=flat-square)](https://github.com/foddy/node-red-contrib-huemagic/) [![Dependencies](https://david-dm.org/foddy/node-red-contrib-huemagic.svg?style=flat-square)](https://david-dm.org/foddy/node-red-contrib-huemagic) [![npm](https://img.shields.io/npm/dt/node-red-contrib-huemagic.svg?style=flat-square)](https://www.npmjs.com/package/node-red-contrib-huemagic) [![Donate via PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LUQ7CWBWQ3Q4U) [![npm](https://img.shields.io/npm/v/node-red-contrib-huemagic.svg?style=flat-square)](https://github.com/foddy/node-red-contrib-huemagic/) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg?style=flat-square)](https://raw.githubusercontent.com/Foddy/node-red-contrib-huemagic/master/LICENSE)
5
+ [![npm](https://img.shields.io/npm/v/node-red-contrib-huemagic.svg?style=flat-square)](https://github.com/foddy/node-red-contrib-huemagic/) [![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg?style=flat-square)](https://raw.githubusercontent.com/Foddy/node-red-contrib-huemagic/master/LICENSE) [![Donate via PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LUQ7CWBWQ3Q4U) [![npm](https://img.shields.io/npm/dt/node-red-contrib-huemagic.svg?style=flat-square)](https://www.npmjs.com/package/node-red-contrib-huemagic)
6
6
 
7
- HueMagic provides several input and output nodes for Node-RED and is the most in-depth and easy to use solution to control Philips Hue bridges, lights, groups, scenes, rules, taps, switches, motion sensors, temperature sensors and Lux sensors.
7
+ HueMagic provides several input and output nodes for Node-RED and is the most in-depth and easy to use solution to control Philips Hue bridges, lights, groups, scenes, rules, buttons/switches, motion sensors, temperature sensors and light level sensors.
8
8
 
9
9
  ### Features
10
10
  * Simple and comprehensive control of the Hue Bridge and connected devices
11
11
  * Automatic discovery of Philips Hue bridges as well as devices, scenes & groups…
12
- * Supports the output and input of multiple color code definitions *(HEX, RGB & human readable color names)*
13
- * Supports the temporary activation and deactivation of rules on the Hue Bridge
12
+ * Output and input of multiple color code definitions *(HEX, RGB & human readable color names)*
13
+ * Automatic color temperature & brightness setting based on the current time
14
14
  * Event-based status messages for all devices connected to the Hue Bridge
15
- * Real-time status messages in the Node-RED UI
16
- * Supports virtual pressing of the button on the Hue Bridge (Link Button)
17
- * Programmatic pairing of new devices without app enforcement (TouchLink)
15
+ * Virtual pressing of the Hue Bridge button (Link Button)
16
+ * Pairing of new devices without app enforcement (TouchLink)
18
17
  * Automatic firmware updates to the Hue Bridge and connected devices
19
- * Supports activating / deactivating of motion sensors
20
- * Easy to use alarm and colorloop effects on light bulbs and whole groups
21
- * A large selection of animations and the options to apply custom animations
18
+ * Activating / deactivating of sensors & rules on the Hue Bridge
19
+ * Extended alarm and colorloop effects on light bulbs and whole groups
20
+ * A large selection of animations and the option to create custom animations
22
21
  * Additive state settings on all nodes with multiple commands
23
- * Can change states even if the corresponding devices are offline
24
- * Localized in English & German
22
+ * Change states even if the corresponding devices are offline or turned off
23
+ * Real-time status messages for each node & in the Node-RED UI (SSE)
24
+ * Uses the latest CLIP/v2 API version of the Philips Hue Bridge
25
+ * Extensively documented in English & German
25
26
 
26
27
  ### Installation
27
- HueMagic was written for **Node.js 12+** and Node-RED v1.0.6+. It supports Philips Hue API version v1.19.0+.
28
- _Please make sure, that you deactivate / remove other Philips Hue related Node-RED nodes before installing HueMagic!_
28
+ HueMagic was written for **Node.js 14+** and **Node-RED v2.1+**. It supports the square-shaped Hue Bridge with the **FW 1948086000+** or higher. You can install HueMagic directly via the [Node-RED Palette Manager](https://nodered.org/docs/user-guide/editor/palette/manager) or manually using [yarn / npm](https://nodered.org/docs/user-guide/runtime/adding-nodes).
29
29
 
30
30
  `npm install node-red-contrib-huemagic`
31
31
 
32
+ _Please make sure that you deactivate other Hue-related nodes in Node-RED and meet the minimum requirements of Node.js and the Philips Hue Bridge firmware!_
33
+
32
34
  ### Available Nodes
33
35
 
34
- - [Hue Bridges](#hue-bridges)
36
+ - [Hue Bridge](#hue-bridge)
35
37
  - [Hue Magic](#hue-magic)
36
- - [Hue Lights](#hue-lights)
37
- - [Hue Groups](#hue-groups)
38
- - [Hue Scenes](#hue-scenes)
39
- - [Hue Taps](#hue-tap)
40
- - [Hue Wireless Dimmer Switches](#hue-switch)
41
- - [Hue Motion Sensors](#hue-motion-sensor)
42
- - [Hue Temperature Sensors](#hue-temperature-sensor)
43
- - [Hue Lux Sensors](#hue-lux-sensor)
44
- - [Hue Rules](#hue-rules)
38
+ - [Hue Light](#hue-light)
39
+ - [Hue Group](#hue-group)
40
+ - [Hue Scenes](#hue-scene)
41
+ - [Hue Buttons](#hue-buttons)
42
+ - [Hue Motion](#hue-motion)
43
+ - [Hue Temperature](#hue-temperature)
44
+ - [Hue Brightness](#hue-brightness)
45
+ - [Hue Rule](#hue-rule)
46
+
47
+ ### Examples
48
+
49
+ HueMagic provides a large selection of full featured sample flows for all nodes. You can find these examples in the "[examples](https://github.com/Foddy/node-red-contrib-huemagic/tree/master/examples)" folder on GitHub or directly in Node-RED. To import a full featured example into your Node-RED interface, click on the Node-RED menu icon, then select "Import" and navigate to "Examples" in the sidebar of the popup. Then select the HueMagic folder and your desired node to import a sample flow.
50
+
51
+ <img alt="Instructions to import examples in Node-RED" src="https://user-images.githubusercontent.com/5302050/148696808-f730ad36-8d0b-4b5b-99b2-1917831f8916.gif" width="100%">
52
+
53
+ ## Hue Bridge
54
+ The "Hue Bridge" node is a universal node that can output all settings of the bridge and status messages from other nodes.
55
+
56
+ ![Hue Bridge Example](https://user-images.githubusercontent.com/5302050/148696503-428cf1d0-8376-49fe-b677-979070fc92b9.png)
57
+
58
+ ### Node-RED Setup Instructions
45
59
 
46
- ## Hue Bridges
47
- The Hue Bridge node keeps the Hue Bridge firmware and connected devices up-to-date and provides more information and setup options for the bridge.
60
+ First select the desired Hue Bridge. You can optionally deactivate all automatic status messages for this node by clicking the setting “Skip global device updates / messages on this node”. The node will then no longer issue device updates.
48
61
 
49
- ![Hue Bridge Example](https://user-images.githubusercontent.com/5302050/62820502-4974e780-bb65-11e9-8f05-4078d77eec5e.png)
62
+ Alternatively, you can also choose whether the initialization messages of all nodes should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message from all resources connected to the bridge after each deployment.
50
63
 
51
64
  ### Get settings / status
52
- Retrieves the current status / settings of the bridge by injecting any input value.
53
-
54
- | Property | Type | Information |
55
- |:--------:|:----:|:---------------------------------------------------:|
56
- | **any** | any | Triggers an output of the current status / settings |
57
-
58
- ### Enable TouchLink scan
59
- Use TouchLink to pair new devices or old devices after a bridge reset. This is commonly known in the community as "Lamp stealer". Pass the **touchLink** property to **msg.payload**.
60
-
61
- | Property | Type | Information |
62
- |:-------------:|:----------------------------:|:----------------------:|
63
- | **touchLink** | boolean (any value accepted) | Pairs lights / devices |
64
-
65
- ### Fetch all devices and resources
66
- Use the Fetch command to retrieve various information from the Hue Bridge when needed. Pass the **fetch** property to **msg.payload**.
67
-
68
- | Property | Type | Information |
69
- |:--------------------:|:------:|:-------------------------------------------------------------------------------------------------------------------------:|
70
- | **users** | string | Returns an array of User objects in msg.users & bridge information in msg.info |
71
- | **lights** | string | Returns an array of Light objects in msg.lights & bridge information in msg.info |
72
- | **groups** | string | Returns an array of Group objects in msg.groups & bridge information in msg.info |
73
- | **sensors** | string | Returns an array of Sensor objects in msg.sensors & bridge information in msg.info |
74
- | **scenes** | string | Returns an array of Scene objects in msg.scenes & bridge information in msg.info |
75
- | **rules** | string | Returns an array of Rule objects in msg.rules & bridge information in msg.info |
76
- | **schedules** | string | Returns an array of Schedule objects in msg.schedules & bridge information in msg.info |
77
- | **resourceLinks** | string | Returns an array of ResourceLink objects in msg.resourceLinks & bridge information in msg.info |
78
- | **timeZones** | string | Returns an array of all available time zones in msg.timeZones & bridge information in msg.info |
79
- | **internetServices** | string | Returns an object of all available internet services information in msg.internetServices & bridge information in msg.info |
80
- | **portal** | string | Returns an object of all available portal information in msg.portal & bridge information in msg.info |
81
-
82
- ### Hue Bridge Settings
83
- Changes the Hue Bridge settings based on the passed in **msg.payload.settings** values of:
84
-
85
- | Property | Type | Information |
86
- |:-----------------:|:-------:|:----------------------------------------------:|
87
- | **name** | string | Name of the bridge |
88
- | **zigbeeChannel** | int | ZigBee channel (for communicating with lights) |
89
- | **ipAddress** | string | IP address |
90
- | **dhcpEnabled** | boolean | Whether or not DHCP is enabled |
91
- | **netmask** | string | Netmask |
92
- | **gateway** | string | Gateway |
93
- | **proxyAddress** | string | Proxy address |
94
- | **proxyPort** | string | Proxy port |
95
- | **timeZone** | string | Time zone |
96
-
97
- ### Hue Bridge Events
98
- The event message that the bridge sends contains the following data in the **msg.payload** object:
99
-
100
- | Property | Type | Information |
101
- |:-------------------------:|:-------------:|:-----------------------------------------------------------------------------------------------------------------------:|
102
- | **id** | string | Unique ID of the Hue Bridge |
103
- | **name** | string | Name of the bridge |
104
- | **factoryNew** | boolean | Whether or not the bridge is factory new |
105
- | **replacesBridgeId** | string / null | Replaces bridge id (for migrating from old bridges) |
106
- | **dataStoreVersion** | string | Data store version |
107
- | **starterKitId** | string | Name of the starterkit created in the factory |
108
- | **softwareVersion** | string | Software version of the bridge |
109
- | **apiVersion** | string | API version of the bridge |
110
- | **zigbeeChannel** | int | ZigBee channel (for communicating with lights) |
111
- | **macAddress** | string | MAC address |
112
- | **ipAddress** | string | IP address |
113
- | **dhcpEnabled** | boolean | Whether or not DHCP is enabled |
114
- | **netmask** | string | Netmask |
115
- | **gateway** | string | Gateway |
116
- | **proxyAddress** | string | Proxy address |
117
- | **proxyPort** | string | Proxy port |
118
- | **utcTime** | string | UTC time of the bridge |
119
- | **timeZone** | string | Time zone |
120
- | **localTime** | string | Local time of the bridge |
121
- | **portalServicesEnabled** | boolean | Whether or not portal services are enabled |
122
- | **portalConnected** | boolean | Whether or not portal is connected |
123
- | **linkButtonEnabled** | boolean | Whether or not link button is enabled |
124
- | **touchlinkEnabled** | boolean | Whether or not TouchLink is enabled |
125
- | **model** | object | The model object of the bridge includes model specific information like the model.id, model.manufacturer and model.name |
126
-
127
- ### Global update events
128
- The bridge also sends events when a certain active resource (lights, groups, sensors, etc.) changes its status.
129
-
130
- | Property | Type | Information |
131
- |:---------------:|:------:|:---------------------------------------------------------------------------------------------:|
132
- | **msg.updated** | object | The whole object of the device (check docs) |
133
- | **msg.type** | string | Can be one of the following: light, group, rule, motion, brightness, temperature, switch, tap |
65
+
66
+ Outputs the current status / settings of the bridge as soon as the following message has been sent to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
67
+
68
+ |Property|Description|
69
+ |--|--|
70
+ | payload (boolean) | Returns the current status of the bridge |
71
+
72
+ ### Trigger TouchLink scan
73
+
74
+ You can couple new or old devices to the bridge using a "TouchLink scan" (e.g. after a reset). To do this, transfer the object `msg.payload` with the following content:
75
+
76
+ |Property|Description|
77
+ |--|--|
78
+ | touchLink (boolean) | Couples old or new devices with the bridge |
79
+
80
+ ### Get all devices and resources
81
+
82
+ With the "fetch" command you can output a list of specific devices that are currently connected to the bridge. To do this, transfer the object `msg.payload` with the following content:
83
+
84
+ |Property|Description|
85
+ |--|--|
86
+ | fetch (string | array [string, ...]) | Can accept `light`, `group`, `button`, `motion`, `temperature`, `light_level` or `rule` as value(s) |
87
+
88
+ ### Change Hue Bridge settings
89
+
90
+ You can use the following command to change specific settings on the bridge. Please note that changing the network settings requires reconfiguring the bridge on HueMagic. Transfer the object `msg.payload.settings` with the following setting options to the node:
91
+
92
+ |Property|Description|
93
+ |--|--|
94
+ | name (string) | Changes the name of the bridge and must contain at least 4 to a maximum of 16 characters |
95
+ | zigbeeChannel (int) | Changes the current ZigBee channel (either `11`, `15`, `20`, `25` or `0`) |
96
+ | ipAddress (string) | Changes the IP address in the network settings |
97
+ | dhcpEnabled (boolean) | `true`, activates DHCP in the network settings, `false`, deactivates the setting |
98
+ | netmask (string) | Changes the network mask in the network settings |
99
+ | gateway (string) | Specifies the gateway in the network settings |
100
+ | proxyAddress (string) | Sets a proxy address in the network settings |
101
+ | proxyPort (string | int) | Specifies the port of the proxy in the network settings |
102
+ | timeZone (string) | Changes the currently set time zone on the bridge |
103
+
104
+ ### Status messages from the node
105
+
106
+ The status reports of the "Hue Bridge" node are dynamic. Although they follow a certain pattern, their output can vary depending on what action has just been carried out on the node.
107
+
108
+ #### Status object under `msg.payload`
109
+
110
+ |Property|Description|
111
+ |--|--|
112
+ | id (string) | Unique ID of the Hue Bridge |
113
+ | name (string) | Currently set name |
114
+ | factoryNew (boolean) | Indicator whether the bridge is brand new |
115
+ | replacesBridgeId (string | boolean) | Outputs the old bridge ID (if a migration was carried out) or outputs `false` |
116
+ | dataStoreVersion (string) | Version of the data store |
117
+ | starterKitId (string | boolean) | Name of the starter kit created in the factory or `false` |
118
+ | softwareVersion (string) | Software version of the bridge |
119
+ | apiVersion (string) | API version of the bridge |
120
+ | zigbeeChannel (int) | Currently used ZigBee channel |
121
+ | macAddress (string) | MAC address of the bridge |
122
+ | ipAddress (string) | IP address of the bridge |
123
+ | dhcpEnabled (boolean) | Indicates whether DHCP is enabled |
124
+ | netmask (string) | Netmask of the bridge |
125
+ | gateway (string) | Gateway of the bridge |
126
+ | proxyAddress (string | false) | Currently used proxy address or `false` |
127
+ | proxyPort (string) | Currently used proxy port |
128
+ | utcTime (string) | UTC time on the bridge |
129
+ | timeZone (string) | Currently set time zone on the bridge |
130
+ | localTime (string) | Local time zone |
131
+ | portalServicesEnabled (boolean) | Indicates whether portal services are enabled |
132
+ | portalConnected (boolean) | Indicates whether the bridge is connected to the portal |
133
+ | linkButtonEnabled (boolean) | Indicates whether the link button is enabled |
134
+ | touchlinkEnabled (boolean) | Indicates whether TouchLink is enabled |
135
+ | autoUpdatesEnabled (boolean) | Indicates whether the HueMagic will automatically check for updates |
136
+ | users (array [object, ...]) | List of all users on the bridge (array with objects) |
137
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
138
+ | model (object) | Contains the model information of the bridge under `id`, `manufacturer` and `name` |
139
+
140
+ #### Fetch results under `msg.results` (optional)
141
+
142
+ If the "fetch" command has been used on the node, the bridge outputs the corresponding results under the `msg.results` object. The object contains the queried resource groups, which in turn contain all the corresponding resources in the form of an array.
143
+
144
+ #### Global status messages under `msg.updated` (optional)
145
+
146
+ Unless deactivated, the node issues an updated status message for each resource on the bridge. The status message under * msg.updated * follows the pattern of the respective resource and varies depending on the type of device that was last updated.
147
+
148
+ #### Last command under `msg.command` (optional)
149
+
150
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
134
151
 
135
152
  ## Hue Magic
136
- Use the Hue Magic node to apply animations on Hue Lights or Hue Groups. Connect the Hue Magic node to only one light or a whole group node to save API requests on the Hue Bridge. The animation previews can differ slightly from the real result on a lamp / group.
153
+ The "Hue Magic" node can apply complex and custom animations to lights and groups.
137
154
 
138
- ![Hue Magic Example](https://user-images.githubusercontent.com/5302050/71544026-68d8a980-297a-11ea-912a-789c06bcad79.png)
155
+ ![Hue Magic Example](https://user-images.githubusercontent.com/5302050/148696508-51db24ea-722e-402c-9c49-8d728e036488.png)
139
156
 
140
- ### Start / Stop animation
141
- Starts or stops an animation on the passed in **msg** values of:
157
+ ### Node-RED Setup Instructions
142
158
 
143
- | Property | Type | Information |
144
- |:-----------:|:-------:|:-------------------------------------------------------:|
145
- | **payload** | boolean | True to start the animation, false to stop |
159
+ First give the node a name in order to clearly classify your animation in the Node-RED interface. You then have the choice between the options "Loop" and "Restore". Select the loop option if you want your animation to run endlessly on a light or group until you manually stop it. If you want to restore the previous state of the target resource (light / group) after the animation has ended, check the "Restore" option. Otherwise the last frame of the animation remains on the respective resource.
160
+
161
+ Below you can choose from pre-made animations from HueMagic. Click on your desired animation to set it.
146
162
 
147
163
  ### Included animations
148
- Choose one of the included animations to apply to a Hue Light or Hue Group node. Contributions are welcomed! If you have created your own animation that you would like to share with others, add it at `/huemagic/animations/XXX-youranimationname.json` and create a pull request. Take a look at this directory for structure help.
164
+ Choose one of the included animations to apply to a Hue Light or Hue Group node.
149
165
 
150
166
  ![Some included animations](https://user-images.githubusercontent.com/5302050/71556018-30e16d00-2a33-11ea-8c03-45211767ee98.gif)
151
167
 
152
- ### Custom animations
153
- Alternatively, you can create and use your own animations. To do this, create an **array** and pass it to **msg.payload.steps** with the following parameters.
168
+ ### Start / stop animation
169
+
170
+ To play or stop an animation, pass an object with the following content to the node:
171
+
172
+ |Property|Description|
173
+ |--|--|
174
+ | payload (boolean) | `true`, starts the animation, `false`, stops the animation |
175
+
176
+ ### Own animations
177
+
178
+ If you pass your own animation to the node, the preselected, pre-defined animation (if set) will be temporarily replaced by yours. Own HueMagic animations are a sequence of commands that have been combined in an array. Each array element forms a step - whereby a step can also consist of several frames (transition effects).
179
+
180
+ Create an `array` with the respective animation steps in the form of an object and transfer it to the HueMagic node under `msg.payload.steps`.
181
+
182
+ |Property|Description|
183
+ |--|--|
184
+ | delay (int) | Number of milliseconds to wait until this step is carried out |
185
+ | animation (object) | The object contains the action(s) to be carried out in this step. Identical parameters as for the "Hue Light" & "Hue Group" nodes |
154
186
 
155
- | Property | Type | Information |
156
- |:-------------:|:------:|:------------------------------------------------------------------------------------------------------------:|
157
- | **delay** | int | Execute this frame after the delay (in ms) |
158
- | **animation** | object | Insert all parameters that should be animated here. Supports all values of "Hue Light" and "Hue Group" node. |
187
+ If you have created your own animation that you would like to share with others, add it at `/huemagic/animations/XXX-youranimationname.json` and create a pull request. Take a look at [this directory](https://github.com/Foddy/node-red-contrib-huemagic/tree/master/huemagic/animations) for structure help.
188
+
189
+ ### Example of your own animation
190
+
191
+ This example shows what a simple animation could look like. In the first step, the delay of 500 milliseconds is waited for. The color of the light is then slowly changed to red over a period of one second. As soon as the light has completely changed to red, the second step is carried out, which also has a delay of 500 milliseconds. Finally the color changes to blue.
192
+
193
+ If you have set the animation to play indefinitely, this process is repeated indefinitely until you manually stop the animation or redeploy the node.
194
+
195
+ Pass the following object in `msg.payload` to play the example animation.
196
+
197
+ {
198
+ "animate": true,
199
+ "steps": [
200
+ {
201
+ "delay": 500,
202
+ "animation": {
203
+ "hex": "#FF0000",
204
+ "transitionTime": 1
205
+ }
206
+ },
207
+ {
208
+ "delay": 500,
209
+ "animation": {
210
+ "hex": "#0000FF",
211
+ "transitionTime": 1
212
+ }
213
+ }
214
+ ]
215
+ }
159
216
 
160
217
  ### Special commands
161
- Sometimes it makes sense for animations to be played out in disorder. For example, to imitate fire more realistically. To do this, create an object and pass it to **msg.payload.specials** with the following parameters.
162
-
163
- | Property | Type | Information |
164
- |:---------------:|:-------:|:-----------------------------:|
165
- | **randomOrder** | boolean | Execute steps in random order |
166
-
167
- ## Hue Lights
168
- Use the Hue Light node to control the lights and receive light bulb events.
169
-
170
- ![Hue Light Example](https://user-images.githubusercontent.com/5302050/62820499-48dc5100-bb65-11e9-962f-a1e1a1de21df.png)
171
-
172
- ### Turn on / off (simple mode)
173
- Changes the light on / off state based on the passed in **msg** values of:
174
-
175
- | Property | Type | Information |
176
- |:-----------:|:-------:|:-----------------------------------------------------------------------------------------:|
177
- | **payload** | boolean | Will turn on or turn off the light with its previous configuration (color and brightness) |
178
-
179
- ### Turn On / Off (extended mode)
180
- Changes the light state, effect, color, brightness and other states based on the passed in **msg.payload** values of:
181
-
182
- | Property | Type | Information |
183
- |:-----------------------:|:------------------:|-----------------------------------------------------------------------------------------------------------------------------------|
184
- | **on** | boolean | Will turn on or turn off the light with its previous configuration (color and brightness) |
185
- | **brightness** | int | Optionally configurable brightness of the light in percent (0-100) |
186
- | **brightnessLevel** | int | Optionally configurable brightness of the light (0-254) |
187
- | **incrementBrightness** | int | Increment brightness by given percentage value |
188
- | **decrementBrightness** | int | Decrement brightness by given percentage value |
189
- | **rgb** | array[int,int,int] | Optionally configurable RGB color value of the light bulb. You don't need to pass the RGB value if you already passed a HEX value |
190
- | **hex** | string | Optionally configurable HEX color value of the light bulb. You don't need to pass the HEX value if you already passed a RGB value |
191
- | **color** | string | Optionally configurable human readable color name in english like "red" or "random" for a random color |
192
- | **image** | string | Optionally configurable image path (remote or local) to apply the most dominant color to the light |
193
- | **transitionTime** | float | Optionally configurable temporary value which eases transition of an effect (value in seconds, 0 for instant, 5 for five seconds) |
194
- | **colorloop** | float / boolean | Optionally configurable color loop effect. Float = disables the effect after x seconds / Boolean to turn on / off the effect |
195
- | **colorTemp** | int | Optionally configurable color temperature of the light from 153 to 500 |
196
- | **incrementColorTemp** | int | Increment/decrement color temperature by given value |
197
- | **saturation** | int | Optionally configurable color saturation of the light in percent (from 0 to 100) |
198
- | **status** | any | Returns the current status message of the node without taking any action |
199
-
200
- ### Toggle on / off (auto)
201
- Turns the light on or off depending on the current state based on the passed in **msg.payload** value of:
202
-
203
- | Property | Type | Information |
204
- |:-----------:|:-------:|:-----------------------------------------------------------------------------------------:|
205
- | **toggle** | any | Will turn on or turn off the light with the previous configuration (color and brightness) |
206
-
207
- ### Special Alert Effect
208
- Plays an alert effect based on the passed in **msg.payload** values of:
209
-
210
- | Property | Type | Information |
211
- |:---------:|:------------------:|------------------------------------------------------------------------------------------------------------------------------------------------------|
212
- | **alert** | int *(required)* | Configurable amount of seconds to play the alert effect (max 30) |
213
- | **rgb** | array[int,int,int] | Optionally configurable RGB color value of the alert effect. You don't need to pass the RGB value if you already passed a HEX value |
214
- | **hex** | string | Optionally configurable HEX color value of the alert effect. You don't need to pass the HEX value if you already passed a RGB value |
215
- | **color** | string | Optionally configurable human readable color name in english like "red" or "random" for a random color effect |
216
-
217
-
218
- ### Light Events
219
- The event message that the light bulb sends contains the following data in the **msg.payload** object. Events will only be sent if the light bulb state is changed.
220
-
221
- | Property | Type | Information |
222
- |:-------------------:|:------------------:|:----------------------------------------------------------:|
223
- | **on** | boolean | True for on, false for off |
224
- | **brightness** | int | Current brightness of the light bulb in percent |
225
- | **brightnessLevel** | int | Current brightness of the light bulb (0-254) |
226
- | **rgb** | array[int,int,int] | Current RGB color value of the light bulb (if supported) |
227
- | **hex** | string | Current HEX color value of the light bulb (if supported) |
228
- | **color** | string | Current color name of the light bulb (if supported) |
229
- | **colorTemp** | int | Current color temperature of the light bulb (if supported) |
230
- | **updated** | string | ISO 8601 date string of the last light state update |
231
-
232
- ### Additional Light Bulb Information
233
- The event message that the light bulb sends also contains the following data in the **msg.info** object.
234
-
235
- | Property | Type | Information |
236
- |:-------------------:|:------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
237
- | **id** | int | Numerical id of the light as registered on the bridge |
238
- | **uniqueId** | string | Unique Id of the light (typically hardware id) |
239
- | **name** | string | Name for the light |
240
- | **type** | string | Type of light (e.g. Extended Color Light, Dimmable Light) |
241
- | **softwareVersion** | float | Software version of the light |
242
- | **model** | object | The model object of the light includes model specific information like the model.id, model.manufacturer, model.name, model.type, model.colorGamut and model.friendsOfHue |
243
-
244
- ### Universal Mode (optional)
245
- Defines the light Id on the Hue Bridge manually if not configured in the node properties (deactivates light update events):
246
-
247
- | Property | Type | Information |
248
- |:-------------:|:----:|:--------------------------------------:|
249
- | **msg.topic** | int | Manual definition of the light bulb Id |
250
-
251
- ### Last State Information
252
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
253
-
254
- ## Hue Groups
255
- Use the Hue Group node to control whole groups containing lights and receive group events.
256
-
257
- ![Hue Group Example](https://user-images.githubusercontent.com/5302050/62820500-4974e780-bb65-11e9-9273-b564a8ca077c.png)
258
-
259
- ### Turn on / off (simple mode)
260
- Changes the group on / off state based on the passed in **msg** values of:
261
-
262
- | Property | Type | Information |
263
- |:-----------:|:-------:|:-------------------------------------------------------------------------------------------------------------:|
264
- | **payload** | boolean | Will turn on or turn off all lights inside the group with their previous configuration (color and brightness) |
265
-
266
- ### Turn On / Off (extended mode)
267
- Changes the group state, effect, color, brightness and other states based on the passed in **msg.payload** values of:
268
-
269
- | Property | Type | Information |
270
- |:-----------------------:|:------------------:|------------------------------------------------------------------------------------------------------------------------------------------------|
271
- | **on** | boolean | True to turn on all the lights inside the group, false to turn them off |
272
- | **brightness** | int | Optionally configurable brightness of the lights in percent (0-100) |
273
- | **brightnessLevel** | int | Optionally configurable brightness of the lights (0-254) |
274
- | **incrementBrightness** | int | Increment brightness by given percentage value |
275
- | **decrementBrightness** | int | Decrement brightness by given percentage value |
276
- | **ignoreOffLights** | boolean | If the option is set, turned off lights in the group are ignored when "incrementBrightness / decrementBrightness" is set |
277
- | **rgb** | array[int,int,int] | Optionally configurable RGB color value of all lights inside the group. You don't need to pass the RGB value if you already passed a HEX value |
278
- | **hex** | string | Optionally configurable HEX color value of all lights inside the group. You don't need to pass the HEX value if you already passed a RGB value |
279
- | **color** | string | Optionally configurable human readable color name in english like "red" or "random" for a random color |
280
- | **image** | string | Optionally configurable image path (remote or local) to apply the most dominant color to the group |
281
- | **transitionTime** | float | Optionally configurable temporary value which eases transition of an effect (value in seconds, 0 for instant, 5 for five seconds) |
282
- | **colorloop** | float / boolean | Optionally configurable color loop effect. Float = disables the effect after x seconds / Boolean to turn on / off the effect |
283
- | **colorTemp** | int | Optionally configurable color temperature of the group lights from 153 to 500 |
284
- | **incrementColorTemp** | int | Increment/decrement color temperature by given value |
285
- | **saturation** | int | Optionally configurable color saturation of the group in percent (from 0 to 100) |
286
- | **status** | any | Returns the current status message of the node without taking any action |
287
-
288
- ### Toggle on / off (auto)
289
- Turns the lights on or off depending on the current state based on the passed in **msg.payload** value of:
290
-
291
- | Property | Type | Information |
292
- |:-----------:|:-------:|:-----------------------------------------------------------------------------------------:|
293
- | **toggle** | any | Will turn on or turn off all lights inside the group with their previous configuration (color and brightness) |
294
-
295
- ### Special Alert Effect
296
- Plays an alert effect based on the passed in **msg.payload** values of:
297
-
298
- | Property | Type | Information |
299
- |:---------:|:------------------:|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
300
- | **alert** | int *(required)* | Configurable amount of seconds to play the alert effect (max 30) |
301
- | **rgb** | array[int,int,int] | Optionally configurable RGB color value of the alert effect. You don't need to pass the RGB value if you already passed a HEX value |
302
- | **hex** | string | Optionally configurable HEX color value of the alert effect. You don't need to pass the HEX value if you already passed a RGB value |
303
- | **color** | string | Optionally configurable human readable color name in english like "red" or "random" for a random color |
304
-
305
- ### Group Events
306
- The event message that the group sends contains the following data in the **msg.payload** object. Events will only be sent if the group state is changed.
307
-
308
- | Property | Type | Information |
309
- |:-------------------:|:------------------:|:-------------------------------------------------------------------:|
310
- | **on** | boolean | True for on, false for off |
311
- | **allOn** | boolean | True if all lights in the group are on, false if not |
312
- | **anyOn** | boolean | True if any lights in the group are on, false if none are on |
313
- | **brightness** | int | Current brightness of all lights in the whole group in percent |
314
- | **brightnessLevel** | int | Current brightness of all lights in the whole group (0-254) |
315
- | **rgb** | array[int,int,int] | Current RGB color value of all lights in the group (if supported) |
316
- | **hex** | string | Current HEX color value of all lights in the group (if supported) |
317
- | **color** | string | Current color name of all lights in the group (if supported) |
318
- | **colorTemp** | int | Current color temperature of all lights in the group (if supported) |
319
- | **updated** | string | ISO 8601 date string of the last group state update |
320
-
321
- ### Additional Group Information
322
- The event message that the group sends also contains the following data in the **msg.info** object.
323
-
324
- | Property | Type | Information |
325
- |:------------:|:------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
326
- | **id** | int | Group Id, generated automatically by the bridge |
327
- | **lightIds** | array | An array of light ids associated with the group |
328
- | **name** | string | Name for the group |
329
- | **type** | string | Type of group (e.g. LightGroup, Luminaire, LightSource, Room) |
330
- | **model** | object | [Huejay](https://github.com/sqmk/huejay) *(the API behind HueMagic)* maintains a list of Philips Hue supported luminaire models. The Group model attribute returns optionally a GroupModel object. This object contains more information about the model like the model.id, model.manufacturer, model.name, model.type, model.colorGamut and model.friendsOfHue |
331
-
332
- ### Universal Mode (optional)
333
- Defines the group Id on the Hue Bridge manually if not configured in the node properties (deactivates group update events):
334
-
335
- | Property | Type | Information |
336
- |:-------------:|:----:|:---------------------------------:|
337
- | **msg.topic** | int | Manual definition of the group Id |
338
-
339
- ### Last State Information
340
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
341
-
342
- ## Hue Scenes
343
- Use the Hue Scene node to recall / activate preconfigured scenes on the bridge and receive scene information.
344
-
345
- ![Hue Scene Example](https://user-images.githubusercontent.com/5302050/62797032-f6565280-bada-11e9-8364-b8dec7f44428.png)
346
-
347
- ### Recall / Activate Scene
348
- **Any** passed in value on the scene node activates the preconfigured scene. Please note that recalling animated scenes may not work properly due to some restrictions.
349
-
350
- ### Apply scenes dynamically
351
- When no scene is configured a scene name or scene Id must be passed in to activate that scene. It is also possible to pass a group Id dynamically to recall a scene on a specific group only. The following parameters can be passed manually in **msg.payload**.
352
-
353
- | Property | Type | Information |
354
- |:---------:|:------:|:--------------------------------------------------:|
355
- | **scene** | string | Will activate the scene given by its name or id. |
356
- | **group** | int | Will recall a scene on a specific group by its id. |
357
-
358
- ### Scene Events
359
- The event message that the scene node sends contains the following data in the **msg.payload** object. Events will only be sent if a scene receives any command.
360
-
361
- | Property | Type | Information |
362
- |:---------------:|:-----------:|:----------------------------------------------------------------:|
363
- | **id** | string | The unique scene id |
364
- | **name** | string | The scene name |
365
- | **lightIds** | array[int…] | Array of associated light ids in the scene |
366
- | **owner** | string | User who created the scene |
367
- | **appData** | object | Object consisting of appData.version and appData.data properties |
368
- | **lastUpdated** | string | ISO 8601 date string when scene was last updated |
369
- | **version** | float | Version number of the scene |
370
-
371
- ## Hue Tap
372
- Use the Hue Tap node to receive button events.
373
-
374
- ![Hue Scene Example](https://user-images.githubusercontent.com/5302050/62820493-48dc5100-bb65-11e9-8932-e9f152b3c048.png)
375
-
376
- ### Button Events
377
- The event message that the Hue Tap device sends contains the following data in the **msg.payload** object. Events will only sent on deploy (once) and if a button is pressed.
378
-
379
- | Property | Type | Information |
380
- |:-------------:|:------:|:------------------------------------------------------------:|
381
- | **button** | int | Pressed button number from 1-4 |
382
- | **buttonAlt** | int | Alternative pressed button number (unparsed from the bridge) |
383
- | **updated** | string | ISO 8601 date string of the last button event |
384
-
385
- ### Additional Hue Tap Information
386
- The event message that the Hue Tap device sends also contains the following data in the **msg.info** object.
387
-
388
- | Property | Type | Information |
389
- |:------------:|:------:|:-----------------------------------------------------------------------------------------------------------------------------------:|
390
- | **id** | int | Numerical id of the sensor as registered on the bridge |
391
- | **uniqueId** | string | Unique Id of the sensor (typically hardware id) |
392
- | **name** | string | Name for the sensor |
393
- | **type** | string | Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch) |
394
- | **model** | object | The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type |
395
-
396
- ### Last State Information
397
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
398
-
399
- ## Hue Switch
400
- Use the Hue Switch node to receive button events.
401
-
402
- ![Hue Scene Example](https://user-images.githubusercontent.com/5302050/62820494-48dc5100-bb65-11e9-82eb-0c8bc9e5be40.png)
403
-
404
- ### Button Events
405
- The event message that the Hue Wireless Dimmer Switch sends contains the following data in the **msg.payload** object. Events will only sent on deploy (once) and if a button is pressed.
406
-
407
- | Property | Type | Information |
408
- |:-----------:|:------:|:-------------------------------------------------------------------------------------------------------------------------------------:|
409
- | **button** | int | Pressed button id ([more information under 1.2 ZLL Switch](https://developers.meethue.com/documentation/supported-sensors#zgpSwitch)) |
410
- | **name** | string | Human readable pressed button name *(On, Dim Up, Dim Down, Off)* |
411
- | **action** | string | Human readable pressed button action *(pressed, holded, short released, long released)* |
412
- | **updated** | string | ISO 8601 date string of the last button event |
413
-
414
- ### Additional Hue Switch Information
415
- The event message that the Hue Wireless Dimmer Switch device sends also contains the following data in the **msg.info** object.
416
-
417
- | Property | Type | Information |
418
- |:------------:|:------:|:-----------------------------------------------------------------------------------------------------------------------------------:|
419
- | **id** | int | Numerical id of the sensor as registered on the bridge |
420
- | **uniqueId** | string | Unique Id of the sensor (typically hardware id) |
421
- | **name** | string | Name for the sensor |
422
- | **type** | string | Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch) |
423
- | **battery** | int | Current battery level of the Hue Switch in percent |
424
- | **model** | object | The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type |
425
-
426
- ### Last State Information
427
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
428
-
429
- ## Hue Motion Sensor
430
- Use the Hue Motion node to control the motion sensor and receive motion events.
431
-
432
- ![Hue Motion Example](https://user-images.githubusercontent.com/5302050/62820498-48dc5100-bb65-11e9-8887-3e63317856aa.png)
433
-
434
- ### Activate / Deactivate Sensor
435
- Activates or deactivates the motion sensor based on the passed in **msg** values of:
436
-
437
- | Property | Type | Information |
438
- |:-----------:|:-------:|:------------------------------------------------------------------------:|
439
- | **payload** | boolean | True to activate the motion sensor, false to deactivate |
440
- | **status** | any | Returns the current status message of the node without taking any action |
441
-
442
- ### Motion Events
443
- The event message that the motion sensor sends contains the following data in the **msg.payload** object. Events will only be sent if a motion is detected, if a motion stops or if the motion sensor receives the *Activate / Deactivate* command.
444
-
445
- | Property | Type | Information |
446
- |:-----------:|:-------:|:------------------------------------------------:|
447
- | **active** | boolean | Current sensor state |
448
- | **motion** | boolean | Indicates if a motion is detected or not |
449
- | **updated** | string | ISO 8601 date string of the last detected motion |
450
-
451
- ### Additional Motion Sensor Information
452
- The event message that the motion sensor sends also contains the following data in the **msg.info** object.
453
-
454
- | Property | Type | Information |
455
- |:-------------------:|:------:|:-----------------------------------------------------------------------------------------------------------------------------------:|
456
- | **id** | int | Numerical id of the sensor as registered on the bridge |
457
- | **uniqueId** | string | Unique Id of the sensor (typically hardware id) |
458
- | **name** | string | Name for the sensor |
459
- | **type** | string | Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch) |
460
- | **softwareVersion** | float | Software version of the sensor |
461
- | **battery** | int | Current battery level of the temperature sensor in percent |
462
- | **model** | object | The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type |
463
-
464
- ### Last State Information
465
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
466
-
467
- ## Hue Temperature Sensor
468
- Use the Hue Temperature node to receive current (room) temperature in Celsius and Fahrenheit.
469
-
470
- ![Hue Temperature Example](https://user-images.githubusercontent.com/5302050/62820492-4843ba80-bb65-11e9-8a73-0e0764888595.png)
471
-
472
- ### Temperature Events
473
- The event message that the temperature sensor sends contains the following data in the **msg.payload** object. Events will only sent on deploy (once) and if the temperature changes.
474
-
475
- | Property | Type | Information |
476
- |:---------------:|:------:|:---------------------------------------------------:|
477
- | **celsius** | float | Temperature in Celsius |
478
- | **fahrenheit** | float | Temperature in Fahrenheit |
479
- | **deviceValue** | int | Temperature value of the sensor (original value) |
480
- | **updated** | string | ISO 8601 date string of the last temperature change |
481
-
482
- ### Additional Temperature Sensor Information
483
- The event message that the temperature sensor sends also contains the following data in the **msg.info** object.
484
-
485
- | Property | Type | Information |
486
- |:-------------------:|:------:|:-----------------------------------------------------------------------------------------------------------------------------------:|
487
- | **id** | int | Numerical id of the sensor as registered on the bridge |
488
- | **uniqueId** | string | Unique Id of the sensor (typically hardware id) |
489
- | **name** | string | Name for the sensor |
490
- | **type** | string | Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch) |
491
- | **softwareVersion** | float | Software version of the sensor |
492
- | **battery** | int | Current battery level of the temperature sensor in percent |
493
- | **model** | object | The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type |
494
-
495
- ### Last State Information
496
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
497
-
498
- ## Hue Lux Sensor
499
- Use the Hue Brightness node to receive the current light level in Lux and daylight / darkness.
500
-
501
- ![Hue Lux Example](https://user-images.githubusercontent.com/5302050/62820501-4974e780-bb65-11e9-8b6b-5b9287efc74b.png)
502
-
503
- ### Light Level Events
504
- The event message that the light sensor sends contains the following data in the **msg.payload** object. Events will only be sent on deploy (once) and if the light level changes.
505
-
506
- | Property | Type | Information |
507
- |:--------------:|:-------:|:---------------------------------------------------:|
508
- | **lux** | int | Real lux value |
509
- | **lightlevel** | int | Light level |
510
- | **dark** | boolean | True if it's dark |
511
- | **daylight** | boolean | True if daylight recognized |
512
- | **updated** | string | ISO 8601 date string of the last light level update |
513
-
514
- ### Additional Lux Sensor Information
515
- The event message that the lux sensor sends also contains the following data in the **msg.info** object.
516
-
517
- | Property | Type | Information |
518
- |:-------------------:|:------:|:-----------------------------------------------------------------------------------------------------------------------------------:|
519
- | **id** | int | Numerical id of the sensor as registered on the bridge |
520
- | **uniqueId** | string | Unique Id of the sensor (typically hardware id) |
521
- | **name** | string | Name for the sensor |
522
- | **type** | string | Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch) |
523
- | **softwareVersion** | float | Software version of the sensor |
524
- | **battery** | int | Current battery level of the temperature sensor in percent |
525
- | **model** | object | The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type |
526
-
527
- ### Last State Information
528
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
529
-
530
- ## Hue Rules
531
- Hue rule node to receive rule events or to enable / disable rules.
532
-
533
- ![Hue Rules Example](https://user-images.githubusercontent.com/5302050/62820496-48dc5100-bb65-11e9-932d-6b0a46647e6a.png)
534
-
535
- ### Enable / Disable Rule
536
- Activates or deactivates the rule based on the passed in **msg** values of:
537
-
538
- | Property | Type | Information |
539
- |:-----------:|:-------:|:-------------------------------------------------------:|
540
- | **payload** | boolean | True to enable the rule, false to disable |
541
-
542
- ### Trigger events
543
- The event message that the rule node sends contains the following data in the **msg.payload** object.
544
-
545
- | Property | Type | Information |
546
- |:-------------:|:------:|:--------------------------------------------------------:|
547
- | **triggered** | string | ISO 8601 date string of the last time rule was triggered |
548
-
549
- ### Additional Rule Info
550
- Additional information about the rule is going to be sent to the **msg.info** object.
551
-
552
- | Property | Type | Information |
553
- |:------------------:|:------:|:-----------------------------------------------------:|
554
- | **id** | int | Numerical id of the rule as registered on the bridge |
555
- | **created** | string | ISO 8601 date string of the creation date of the rule |
556
- | **name** | string | Name of the rule |
557
- | **timesTriggered** | int | Number of times rule was triggered |
558
- | **owner** | string | User who created the rule |
559
- | **status** | string | enabled or disabled, rule is triggerable on enabled |
560
-
561
- ### Rule Conditions
562
- An array of objects representing the rule conditions is going to be sent to the **msg.conditions** array.
563
218
 
564
- | Property | Type | Information |
565
- |:------------:|:------:|:----------------------------------------------------:|
566
- | **address** | string | The sensor resource/state location for the condition |
567
- | **operator** | string | The operator for the condition |
568
- | **value** | string | The value used in conjunction with operator |
569
-
570
- ### Rule Actions
571
- An array of objects representing the rule actions is going to be sent to **msg.actions** array.
572
-
573
- | Property | Type | Information |
574
- |:-----------:|:------:|:---------------------------------------------:|
575
- | **address** | string | The actionable resource location |
576
- | **method** | string | Type of method for the action (e.g. GET, PUT) |
577
- | **body** | object | The body of the action |
578
-
579
- ### Last State Information
580
- This node also sends the entire last state data (before the update) in the **msg.lastState** object. It can either contain false (boolean) or the objects payload (msg.lastState.payload) and info (msg.lastState.info). The return value "false" is only sent if there was no last state, e.g. when the node was newly created or restarted.
219
+ Sometimes it makes sense to play an animation in a disorderly manner - e.g. if fire should be imitated more realistically. To play the individual steps randomly, you can pass the following command to `msg.payload.specials`:
581
220
 
582
- # Changelog
221
+ |Property|Description|
222
+ |--|--|
223
+ | randomOrder (boolean | any) | `true`, activates the random playback of the individual animation steps |
583
224
 
584
- ### v2.8.2 (latest)
585
- * Fixed an issue with Hue Light & Hue Group nodes on extended mode ([#179](https://github.com/Foddy/node-red-contrib-huemagic/issues/179))
586
- * Dependency updates
225
+ ### Tips and hints
587
226
 
588
- ### v2.8.1
589
- * Improved the speed of "future states" in Hue Group & Hue Light nodes
227
+ This node does not output any status messages. Please connect the output of the node with a group instead of individual lights if you want to animate several lights at the same time with the same animation. The previews of the pre-made animations are simulations and may differ slightly (timing, colors) from the actual animation on a resource.
590
228
 
591
- ### v2.8.0
592
- * 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))
593
- * 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))
229
+ ## Hue Light
230
+ The "Hue Light" node can control lights connected to the bridge and receive their status messages.
594
231
 
595
- ### v2.7.2
596
- * Fixed an issue with Hue Group nodes ([#178](https://github.com/Foddy/node-red-contrib-huemagic/issues/178))
232
+ ![Hue Light Example](https://user-images.githubusercontent.com/5302050/148696507-bea62f97-e9ec-496a-b7a2-8bf1942a3192.png)
597
233
 
598
- ### v2.7.1
599
- * Fixed a problem with "0" as topic in Hue Group nodes ([#166](https://github.com/Foddy/node-red-contrib-huemagic/issues/166))
600
- * Fixed an issue with the active property on Hue Motion nodes ([#172](https://github.com/Foddy/node-red-contrib-huemagic/issues/172))
601
- * 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))
602
- * Dependency & readme updates
234
+ ### Node-RED Setup Instructions
603
235
 
604
- ### v2.7.0
605
- * Fixed an error on Hue Scene nodes ([#164](https://github.com/Foddy/node-red-contrib-huemagic/issues/164))
606
- * New "lastState" property on every node (except Hue Magic & Hue Scene) with the last state before the update
236
+ Select the pre-configured Hue Bridge and hit the search button to find all the available lights. If you already know the ID of a light, you can also enter it here manually. You can either assign a new name for the light internally or choose the predefined name. Optionally, you can also deactivate all automatic status messages for this node by clicking the setting "Skip events from node". The node will then no longer issue device updates. Alternatively, you can also choose whether the node's initialization message should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message for the currently selected light after each deployment.
607
237
 
608
- ### v2.6.5
609
- * Fixed an error on Hue Group & Hue Light nodes ([#161](https://github.com/Foddy/node-red-contrib-huemagic/issues/161))
610
- * 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))
611
- * 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))
612
- * Dependency updates
238
+ If you activate the setting "Activate color naming", the node will try to describe the currently set light color for each status message. You will then receive an additional parameter with the English description of the currently set color in the output.
613
239
 
614
- ### v2.6.2
615
- * New original temperature parameter on Hue Temperature nodes
616
- * 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))
617
- * Fixed an issue on the Hue Motion node ([#145](https://github.com/Foddy/node-red-contrib-huemagic/issues/145))
618
- * Dependency updates
240
+ If you do not select a light and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type. You can also apply settings in universal mode to a specific light by transferring the corresponding light ID as a string in `msg.topic` together with your settings.
619
241
 
620
- ### v2.6.1
621
- * 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))
622
- * Fixed an issue on the Hue Scene node ([#139](https://github.com/Foddy/node-red-contrib-huemagic/issues/139))
623
- * Fixed an issue on the Hue Switch node ([#138](https://github.com/Foddy/node-red-contrib-huemagic/issues/138))
624
- * Removed brightness layer on Hue Magic animation previews due to performance issues
625
-
626
- ### v2.6.0
627
- * Hue Bridge node can now fetch "Portal" and "Internet Services" information
628
- * Global device updates are now also pushed to the Hue Bridge node (check docs under "Global update events")
629
- * Removed software update logs on the Bridge (#93)
630
- * Message structures from each node are now outsourced
631
-
632
- ### v2.5.5
633
- * Full German help docs translation of every node
634
- * Delay between bridge requests has been reduced to 500ms from 700ms
635
- * New "Strobo", "Random Rainbow" & "SOS" animations for the Hue Magic node
636
- * Hue Magic previews now also display brightness animations
637
- * Dependency updates
242
+ ### Get status
638
243
 
639
- ### v2.5.4
640
- * New option "brightnessLevel" for Hue Light & Hue Group nodes (#134)
641
- * Fixed an error on Hue Group & Hue Light nodes (#135)
642
- * Fixed an error on Hue Magic node and Hue Magic examples (#136)
643
-
644
- ### v2.5.2
645
- * Fixed an error with the brightness and transitionTime params on Hue Light & Hue Group nodes (#131)
646
- * New option "ignoreOffLights" for Hue Group nodes to ignore state changes on turned off lights (#128)
647
-
648
- ### v2.5.1
649
- * HueMagic nodes are now available in German
650
- * All HueMagic nodes are now compatible with the new Node-RED "complete" & "catch" nodes (Node-RED v1.0+)
651
- * Hue Bridge fetch actions now also send out an "info" object with further bridge information
652
- * New Hue Bridge sample flow can be imported directly from Node-RED
653
- * Fixed an issue with light & group nodes (#122)
654
- * Code optimizations and clean up
655
-
656
- ### v2.2.6
657
- * Hue scenes can now be applied on specific groups
658
- * Hue Group nodes now support the option to select all groups / lights
659
- * Optimized Hue Magic node to load dependencies locally
660
-
661
- ### v2.2.3
662
- * API requests are called again via the absolute path
663
-
664
- ### v2.2.2
665
- * New "Hue Magic" node with 12 animations included (check docs and examples)
666
- * Sample flows for each node are now available and can be imported directly from Node-RED
667
- * Fixed an issue which prevented output events on the nodes (#116)
668
-
669
- ### v2.1.1
670
- * Fixed an issue with the new option "skip events" on each node
671
-
672
- ### v2.1.0
673
- * Node updates can now be deactivated individually or globally (check node settings or Hue Bridge configuration)
674
- * The "pressButton" option has been removed due to API restrictions on newer Hue Bridge firmwares (1.31+)
675
-
676
- ### v2.0.5
677
- * A delay has been added to minimize API limit problems to the Hue Bridge
678
- * The color parameter now supports random colors via "any" or "random" as input (Hue Light & Group nodes)
679
-
680
- ### v2.0.4
681
- * Support of the Hue Smart plug (BETA)
682
- * Support of alternative dimmer switches (check node docs, new property available)
683
- * Fixed a problem in recheck loop ([#96](https://github.com/Foddy/node-red-contrib-huemagic/issues/96#issuecomment-530469447))
684
- * Dependency updates
244
+ Outputs the current status of the light as soon as a `msg.payload` object with the following content has been passed to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
685
245
 
686
- ### v2.0.2
687
- * New "Hue Rule" node (check node docs)
688
- * New "fetch" command for the Hue Bridge node to get various information
689
- * New "toggle" and "image" command for Hue Light and Group nodes
690
- * Transitions and colorloop effects now support millisecond values (comma values)
691
- * Optimized sequential requests to the bridge to avoid API limit errors
692
- * Fixed validation errors when group or light nodes are used in universal mode
693
- * Fixed a problem with human readable color names ([e354c0b](https://github.com/Foddy/node-red-contrib-huemagic/pull/84/commits/e354c0b3596d169fb25bd1e830df39adaf04dc73))
694
- * Updated readme
695
- * Dependency updates
246
+ |Property|Description|
247
+ |--|--|
248
+ | status (boolean) | Returns the current status of the light |
696
249
 
697
- ### v1.9.0
698
- * New "Hue Bridge" node (check node docs)
699
- * New event-based algorithm improves the stability of all nodes
700
- * New option to specify your own, alternative Hue Bridge port has been added (check node docs)
701
- * Fixed Hue Bridge API limit errors for bridges with a large number of devices
702
- * Other improvements
703
- * Dependency updates
250
+ ### Turn light on / off (simple)
704
251
 
705
- ### v1.5.6
706
- * 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))
707
- * New real lux property to Hue Brightness event outputs ([thanks @Travelbacon](https://github.com/Foddy/node-red-contrib-huemagic/issues/49))
708
- * Added colorTemp property to Hue Light event outputs ([f8d237d](https://github.com/Foddy/node-red-contrib-huemagic/pull/52/commits/f8d237d6edf6772dbb73d9bd408e81a4ad4bd99a))
709
- * Manipulation of the update interval setting to avoid API errors with many devices
710
- * Fixed some annoying typos
711
- * Dependency updates
252
+ To quickly switch a light on or off in simple mode, pass an object with the following content to the node:
712
253
 
713
- ### v1.5.4
714
- * Dependency updates
254
+ |Property|Description|
255
+ |--|--|
256
+ | payload (boolean) | `true` switches the light on, `false` switches it off |
715
257
 
716
- ### v1.5.3
717
- * Fixed a typo in Hue Temperature node
718
-
719
- ### v1.5.2
720
- * Added option to disable color naming in Hue Light & Hue Group config
721
- * Fixed hex color conversion for Hue Light and Hue Group nodes
722
- * More accurate color handling for light bulbs
723
- * Added reachable attribute to Hue Light node
724
- * Hue Tap can now send the same button action twice
725
- * Fixed Hue Brightness event trigger when lux is 0
726
- * UTC formatted "updated" date for Hue Brightness node
727
- * Better error handling for all nodes
728
- * Dependency updates
258
+ ### Light commands (extended)
729
259
 
730
- ### v1.4.1
731
- * New color name setting in Hue Light and Hue Group nodes (check docs)
732
- * Human readable color names for Hue Lights and Hue Groups
733
- * HueMagic nodes are now all under the new "HueMagic" category in the palette
734
- * Support of Philips Hue API version v1.19.0+ and Node.js 8+
735
- * Dependency updates
260
+ In addition to simply switching it on and off, there are also many other options available for controlling the light. All nodes in HueMagic can be controlled with additive commands. This means that you can first pass one setting and then another setting in a later command without discarding the previous setting. Transfer the following parameters to a `msg.payload` object to make more extensive settings on the light:
736
261
 
737
- ### v1.3.4
738
- * Improved status messages for transition commands
739
- * Dependency updates
262
+ |Property|Description|
263
+ |--|--|
264
+ | on (boolean) | `true` switches the light on, `false` switches it off |
265
+ | toggle (boolean | any) | Toggles between switching on and off, depending on the previous status of the light |
266
+ | brightness (int | string) | Percentage value of the light brightness (0-100) or a string with the value `auto` to automatically set the brightness based on the current time |
267
+ | brightnessLevel (int) | Numerical value of the light brightness (0-254) |
268
+ | incrementBrightness (int | boolean) | Specifies by how many percent the light should be made brighter or `true` to make the light brighter in 10% steps |
269
+ | decrementBrightness (int | boolean) | Specifies the percentage by which the light should be made darker or `true` to make the light darker in 10% steps |
270
+ | color (string) | `random` to set a random color or an English color name (e.g. `red`) |
271
+ | hex (string) | Color value in hexadecimal in the form of a string |
272
+ | rgb (array [0,0,0]) | Color value in RGB format in the form of an array |
273
+ | xyColor (object {x [float], y [float]}) | Color value in the XY color format in the form of an object |
274
+ | gradient (object {hex […]}) | An object with a supported color object (e.g. `hex`,` rgb`, ...) and several colors to set a gradient to supported lights |
275
+ | mixColor (object) | A color to be mixed with the current light color. Can accept `color`, `hex`, `rgb` or `xyColor` objects and optionally `amount` (int) to indicate the mixing ratio in percent |
276
+ | image (string) | Path of an image (local or on the web) to set the current color of the light to the average color of the image |
277
+ | saturation (int) | percentage of the saturation of the current color (beta) |
278
+ | colorTemp (int | string) | Value between 153 and 500 to set the color temperature of the light or the values `cold`, `normal`, `warm`, `hot` and `auto` - where `auto` is the color temperature based on the current time |
279
+ | incrementColorTemp (int | boolean) | Value by how much the color temperature should be warmer or `true` to make the color temperature warmer in steps of 50 |
280
+ | decrementColorTemp (int | boolean) | Value by how much the color temperature should be colder or `true` to make the color temperature colder in steps of 50 |
281
+ | transitionTime (float) | Transition time of the current setting in seconds. If `0` is entered, the light changes to the desired setting immediately. If `3` is entered, the light changes to the desired setting with a slight transition in the next 3 seconds |
282
+ | colorloop (float) | Plays a "colorloop" animation for the selected duration in seconds and then switches back to the original state of the light |
283
+ | alert (float) | Plays an "alert" animation for the selected duration in seconds and then switches back to the original state of the light |
740
284
 
741
- ### v1.3.2
742
- * Fixed incorrect msg.topic handlings
743
- * Small improvements
744
-
745
- ### v1.3.1
746
- * New "saturation" setting in Hue Light and Hue Group nodes
747
- * Improved input algorithm for Hue Lights and Groups nodes
748
- * Added range validation for the "brightness" setting
749
- * Setting the brightness level to "0" percent now turns off the lamp / group
750
- * Fixed an error where nodes are losing their Id
751
- * Fixed an error with the Hue Switch / Hue Tap node
752
- * Typo corrections in README and several node's information
753
-
754
- ### v1.2.3
755
- * Fixed an error on the Hue Switch and Hue Tap nodes
756
- * Fixed an error with the "Universal Mode" on several nodes
757
-
758
- ### v1.2.1
759
- * Support of Hue Taps and Wireless Dimmer Switches *(new nodes available)*
760
- * Improved connection handling with automatic reconnection
761
- * New option to configure color temperature on lights and groups ([28277f4](https://github.com/Foddy/node-red-contrib-huemagic/commit/28277f49eeb58d59377a609eb75573d7816c11fd))
762
- * Dependency updates
285
+ ### Status messages from the node
286
+
287
+ As soon as a change in the light settings has been detected (regardless of whether via Node-RED or externally), the following status message is returned by the node:
288
+
289
+ #### Status object under `msg.payload`
290
+
291
+ |Property|Description|
292
+ |--|--|
293
+ | on (boolean) | State of the light, where `true` stands for on and `false` for off |
294
+ | brightness (int | boolean) | Current brightness in percent or `false`, if the light does not support a brightness setting |
295
+ | brightnessLevel (int | boolean) | Current brightness from 0-254 or `false`, if the light does not support a brightness setting |
296
+ | reachable (boolean | string) | `true` if the light is connected to the bridge, `unknown` if the connection status deviates |
297
+ | connectionStatus (string) | The current connection status with the bridge in the form of a string. Can contain `connected`, `disconnected`, `connectivity_issue` or `unidirectional_incoming` as a value |
298
+ | rgb (array [int, int, int] | optional) | Current light color in the form of an RGB value, if the light can display colors |
299
+ | hex (string | optional) | Current light color in the form of a hexadecimal value if the light can display colors |
300
+ | xyColor (object {x [float], y [float]} | optional) | Current light color in the form of an XY value, if the light can display colors |
301
+ | color (string | optional) | Current light name in English, if the light can display colors and the corresponding setting of the node has been activated |
302
+ | gradient (object | optional) | Current gradient setting with all available color units in the form of an array, if the light supports gradient settings, where `colors` outputs the colors, `numColors` the number of set colors in the gradient and `totalColors` the maximum possible Number of colors the resource can support in the gradient |
303
+ | colorTemp (int | boolean | optional) | Current color temperature of the light, if the light can display color temperatures and a color temperature has been set |
304
+ | colorTempName (string | optional) | Current color temperature of the light in the form of a descriptive string with the values `cold`,`normal`, `warm` or `hot`, if the light can display color temperatures and a color temperature has been set. Otherwise `unknown` is output |
305
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
306
+
307
+ #### Information about the light under `msg.info`
308
+
309
+ |Property|Description|
310
+ |--|--|
311
+ | id (string) | Indicates the new ID of the light |
312
+ | idV1 (string | boolean) | Indicates the old ID of the light |
313
+ | uniqueId (string) | The unique ID of the light |
314
+ | deviceId (string) | The unique ID of the device |
315
+ | name (string) | The currently set name of the light |
316
+ | type (string) | The type of light (always `light`) |
317
+ | softwareVersion (string) | The current firmware of the light |
318
+ | model (object) | Contains the model information of the light under `id`, `manufacturer`, `name`, `type`, `certified`, `friendsOfHue`, `colorGamut` and `colorGamutType` |
319
+
320
+ #### Status changes under `msg.updated`
321
+
322
+ Lists individual parameters in the form of an object that have changed compared to the last state of the light. If no changes have been registered, this object is empty.
323
+
324
+ #### Last status of the light under `msg.lastState`
325
+
326
+ Contains the complete status object (see output values above) of the last status before the last change. If the last state of HueMagic has not yet been registered, it will output `false`.
327
+
328
+ #### Last command under `msg.command` (optional)
329
+
330
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
331
+
332
+ ## Hue Group
333
+ The "Hue Group" node can control several lights behind a group on the bridge at the same time.
334
+
335
+ ![Hue Group Example](https://user-images.githubusercontent.com/5302050/148696506-e5c52750-39e1-43bc-a749-056d7a8718fc.png)
336
+
337
+ ### Node-RED Setup Instructions
338
+
339
+ Select the pre-configured Hue Bridge and hit the search button to find all available groups. If you already know the ID of a group, you can also enter it here manually. You can either assign a new name for the group internally or choose the predefined name. Optionally, you can also deactivate all automatic status messages for this node by clicking the setting "Skip events from node". The node will then no longer issue any updates. Alternatively, you can also choose whether the node's initialization message should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message for the currently selected group after each deployment.
340
+
341
+ If you do not select a group and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type. You can also apply settings in universal mode to a specific group by transferring the corresponding group ID as a string in `msg.topic` together with your settings.
342
+
343
+ ### Get status
344
+
345
+ Outputs the current status of the group as soon as a `msg.payload` object with the following content has been passed to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
346
+
347
+ |Property|Description|
348
+ |--|--|
349
+ | status (boolean) | Returns the current status of the group |
350
+
351
+ ### Turn on / off (simple)
352
+
353
+ To quickly turn an entire group on or off in simple mode, pass an object with the following content to the node. Please note that the command will only be executed if the current status of the group does not match your desired status. This means that all lights have to be switched off before you can switch them on with the `true` command.
354
+
355
+ |Property|Description|
356
+ |--|--|
357
+ | payload (boolean) | `true` switches the whole group on, `false` switches them off |
358
+
359
+ ### Group commands (extended)
360
+
361
+ In addition to simply switching it on and off, there are also many other options available for controlling the group. All nodes in HueMagic can be controlled with additive commands. This means that you can first pass one setting and then another setting in a later command without discarding the previous setting. Transfer the following parameters to an `msg.payload` object to make more extensive settings for the group:
362
+
363
+ |Property|Description|
364
+ |--|--|
365
+ | on (boolean) | `true` switches the entire group on, `false` switches it off (please note the note above) |
366
+ | toggle (boolean | any) | Toggles between switching on and off, depending on the previous status of the group |
367
+ | brightness (int | string) | Percentage value of the light brightness (0-100) or a string with the value `auto` to automatically set the light brightness based on the current time |
368
+ | brightnessLevel (int) | Numerical value of the light brightness (0-254) |
369
+ | color (string) | `random` to set a random color or an English color name (e.g. `red`) |
370
+ | hex (string) | Color value in hexadecimal in the form of a string |
371
+ | rgb (array [0,0,0]) | Color value in RGB format in the form of an array |
372
+ | xyColor (object {x [float], y [float]}) | Color value in the XY color format in the form of an object |
373
+ | image (string) | Path of an image (local or on the web) to set the current color of the group to the average color of the image |
374
+ | colorTemp (int | string) | Value between 153 and 500 to set the color temperature of the group or the values `cold`, `normal`, `warm`, `hot` and `auto` - where `auto` is the color temperature based on the current time |
375
+ | transitionTime (float) | Transition time of the current setting in seconds. If `0` is passed, the group changes to the desired setting immediately. If you pass it to `3`, the group changes to the desired setting with a slight transition in the next 3 seconds |
376
+ | colorloop (float) | Plays a “colorloop” animation for the selected duration in seconds and then changes back to the group's original state |
377
+ | alert (float) | Plays an "alert" animation for the selected duration in seconds and then switches back to the original status of the group |
378
+
379
+ ### Status messages from the node
380
+
381
+ If a change in the group is detected, the following status message is returned from the node. Please note that the group only outputs status messages when either the last light is switched off or when the first light is switched on (if all were switched off beforehand).
382
+
383
+ In contrast to the "Hue Light" node, you have much less status information available here, as a group can contain many different device types with different values that cannot be combined.
384
+
385
+ #### Status object under `msg.payload`
386
+
387
+ |Property|Description|
388
+ |--|--|
389
+ | on (boolean) | State of the group, where `true` stands for on and `false` for off |
390
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
391
+
392
+ #### Information about the group under `msg.info`
393
+
394
+ |Property|Description|
395
+ |--|--|
396
+ | id (string) | Indicates the new ID of the group |
397
+ | idV1 (string | boolean) | Indicates the old ID of the group |
398
+ | name (string) | The currently set name of the group |
399
+ | type (string) | The type of the group (always `group`) |
400
+
401
+ #### Status changes under `msg.updated`
402
+
403
+ Lists individual parameters in the form of an object that have changed compared to the last state of the group. If no changes have been registered, this object is empty.
404
+
405
+ #### Last status of the light under `msg.lastState`
406
+
407
+ Contains the complete status object (see output values above) of the last status before the last change. If the last state of HueMagic has not yet been registered, it will output `false`.
408
+
409
+ #### Last command under `msg.command` (optional)
410
+
411
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
412
+
413
+ ## Hue Scene
414
+ The "Hue Scene" node can resume scenes saved in the bridge and apply them to certain groups.
415
+
416
+ ![Hue Scene Example](https://user-images.githubusercontent.com/5302050/148696512-c9cf3800-935f-44b3-a5e6-8c5e70a71357.png)
417
+
418
+ ### Node-RED Setup Instructions
419
+
420
+ Select the pre-configured Hue Bridge and hit the search button to find all the available scenes. If you already know the ID of the scene, you can also enter it here manually. Alternatively, you can also assign an internal name for the scene or choose the predefined name of the scene.
421
+
422
+ ### Activate scene
423
+
424
+ You can activate a predefined scene by transferring an object with the following content:
425
+
426
+ |Property|Description|
427
+ |--|--|
428
+ | payload (boolean) | Activates a preconfigured scene |
429
+
430
+ ### Activate scene in universal mode
431
+
432
+ If you operate this node in the so-called "universal mode" and have not set a scene in the node configuration, you can also transfer your desired scene to the node as a command. To do this, pass a `msg.payload` object with the following content:
433
+
434
+ |Property|Description|
435
+ |--|--|
436
+ | scene (string) | ID of the scene to be activated on the bridge |
437
+
438
+ ### Activate scene on certain groups
439
+
440
+ Connect the output of this node to one or more groups to apply a scene to specific groups. Alternatively, you have the option of doing this "dynamically" by passing an `msg.payload` object with the following content to the node:
441
+
442
+ |Property|Description|
443
+ |--|--|
444
+ | group (string | array [string,…]) | ID of the group or an array with the IDs of several groups in order to limit the scene to these groups |
445
+
446
+ ### More information about the Node
447
+
448
+ This node does not issue any status messages. Please also note that you can only apply scenes to groups if these are already linked to the respective scene on the bridge. Otherwise nothing will be applied.
449
+
450
+ ## Hue Buttons
451
+ The "Hue Buttons" node receives switching events from input devices connected to the bridge.
452
+
453
+ ![Hue Buttons Example](https://user-images.githubusercontent.com/5302050/148696505-026a3eaf-b5a6-4438-ad71-57d62830799f.png)
454
+
455
+ ### Node-RED Setup Instructions
456
+
457
+ Select the pre-configured Hue Bridge and hit the search button to find all the available switches/buttons. If you already know the ID of the switch, you can also enter it here manually. You can either assign a new name for the switch internally or keep the predefined name of the device. Optionally, you can also deactivate all automatic status messages for this node by clicking the setting "Skip events from node". The node will then no longer output any switching events. Alternatively, you can also choose whether the node's initialization message should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message for the currently selected switch after each deployment.
763
458
 
764
- ### v1.1.9
765
- * Improved alert function with configurable amount of seconds
766
- * Several fixes and optimizations
459
+ If you do not select a switch/button and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type.
767
460
 
768
- ### v1.1.8
769
- * New "universal mode" for Hue Light and Hue Group nodes
461
+ ### Get status
770
462
 
771
- ### v1.1.7
772
- * Replacing "superagent" dependency with "request" due to security vulnerabilities
773
- * Several small fixes and optimizations for hue bridge node
463
+ Outputs the current status of the switch/button as soon as a `msg.payload` object with the following content has been passed to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
774
464
 
775
- ### v1.1.3
776
- * Several fixes for the Hue Light and Hue Group nodes
465
+ |Property|Description|
466
+ |--|--|
467
+ | status (boolean) | Returns the current status of the switch/button |
777
468
 
778
- ### v1.1.2
779
- * Fixed block-scoped declarations for Node.js below version 6.x
469
+ ### Status messages from the node
780
470
 
781
- ### v1.1.0
782
- * Support of Hue Scenes (new scene node)!
783
- * Removed "id, "lightIds" and "battery" parameter in msg.payload of sensors / lights / groups
784
- * Added msg.info object on all node events with extended device information
471
+ As soon as a key has been pressed, the following status message is returned by the node:
785
472
 
786
- ### v1.0.3
787
- * Typo corrections and small improvements
473
+ #### Status object under `msg.payload`
788
474
 
789
- ### v1.0.0
790
- * Initial release
475
+ |Property|Description|
476
+ |--|--|
477
+ | reachable (boolean | string) | `true` if the switch/button is connected to the bridge, `unknown` if the connection status deviates |
478
+ | connectionStatus (string) | The current connection status with the bridge in the form of a string. Can contain `connected`, `disconnected`, `connectivity_issue` or `unidirectional_incoming` as a value |
479
+ | button (int | boolean) | Numeric ID of the key that was last pressed or `false` if no key was pressed |
480
+ | action (string | boolean) | `false` if no key was pressed or `initial_press`, `repeat` , `short_release`, `long_release` or `double_short_release` in the form of a string |
481
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
482
+
483
+ #### Information about the switch/button under `msg.info`
484
+
485
+ |Property|Description|
486
+ |--|--|
487
+ | id (string) | Indicates the new ID of the switch/button |
488
+ | idV1 (string | boolean) | Indicates the old ID of the switch/button |
489
+ | uniqueId (string) | The unique ID of the switch/button |
490
+ | deviceId (string) | The unique ID of the device |
491
+ | name (string) | The currently set name of the switch/button |
492
+ | type (string) | The type of the switch/button (always `button`) |
493
+ | softwareVersion (string) | The current firmware of the switch/button |
494
+ | battery (float) | The current battery level of the switch/button |
495
+ | batteryState (string) | The current status of the battery level. Can contain `normal`, `low` or `critical` as a value |
496
+ | model (object) | Contains the model information of the switch/button under `id` , `manufacturer`, `name`, `type` and `certified` |
497
+
498
+ #### Status changes under `msg.updated`
499
+
500
+ Lists individual parameters in the form of an object that have changed compared to the last state of the switch/button. If no changes have been registered, this object is empty.
501
+
502
+ #### Last status of the switch/button under `msg.lastState`
503
+
504
+ Contains the complete status object (see output values above) of the last status before the last registered change. If the last state of HueMagic has not yet been registered, it will output `false`.
505
+
506
+ #### Last command under `msg.command` (optional)
507
+
508
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
509
+
510
+ ## Hue Motion
511
+ The "Hue motion" node can register and report movements from a suitable sensor on the bridge.
512
+
513
+ ![Hue Motion Example](https://user-images.githubusercontent.com/5302050/148696510-c6bfcad3-cd4e-4b6a-a73f-29bef1ac6961.png)
514
+
515
+ ### Node-RED Setup Instructions
516
+
517
+ Select the pre-configured Hue Bridge and click the search button to find all the available sensors. If you already know the ID of the sensor, you can also enter it here manually. You can either assign a new name for the sensor internally or choose the predefined name of the sensor. Optionally, you can also deactivate all automatic status messages for this node by clicking the setting "Skip events from node". The node will then no longer issue device updates. Alternatively, you can also choose whether the node's initialization message should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message for the currently selected sensor after each deployment.
518
+
519
+ If you do not select a sensor and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type. You can also apply settings in universal mode to a specific sensor by transferring the corresponding sensor ID as a string in `msg.topic` together with your settings.
520
+
521
+ ### Get status
522
+
523
+ Outputs the current status of the sensor as soon as a `msg.payload` object with the following content has been transferred to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
524
+
525
+ |Property|Description|
526
+ |--|--|
527
+ | status (boolean) | Returns the current status of the sensor |
528
+
529
+ ### Turn the sensor on / off
530
+
531
+ If necessary, the sensor can be turned on and off remotely. If the sensor has been turned off, it no longer registers any movements and accordingly no longer outputs them. To do this, pass an object with the following content:
532
+
533
+ |Property|Description|
534
+ |--|--|
535
+ | payload (boolean) | `true` turns the sensor on,` false` turns it off |
536
+
537
+ ### Status messages from the node
538
+
539
+ As soon as the sensor has registered a movement, the following status message is returned by the node:
540
+
541
+ #### Status object under `msg.payload`
542
+
543
+ |Property|Description|
544
+ |--|--|
545
+ | active (boolean) | Indicates whether the sensor is switched on or off |
546
+ | reachable (boolean | string) | `true` if the sensor is connected to the bridge, `unknown` if the connection status deviates |
547
+ | connectionStatus (string) | The current connection status with the bridge in the form of a string. Can contain `connected`, `disconnected`, `connectivity_issue` or `unidirectional_incoming` as a value |
548
+ | motion (boolean) | Indicates whether a motion has been registered |
549
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
550
+
551
+ #### Information about the sensor under `msg.info`
552
+
553
+ |Property|Description|
554
+ |--|--|
555
+ | id (string) | Indicates the new ID of the sensor |
556
+ | idV1 (string | boolean) | Indicates the old ID of the sensor |
557
+ | uniqueId (string) | The unique ID of the sensor |
558
+ | deviceId (string) | The unique ID of the device |
559
+ | name (string) | The currently set name of the sensor |
560
+ | type (string) | The type of the sensor (always `motion`) |
561
+ | softwareVersion (string) | The current firmware of the sensor |
562
+ | battery (float) | The current battery level of the sensor |
563
+ | batteryState (string) | The current status of the battery level. Can contain `normal`, `low` or `critical` as a value |
564
+ | model (object) | Contains the model information of the sensor under `id`, `manufacturer`, `name`, `type` and `certified` |
565
+
566
+ #### Status changes under `msg.updated`
567
+
568
+ Lists individual parameters in the form of an object that have changed compared to the last state of the sensor. If no changes have been registered, this object is empty.
569
+
570
+ #### Last status of the sensor under `msg.lastState`
571
+
572
+ Contains the complete status object (see output values above) of the last status before the last registered change. If the last state of HueMagic has not yet been registered, it will output `false`.
573
+
574
+ #### Last command under `msg.command` (optional)
575
+
576
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
577
+
578
+ ## Hue Temperature
579
+ The "Hue Temperature" node can call up and report the current ambient temperature from a suitable sensor on the bridge.
580
+
581
+ ![Hue Temperature Example](https://user-images.githubusercontent.com/5302050/148696513-0a3afec5-e85b-40fb-be77-1fbfdc1fad35.png)
582
+
583
+ ### Node-RED Setup Instructions
584
+
585
+ Select the pre-configured Hue Bridge and click the search button to find all the available sensors. If you already know the ID of the sensor, you can also enter it here manually. You can either assign a new name for the sensor internally or choose the predefined name of the sensor. Optionally, you can also deactivate all automatic status messages for this node by clicking the setting "Skip events from node". The node will then no longer issue device updates. Alternatively, you can also choose whether the node's initialization message should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message for the currently selected sensor after each deployment.
586
+
587
+ If you do not select a sensor and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type. You can also apply settings in universal mode to a specific sensor by transferring the corresponding sensor ID as a string in `msg.topic` together with your settings.
588
+
589
+ ### Get status
590
+
591
+ Outputs the current status of the sensor as soon as a `msg.payload` object with the following content has been transferred to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
592
+
593
+ |Property|Description|
594
+ |--|--|
595
+ | status (boolean) | Returns the current status of the sensor |
596
+
597
+ ### Switch the sensor on / off
598
+
599
+ If necessary, the sensor can be switched on and off remotely. If the sensor has been switched off, it no longer registers any temperature changes and accordingly no longer outputs them. To do this, pass an object with the following content:
600
+
601
+ |Property|Description|
602
+ |--|--|
603
+ | payload (boolean) | `true` switches the sensor on, `false` switches it off |
604
+
605
+ ### Status messages from the node
606
+
607
+ As soon as the sensor has registered a temperature change, the following status message is returned by the node:
608
+
609
+ #### Status object under `msg.payload`
610
+
611
+ |Property|Description|
612
+ |--|--|
613
+ | active (boolean) | Indicates whether the sensor is switched on or off |
614
+ | reachable (boolean | string) | `true` if the sensor is connected to the bridge, `unknown` if the connection status deviates |
615
+ | connectionStatus (string) | The current connection status with the bridge in the form of a string. Can contain `connected`, `disconnected`, `connectivity_issue` or `unidirectional_incoming` as a value |
616
+ | celsius (float) | Indicates the current ambient temperature in °C (degrees Celsius) |
617
+ | fahrenheit (float) | Indicates the current ambient temperature in °F (degrees Fahrenheit) |
618
+ | temperatureIs (string) | Describes the current temperature with the values ´very cold´, ´cold´, ´slightly cold´, ´comfortable´, ´slightly warm´, ´warm´, ´hot´ or ´very hot´ |
619
+ | deviceValue (float) | The original value of the temperature from the sensor |
620
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
621
+
622
+ #### Information about the sensor under `msg.info`
623
+
624
+ |Property|Description|
625
+ |--|--|
626
+ | id (string) | Indicates the new ID of the sensor |
627
+ | idV1 (string | boolean) | Indicates the old ID of the sensor |
628
+ | uniqueId (string) | The unique ID of the sensor |
629
+ | deviceId (string) | The unique ID of the device |
630
+ | name (string) | The currently set name of the sensor |
631
+ | type (string) | The type of the sensor (always `temperature`) |
632
+ | softwareVersion (string) | The current firmware of the sensor |
633
+ | battery (float) | The current battery level of the sensor |
634
+ | batteryState (string) | The current status of the battery level. Can contain `normal`, `low` or `critical` as a value |
635
+ | model (object) | Contains the model information of the sensor under `id`, `manufacturer`, `name`, `type` and `certified` |
636
+
637
+ #### Status changes under `msg.updated`
638
+
639
+ Lists individual parameters in the form of an object that have changed compared to the last state of the sensor. If no changes have been registered, this object is empty.
640
+
641
+ #### Last status of the sensor under `msg.lastState`
642
+
643
+ Contains the complete status object (see output values above) of the last status before the last registered change. If the last state of HueMagic has not yet been registered, it will output `false`.
644
+
645
+ #### Last command under `msg.command` (optional)
646
+
647
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
648
+
649
+ ## Hue Brightness
650
+ The "Hue Brightness" node can read the current light level from a suitable sensor on the bridge.
651
+
652
+ ![Hue Brightness Example](https://user-images.githubusercontent.com/5302050/148696504-7d447ea8-bbe3-41e3-9a69-ac8e97ac8d90.png)
653
+
654
+ ### Node-RED Setup Instructions
655
+
656
+ Select the pre-configured Hue Bridge and click the search button to find all the available sensors. If you already know the ID of the sensor, you can also enter it here manually. You can either assign a new name for the sensor internally or choose the predefined name of the sensor. Optionally, you can also deactivate all automatic status messages for this node by clicking the setting "Skip events from node". The node will then no longer issue device updates. Alternatively, you can also choose whether the node's initialization message should not be suppressed when Node-RED is started. If you activate this setting, you will receive a status message for the currently selected sensor after each deployment.
657
+
658
+ If you do not select a sensor and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type. You can also apply settings in universal mode to a specific sensor by transferring the corresponding sensor ID as a string in `msg.topic` together with your settings.
659
+
660
+ ### Get status
661
+
662
+ Outputs the current status of the sensor as soon as a `msg.payload` object with the following content has been transferred to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
663
+
664
+ |Property|Description|
665
+ |--|--|
666
+ | status (boolean) | Returns the current status of the sensor |
667
+
668
+ ### Turn the sensor on / off
669
+
670
+ If necessary, the sensor can be turned on and off remotely. If the sensor has been turned off, it no longer registers any changes in light level and accordingly no longer outputs them. To do this, pass an object with the following content:
671
+
672
+ |Property|Description|
673
+ |--|--|
674
+ | payload (boolean) | `true` switches the sensor on, `false` switches it off |
675
+
676
+ ### Status messages from the node
677
+
678
+ As soon as the sensor has detected a change in the light level, the following status message is returned:
679
+
680
+ #### Status object under `msg.payload`
681
+
682
+ |Property|Description|
683
+ |--|--|
684
+ | active (boolean) | Indicates whether the sensor is turned on or off |
685
+ | reachable (boolean | string) | `true` if the sensor is connected to the bridge, `unknown` if the connection status deviates |
686
+ | connectionStatus (string) | The current connection status with the bridge in the form of a string. Can contain `connected`,` disconnected`, `connectivity_issue` or `unidirectional_incoming` as a value |
687
+ | lux (int) | Indicates the real LUX value of the light level |
688
+ | lightLevel (int) | Indicates the light intensity of the sensor |
689
+ | dark (boolean) | `true`, if darkness was registered |
690
+ | daylight (boolean) | `true`, if daylight was registered |
691
+ | updated (string) | Time of the last update of the resource by HueMagic (ISO 8601) |
692
+
693
+ #### Information about the sensor under `msg.info`
694
+
695
+ |Property|Description|
696
+ |--|--|
697
+ | id (string) | Indicates the new ID of the sensor |
698
+ | idV1 (string | boolean) | Indicates the old ID of the sensor |
699
+ | uniqueId (string) | The unique ID of the sensor |
700
+ | deviceId (string) | The unique ID of the device |
701
+ | name (string) | The currently set name of the sensor |
702
+ | type (string) | The type of the sensor (always `light_level`) |
703
+ | softwareVersion (string) | The current firmware of the sensor |
704
+ | battery (float) | The current battery level of the sensor |
705
+ | batteryState (string) | The current status of the battery level. Can contain `normal`, `low` or `critical` as a value |
706
+ | model (object) | Contains the model information of the sensor under `id`, `manufacturer`, `name`, `type` and `certified` |
707
+
708
+ #### Status changes under `msg.updated`
709
+
710
+ Lists individual parameters in the form of an object that have changed compared to the last state of the sensor. If no changes have been registered, this object is empty.
711
+
712
+ #### Last status of the sensor under `msg.lastState`
713
+
714
+ Contains the complete status object (see output values above) of the last status before the last registered change. If the last state of HueMagic has not yet been registered, it will output `false`.
715
+
716
+ #### Last command under `msg.command` (optional)
717
+
718
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
719
+
720
+ ## Hue Rule
721
+ The "Hue Rule" node can activate or deactivate rules saved in the bridge and call up their settings.
722
+
723
+ ![Hue Rule Example](https://user-images.githubusercontent.com/5302050/148696511-2bbd6940-2b38-40a0-a68a-ad52631add26.png)
724
+
725
+ ### Node-RED Setup Instructions
726
+
727
+ Select the pre-configured Hue Bridge and hit the search button to find all the available rules. If you already know the ID of the rule, you can also enter it here manually. Alternatively, you can also assign a new name or choose the predefined name of the rule.
728
+
729
+ If you do not select a rule and use the node configuration in this way, the node works in the so-called "universal mode". In this mode, the node receives and outputs all status messages of the same type. You can also apply settings in universal mode to a specific rule by transferring the corresponding rule ID as a string in `msg.topic` together with your settings.
730
+
731
+ ### Get properties / settings
732
+
733
+ Outputs the current properties of the rule as soon as a `msg.payload` object with the following content has been passed to the node. Alternatively, you can also press the button in the Node-RED interface without having to pass a message to the node beforehand.
734
+
735
+ |Property|Description|
736
+ |--|--|
737
+ | status (boolean) | Returns the current status of the rule |
738
+
739
+ ### Activate / deactivate rule
740
+
741
+ The rule can be activated and deactivated if necessary. If the rule has been deactivated, it will no longer run in the bridge until you reactivate it. To do this, pass an object with the following content:
742
+
743
+ |Property|Description|
744
+ |--|--|
745
+ | payload (boolean) | `true` activates the rule, `false` deactivates it |
746
+
747
+ ### Status messages from the node
748
+
749
+ As soon as the status (activated / deactivated) of a rule changes, the following status message is returned by the node:
750
+
751
+ #### Status object under `msg.payload`
752
+
753
+ |Property|Description|
754
+ |--|--|
755
+ | enabled (boolean) | Indicates whether the rule is activated or deactivated |
756
+ | triggered (string) | Time of the last execution (ISO 8601) |
757
+
758
+ #### Information about the rule under `msg.info`
759
+
760
+ |Property|Description|
761
+ |--|--|
762
+ | id (string) | The unique ID of the rule |
763
+ | created (string) | Date of creation of the rule (ISO 8601) |
764
+ | name (string) | Name of the rule on the bridge |
765
+ | timesTriggered (int) | Number of times the rule was executed on the bridge |
766
+ | owner (string) | ID of the owner of this rule |
767
+ | status (string) | Status of the rule in the form of a string |
768
+
769
+ #### Rule conditions under `msg.conditions` (array)
770
+
771
+ |Property|Description|
772
+ |--|--|
773
+ | address (string) | Path to an attribute of a sensor |
774
+ | operator (string) | operator |
775
+ | value (string) | The value to be checked |
776
+
777
+ #### Rule actions under `msg.actions` (array)
778
+
779
+ |Property|Description|
780
+ |--|--|
781
+ | address (string) | The destination address of the resource |
782
+ | method (string) | The query method |
783
+ | body (object) | The action to be taken |
784
+
785
+ #### Status changes under `msg.updated`
786
+
787
+ Lists individual parameters in the form of an object that have changed compared to the last state of the rule. If no changes have been registered, this object is empty.
788
+
789
+ #### Last status of the rule under `msg.lastState`
790
+
791
+ Contains the complete object (see output values above) of the last status before the last registered change of the rule. If the last state of HueMagic has not yet been registered, it will output `false`.
792
+
793
+ #### Last command under `msg.command` (optional)
794
+
795
+ If the status of the node has changed via a certain command, the entire command that was executed is also output. Otherwise this object will not be output by the node.
796
+
797
+ # Changelog
798
+
799
+ ### v4.0.0 (latest)
800
+
801
+ > **Attention!** HueMagic v4 + has been almost completely rewritten under the hood and requires at least the (square-shaped) Philips Hue Bridge firmware 1948086000+ from November 1st, 2021 ([Upgrade instructions](https://www.lighting.philips.com/content/B2C/en_US/microsites/meethue/marketing-catalog/huewireless_ca/support/security-advisory/general/where-and-how-can-i-update-my-hue-system-with-the-latest-software.html)) and Node-RED v1 + ([Upgrade instructions](https://nodered.org/docs/getting-started/local#upgrading-node-red)). If you are upgrading from a previous HueMagic version to the v4, you will have to reconfigure (not completely rebuild) all nodes by clicking them and selecting the appropriate device from the list. This also applies to nodes / functions that are operated in universal mode, as the numeric identifiers of the latest Philips Hue API version have been replaced in UUIDs. The nodes "Hue Switch", "Hue Button" & "Hue Tap" have been replaced in v4 by the universal and uniform node "Hue Buttons", which works with all button / switch devices that are connected to the Hue Bridge (please note here also the new API in the documentation). The request and return objects of the individual nodes are largely compatible with older HueMagic versions - with the exception of the nodes "Hue Bridge", "Hue Buttons", "Hue Scene" & "Hue Group". These need to be adjusted in the v4. Make sure that you meet the minimum technical requirements and have a quiet minute for the migration before upgrading to the v4.
802
+
803
+ * HueMagic speaks now directly with the bridge without any submodules *(huejay dependency removed)*
804
+ * Migrated to the newest CLIP/v2 API version from the Philips Hue bridge
805
+ * Nodes are now updated via push notifications (SSE) from the bridge instead of periodic polling
806
+ * Instant "current status" queries on each node with no loading time
807
+ * "Hue Buttons" node supports all new Philips Hue buttons/switches (e.g. Dimmer Switch v2, Hue Wall Switch…)
808
+ * All nodes provide additional property information in the output (check docs)
809
+ * New universal node "Hue Buttons" replaces the following nodes: "Hue Switch", "Hue Button", "Hue Tap"
810
+ * New "updated" object for all nodes, which only contains the properties that have been updated since the last state
811
+ * New configuration option to suppress first message after node initialization (for all nodes)
812
+ * New gradient color setting for compatible light sources (in "Hue Light node)
813
+ * New inject button for almost all nodes, which triggers the current status of a node
814
+ * New "universal mode" support for "Hue Rule" nodes
815
+ * New SVG-version of each node icon for higher quality rendering in the Node-RED UI
816
+ * New and full featured examples for each node right inside Node-RED
817
+ * New color mix feature in "Hue Light" nodes with the ability to mix the current light color with another
818
+ * New automatic brightness support based on the current time for "Hue Light" & "Hue Group" nodes
819
+ * New "Superhero", "Neon City" & "Christmas" (for next year, sorry) animations in "Hue Magic" node
820
+ * The custom alert effect on "Hue Light" & "Hue Group" nodes can now also be configured in brightness
821
+ * All nodes will now also forward the last command that has been applied ([#249](https://github.com/Foddy/node-red-contrib-huemagic/issues/249))
822
+ * "Hue Temperature" & "Hue Brightness" nodes can now also be activated & deactivated
823
+ * "Hue Light" & "Hue Group" nodes can now also receive XY color settings
824
+ * "Hue Light" & "Hue Group" can now also receive a named color temperature setting
825
+ * "Hue Light" & "Hue Group" nodes can now receive future brightness states in "turned off" mode ([#244](https://github.com/Foddy/node-red-contrib-huemagic/issues/244))
826
+ * Automatic light temperature setting outputs now values from 153 (coldest) to 500 (warmest)
827
+ * Automatic color correction based on the light´s capabilities for more accurate color settings
828
+ * Optimized node editor configuration UI to better match the current Node-RED´s UI
829
+ * The option for "automatic firmware updates" on the bridge moved to the bridge configuration node
830
+ * "Hue Group" node does no longer contain the "msg.info.model" & "msg.info.class" property
831
+ * Fixed timeout connection issues to the bridge
832
+ * Fixed an issue with non stopping custom animations ([#222](https://github.com/Foddy/node-red-contrib-huemagic/issues/222)), ([#224](https://github.com/Foddy/node-red-contrib-huemagic/issues/224)) & ([#226](https://github.com/Foddy/node-red-contrib-huemagic/pull/226)) (thx)
833
+ * Node-RED will no longer crash if there is no active connection to the bridge ([#237](https://github.com/Foddy/node-red-contrib-huemagic/issues/237))
834
+ * Fixed an issue that prevented the light / group from not reporting its own status when queried & node events were deactivated ([#248](https://github.com/Foddy/node-red-contrib-huemagic/issues/248))
835
+ * Fixed an issue with nodes in universal mode ([#245](https://github.com/Foddy/node-red-contrib-huemagic/issues/245))
836
+ * A possible attack target has been fixed ([#217](https://github.com/Foddy/node-red-contrib-huemagic/issues/217))
837
+ * Moved away from "moment.js" to "Day.js" for date/time formatting inside the nodes
838
+ * Updated README and help section on each node
839
+ * Updated dependencies to the latest version
840
+
841
+ ### v3.0.0
842
+ * Hue Motion, Hue Brightness, Hue Tap, Hue Switch & Hue Button nodes can now receive a status request
843
+ * New "Universal Mode" for the Hue Motion, Hue Brightness, Hue Tap, Hue Switch & Hue Button nodes
844
+ * The "colorTemp" property for Hue Light & Hue Group nodes can now also be set to "cold", "normal", "warm" or "auto"
845
+ * New dynamic and automatically calculated color temperature based on the current time ("auto" mode in "colorTemp" property)
846
+ * Nodes in "Universal Mode" are now also able to receive all events from devices of its type (optional)
847
+ * Hue Magic animations are now prerendered to improve performance
848
+ * 3 new Hue Magic animations ("Milkyway", "Beach" & "Forest")
849
+ * New (simple) Hue Button example flow
850
+ * Updated docs for almost all nodes and README
851
+ * Fixed an error with future states and the HTTP request node ([#200](https://github.com/Foddy/node-red-contrib-huemagic/pull/200))
852
+ * Other optimizations, dependency updates and clean up
853
+
854
+ ### v2.8.6
855
+ * Optimized random color mode for Hue Magic, Hue Light & Hue Group nodes ([#190](https://github.com/Foddy/node-red-contrib-huemagic/pull/190))
856
+ * New Hue Button node ([#191](https://github.com/Foddy/node-red-contrib-huemagic/pull/191))
857
+ * Updated README and Hue Button node docs (+ localized in German)
858
+
859
+ ### v2.8.2
860
+ * Fixed an issue with Hue Light & Hue Group nodes on extended mode ([#179](https://github.com/Foddy/node-red-contrib-huemagic/issues/179))
861
+ * Dependency updates
862
+
863
+ ### Previous versions
864
+ A complete overview of the updates can be viewed in the [changelog](https://github.com/Foddy/node-red-contrib-huemagic/blob/master/CHANGELOG.md)…
791
865
 
792
866
 
793
867
  ***
794
- <a href="https://en.wikipedia.org/wiki/Stuttgart" target="_blank"><img src="https://gistcdn.githack.com/Foddy/0e2e2598e98ecdf3c9990dcf809c1752/raw/1807bc9d75aee1484be2f78678e14959497f764a/madewithlove.svg" height="50"></a>
868
+ ### Made with a pinch of magic in Stuttgart, Germany.
869
+
870
+ If you like HueMagic, I appreciate a star or rating on this page! HueMagic is and will remain free. You can support the further development of the project with a small donation.
871
+
872
+ Alternatively, you can support the project if you have an old device that is compatible with the Philips Hue bridge (or a device that is not officially supported by HueMagic) and want to get rid of it. Please contact me at huemagic@foddy.io to get an address where you can send your old device. The following devices could currently be considered: Gradient lights, Tap / Button devices or table / floor lights. These types of devices have not been extensively tested during HueMagic's development.
795
873
 
796
- Do you like HueMagic? If so, make sure to give this project a star! If you want to support the development, you can also do so with a donation. HueMagic remains completely free for everyone - even without a donation. Thank you! :)
797
874
  ***
798
875
  <a href="https://www.jetbrains.com/?from=HueMagic"><img src="https://gistcdn.githack.com/Foddy/062045775c28f5993ad646aba80e678c/raw/c84ea4ad31c72dde0883638fc9eaa2b51bba9962/jb.svg" height="50"></a> <a href="https://www.browserstack.com?from=HueMagic"><img src="https://gistcdn.githack.com/Foddy/062045775c28f5993ad646aba80e678c/raw/c84ea4ad31c72dde0883638fc9eaa2b51bba9962/browserstack.svg" height="50"></a>
799
876
 
800
877
  HueMagic for Node-RED is sponsored by [JetBrains](https://www.jetbrains.com/?from=HueMagic) and [BrowserStack](https://www.browserstack.com?from=HueMagic).<br>
801
- *Released under the [Apache License 2.0](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)).*
878
+ *Released under the [Apache License 2.0](https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)).*