node-red-contrib-huemagic 2.8.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/README.md +806 -729
  3. package/examples/Hue Bridge.json +189 -35
  4. package/examples/Hue Brightness.json +124 -14
  5. package/examples/Hue Buttons.json +88 -0
  6. package/examples/Hue Group.json +575 -63
  7. package/examples/Hue Light.json +805 -58
  8. package/examples/Hue Magic.json +69 -24
  9. package/examples/Hue Motion.json +110 -42
  10. package/examples/Hue Rules.json +105 -37
  11. package/examples/Hue Scene.json +145 -28
  12. package/examples/Hue Temperature.json +124 -14
  13. package/huemagic/animations/001-sunny.json +22 -22
  14. package/huemagic/animations/002-cloudy.json +46 -46
  15. package/huemagic/animations/003-nightsky.json +20 -20
  16. package/huemagic/animations/004-sunrise.json +54 -54
  17. package/huemagic/animations/005-sunset.json +46 -46
  18. package/huemagic/animations/006-fireplace.json +74 -74
  19. package/huemagic/animations/007-spring.json +31 -31
  20. package/huemagic/animations/008-autmn.json +23 -23
  21. package/huemagic/animations/009-winter.json +23 -23
  22. package/huemagic/animations/010-dirtyfog.json +23 -23
  23. package/huemagic/animations/011-lgbt.json +49 -50
  24. package/huemagic/animations/012-rasta.json +28 -29
  25. package/huemagic/animations/013-strobo.json +30 -31
  26. package/huemagic/animations/014-randomrainbow.json +30 -31
  27. package/huemagic/animations/015-sos.json +158 -159
  28. package/huemagic/animations/016-milkyway.json +83 -0
  29. package/huemagic/animations/017-beach.json +40 -0
  30. package/huemagic/animations/018-forest.json +43 -0
  31. package/huemagic/animations/019-christmas.json +30 -0
  32. package/huemagic/animations/020-superhero.json +56 -0
  33. package/huemagic/animations/021-neoncity.json +52 -0
  34. package/huemagic/animations/previews/001-sunny.gif +0 -0
  35. package/huemagic/animations/previews/002-cloudy.gif +0 -0
  36. package/huemagic/animations/previews/003-nightsky.gif +0 -0
  37. package/huemagic/animations/previews/004-sunrise.gif +0 -0
  38. package/huemagic/animations/previews/005-sunset.gif +0 -0
  39. package/huemagic/animations/previews/006-fireplace.gif +0 -0
  40. package/huemagic/animations/previews/007-spring.gif +0 -0
  41. package/huemagic/animations/previews/008-autmn.gif +0 -0
  42. package/huemagic/animations/previews/009-winter.gif +0 -0
  43. package/huemagic/animations/previews/010-dirtyfog.gif +0 -0
  44. package/huemagic/animations/previews/011-lgbt.gif +0 -0
  45. package/huemagic/animations/previews/012-rasta.gif +0 -0
  46. package/huemagic/animations/previews/013-strobo.gif +0 -0
  47. package/huemagic/animations/previews/014-randomrainbow.gif +0 -0
  48. package/huemagic/animations/previews/015-sos.gif +0 -0
  49. package/huemagic/animations/previews/016-milkyway.gif +0 -0
  50. package/huemagic/animations/previews/017-beach.gif +0 -0
  51. package/huemagic/animations/previews/018-forest.gif +0 -0
  52. package/huemagic/animations/previews/019-christmas.gif +0 -0
  53. package/huemagic/animations/previews/020-superhero.gif +0 -0
  54. package/huemagic/animations/previews/021-neoncity.gif +0 -0
  55. package/huemagic/hue-bridge-config.html +105 -61
  56. package/huemagic/hue-bridge-config.js +629 -319
  57. package/huemagic/hue-bridge.html +41 -21
  58. package/huemagic/hue-bridge.js +191 -398
  59. package/huemagic/hue-brightness.html +130 -49
  60. package/huemagic/hue-brightness.js +131 -35
  61. package/huemagic/hue-buttons.html +197 -0
  62. package/huemagic/hue-buttons.js +152 -0
  63. package/huemagic/hue-group.html +137 -60
  64. package/huemagic/hue-group.js +394 -367
  65. package/huemagic/hue-light.html +133 -59
  66. package/huemagic/hue-light.js +551 -336
  67. package/huemagic/hue-magic.html +91 -237
  68. package/huemagic/hue-magic.js +57 -27
  69. package/huemagic/hue-motion.html +128 -50
  70. package/huemagic/hue-motion.js +116 -87
  71. package/huemagic/hue-rules.html +121 -50
  72. package/huemagic/hue-rules.js +84 -64
  73. package/huemagic/hue-scene.html +96 -115
  74. package/huemagic/hue-scene.js +65 -96
  75. package/huemagic/hue-temperature.html +130 -49
  76. package/huemagic/hue-temperature.js +136 -32
  77. package/huemagic/icons/hue-bridge.png +0 -0
  78. package/huemagic/icons/hue-bridge.svg +3 -0
  79. package/huemagic/icons/hue-brightness.png +0 -0
  80. package/huemagic/icons/hue-brightness.svg +11 -0
  81. package/huemagic/icons/hue-buttons.png +0 -0
  82. package/huemagic/icons/hue-buttons.svg +4 -0
  83. package/huemagic/icons/hue-group.png +0 -0
  84. package/huemagic/icons/hue-group.svg +12 -0
  85. package/huemagic/icons/hue-light.png +0 -0
  86. package/huemagic/icons/hue-light.svg +3 -0
  87. package/huemagic/icons/hue-magic.png +0 -0
  88. package/huemagic/icons/hue-magic.svg +3 -0
  89. package/huemagic/icons/hue-motion.png +0 -0
  90. package/huemagic/icons/hue-motion.svg +9 -0
  91. package/huemagic/icons/hue-rules.png +0 -0
  92. package/huemagic/icons/hue-rules.svg +4 -0
  93. package/huemagic/icons/hue-scene.png +0 -0
  94. package/huemagic/icons/hue-scene.svg +5 -0
  95. package/huemagic/icons/hue-temperature.png +0 -0
  96. package/huemagic/icons/hue-temperature.svg +7 -0
  97. package/huemagic/locales/de/hue-bridge-config.html +17 -12
  98. package/huemagic/locales/de/hue-bridge-config.json +7 -5
  99. package/huemagic/locales/de/hue-bridge.html +64 -145
  100. package/huemagic/locales/de/hue-bridge.json +6 -17
  101. package/huemagic/locales/de/hue-brightness.html +52 -38
  102. package/huemagic/locales/de/hue-brightness.json +7 -2
  103. package/huemagic/locales/de/hue-buttons.html +58 -0
  104. package/huemagic/locales/de/hue-buttons.json +28 -0
  105. package/huemagic/locales/de/hue-group.html +46 -122
  106. package/huemagic/locales/de/hue-group.json +4 -2
  107. package/huemagic/locales/de/hue-light.html +68 -116
  108. package/huemagic/locales/de/hue-light.json +5 -2
  109. package/huemagic/locales/de/hue-magic.html +65 -57
  110. package/huemagic/locales/de/hue-magic.json +2 -1
  111. package/huemagic/locales/de/hue-motion.html +48 -44
  112. package/huemagic/locales/de/hue-motion.json +6 -3
  113. package/huemagic/locales/de/hue-rules.html +68 -73
  114. package/huemagic/locales/de/hue-rules.json +5 -2
  115. package/huemagic/locales/de/hue-scene.html +23 -32
  116. package/huemagic/locales/de/hue-scene.json +5 -2
  117. package/huemagic/locales/de/hue-temperature.html +53 -36
  118. package/huemagic/locales/de/hue-temperature.json +7 -2
  119. package/huemagic/locales/en-US/hue-bridge-config.html +17 -12
  120. package/huemagic/locales/en-US/hue-bridge-config.json +5 -3
  121. package/huemagic/locales/en-US/hue-bridge.html +64 -145
  122. package/huemagic/locales/en-US/hue-bridge.json +5 -16
  123. package/huemagic/locales/en-US/hue-brightness.html +52 -38
  124. package/huemagic/locales/en-US/hue-brightness.json +10 -3
  125. package/huemagic/locales/en-US/hue-buttons.html +58 -0
  126. package/huemagic/locales/en-US/hue-buttons.json +34 -0
  127. package/huemagic/locales/en-US/hue-group.html +46 -122
  128. package/huemagic/locales/en-US/hue-group.json +7 -3
  129. package/huemagic/locales/en-US/hue-light.html +68 -116
  130. package/huemagic/locales/en-US/hue-light.json +8 -3
  131. package/huemagic/locales/en-US/hue-magic.html +65 -57
  132. package/huemagic/locales/en-US/hue-magic.json +3 -1
  133. package/huemagic/locales/en-US/hue-motion.html +48 -44
  134. package/huemagic/locales/en-US/hue-motion.json +9 -4
  135. package/huemagic/locales/en-US/hue-rules.html +68 -73
  136. package/huemagic/locales/en-US/hue-rules.json +5 -2
  137. package/huemagic/locales/en-US/hue-scene.html +23 -32
  138. package/huemagic/locales/en-US/hue-scene.json +5 -2
  139. package/huemagic/locales/en-US/hue-temperature.html +53 -36
  140. package/huemagic/locales/en-US/hue-temperature.json +10 -3
  141. package/huemagic/utils/api.js +290 -0
  142. package/huemagic/utils/color.js +382 -0
  143. package/{utils → huemagic/utils}/merge.js +9 -6
  144. package/huemagic/utils/messages.js +447 -0
  145. package/package.json +12 -12
  146. package/examples/Hue Switch.json +0 -40
  147. package/examples/Hue Tap.json +0 -40
  148. package/huemagic/assets/anime.js +0 -8
  149. package/huemagic/hue-switch.html +0 -119
  150. package/huemagic/hue-switch.js +0 -113
  151. package/huemagic/hue-tap.html +0 -119
  152. package/huemagic/hue-tap.js +0 -74
  153. package/huemagic/icons/hue-button.png +0 -0
  154. package/huemagic/icons/hue-switch.png +0 -0
  155. package/huemagic/icons/hue-tap.png +0 -0
  156. package/huemagic/locales/de/hue-switch.html +0 -50
  157. package/huemagic/locales/de/hue-switch.json +0 -31
  158. package/huemagic/locales/de/hue-tap.html +0 -41
  159. package/huemagic/locales/de/hue-tap.json +0 -23
  160. package/huemagic/locales/en-US/hue-switch.html +0 -50
  161. package/huemagic/locales/en-US/hue-switch.json +0 -31
  162. package/huemagic/locales/en-US/hue-tap.html +0 -41
  163. package/huemagic/locales/en-US/hue-tap.json +0 -23
  164. package/utils/messages.js +0 -571
  165. package/utils/rgb.js +0 -188
@@ -1,174 +1,93 @@
1
- <script type="text/x-red" data-help-name="hue-bridge-node">
2
- <p>Hue Bridge node keeps the Hue Bridge firmware and connected devices up-to-date and provides more information and setup options for the bridge.</p>
1
+ <script type="text/markdown" data-help-name="hue-bridge-node">
2
+ The "Hue Bridge" node is a universal node that can output all settings of the bridge and status messages from other nodes.
3
3
 
4
- <h3>Setup</h3>
5
- <p>Select the preconfigured Hue Bridge and choose if the selected bridge should automatically find and install firmware and other device updates. If you activate the "Skip global events" option, this node will not send messages from updated and active devices and other ressources.</p>
4
+ ### Setup
6
5
 
7
- <h3>Get settings / status</h3>
8
- <p>Retrieves the current status / settings of the bridge by injecting any input value</p>
9
- <dl class="message-properties">
10
- <dt>true<span class="property-type">boolean (example)</span></dt>
11
- <dd>Triggers an output of the current status / settings</dd>
12
- </dl>
6
+ 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.
13
7
 
14
- <h3>Enable TouchLink scan</h3>
15
- <p>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 <b>touchLink</b> property to <b>msg.payload</b>.</p>
16
- <dl class="message-properties">
17
- <dt>touchLink<span class="property-type">boolean (example)</span></dt>
18
- <dd>Pairs lights / devices</dd>
19
- </dl>
8
+ 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.
20
9
 
21
- <h3>Fetch all devices and resources</h3>
22
- <p>Use the Fetch command to retrieve various information from the Hue Bridge when needed. Pass the <b>fetch</b> property to <b>msg.payload</b>.</p>
23
- <dl class="message-properties">
24
- <dt>users<span class="property-type">string</span></dt>
25
- <dd>Returns an array of User objects in msg.users & bridge information in msg.info</dd>
10
+ ### Get settings / status
26
11
 
27
- <dt>lights<span class="property-type">string</span></dt>
28
- <dd>Returns an array of Light objects in msg.lights & bridge information in msg.info</dd>
12
+ 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.
29
13
 
30
- <dt>groups<span class="property-type">string</span></dt>
31
- <dd>Returns an array of Group objects in msg.groups & bridge information in msg.info</dd>
14
+ : payload (boolean): Returns the current status of the bridge
32
15
 
33
- <dt>sensors<span class="property-type">string</span></dt>
34
- <dd>Returns an array of Sensor objects in msg.sensors & bridge information in msg.info</dd>
16
+ ### Trigger TouchLink scan
35
17
 
36
- <dt>scenes<span class="property-type">string</span></dt>
37
- <dd>Returns an array of Scene objects in msg.scenes & bridge information in msg.info</dd>
18
+ 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:
38
19
 
39
- <dt>rules<span class="property-type">string</span></dt>
40
- <dd>Returns an array of Rule objects in msg.rules & bridge information in msg.info</dd>
20
+ : touchLink (boolean): Couples old or new devices with the bridge
41
21
 
42
- <dt>schedules<span class="property-type">string</span></dt>
43
- <dd>Returns an array of Schedule objects in msg.schedules & bridge information in msg.info</dd>
22
+ ### Get all devices and resources
44
23
 
45
- <dt>resourceLinks<span class="property-type">string</span></dt>
46
- <dd>Returns an array of ResourceLink objects in msg.resourceLinks & bridge information in msg.info</dd>
24
+ 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:
47
25
 
48
- <dt>timeZones<span class="property-type">string</span></dt>
49
- <dd>Returns an array of all available time zones in msg.timeZones & bridge information in msg.info</dd>
26
+ : fetch (string | array [string, ...]): Can accept `light`, `group`, `button`, `motion`, `temperature`, `light_level` or `rule` as value(s)
50
27
 
51
- <dt>internetServices<span class="property-type">string</span></dt>
52
- <dd>Returns an object of all available internet services information in msg.internetServices & bridge information in msg.info</dd>
28
+ ### Change Hue Bridge settings
53
29
 
54
- <dt>portal<span class="property-type">string</span></dt>
55
- <dd>Returns an object of all available portal information in msg.portal & bridge information in msg.info</dd>
56
- </dl>
30
+ 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:
57
31
 
58
- <h3>Hue Bridge Settings</h3>
59
- <p>Changes the Hue Bridge settings based on the passed in <b>msg.payload.settings</b> values of:</p>
60
- <dl class="message-properties">
61
- <dt>name<span class="property-type">string</span></dt>
62
- <dd>Name of the bridge</dd>
32
+ : name (string): Changes the name of the bridge and must contain at least 4 to a maximum of 16 characters
33
+ : zigbeeChannel (int): Changes the current ZigBee channel (either `11`, `15`, `20`, `25` or `0`)
34
+ : ipAddress (string): Changes the IP address in the network settings
35
+ : dhcpEnabled (boolean): `true`, activates DHCP in the network settings, `false`, deactivates the setting
36
+ : netmask (string): Changes the network mask in the network settings
37
+ : gateway (string): Specifies the gateway in the network settings
38
+ : proxyAddress (string): Sets a proxy address in the network settings
39
+ : proxyPort (string | int): Specifies the port of the proxy in the network settings
40
+ : timeZone (string): Changes the currently set time zone on the bridge
63
41
 
64
- <dt>zigbeeChannel<span class="property-type">int</span></dt>
65
- <dd>ZigBee channel (for communicating with lights)</dd>
42
+ ### Status messages from the node
66
43
 
67
- <dt>ipAddress<span class="property-type">string</span></dt>
68
- <dd>IP address (risky)</dd>
44
+ 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.
69
45
 
70
- <dt>dhcpEnabled<span class="property-type">boolean</span></dt>
71
- <dd>Whether or not DHCP is enabled</dd>
46
+ #### Status object under `msg.payload`
72
47
 
73
- <dt>netmask<span class="property-type">string</span></dt>
74
- <dd>Netmask (risky)</dd>
48
+ : id (string): Unique ID of the Hue Bridge
49
+ : name (string): Currently set name
50
+ : factoryNew (boolean): Indicator whether the bridge is brand new
51
+ : replacesBridgeId (string | boolean): Outputs the old bridge ID (if a migration was carried out) or outputs `false`
52
+ : dataStoreVersion (string): Version of the data store
53
+ : starterKitId (string | boolean): Name of the starter kit created in the factory or `false`
54
+ : softwareVersion (string): Software version of the bridge
55
+ : apiVersion (string): API version of the bridge
56
+ : zigbeeChannel (int): Currently used ZigBee channel
57
+ : macAddress (string): MAC address of the bridge
58
+ : ipAddress (string): IP address of the bridge
59
+ : dhcpEnabled (boolean): Indicates whether DHCP is enabled
60
+ : netmask (string): Netmask of the bridge
61
+ : gateway (string): Gateway of the bridge
62
+ : proxyAddress (string | false): Currently used proxy address or `false`
63
+ : proxyPort (string): Currently used proxy port
64
+ : utcTime (string): UTC time on the bridge
65
+ : timeZone (string): Currently set time zone on the bridge
66
+ : localTime (string): Local time zone
67
+ : portalServicesEnabled (boolean): Indicates whether portal services are enabled
68
+ : portalConnected (boolean): Indicates whether the bridge is connected to the portal
69
+ : linkButtonEnabled (boolean): Indicates whether the link button is enabled
70
+ : touchlinkEnabled (boolean): Indicates whether TouchLink is enabled
71
+ : autoUpdatesEnabled (boolean): Indicates whether the HueMagic will automatically check for updates
72
+ : users (array [object, ...]): List of all users on the bridge (array with objects)
73
+ : updated (string): Time of the last update of the resource by HueMagic (ISO 8601)
74
+ : model (object): Contains the model information of the bridge under `id`, `manufacturer` and `name`
75
75
 
76
- <dt>gateway<span class="property-type">string</span></dt>
77
- <dd>Gateway (risky)</dd>
76
+ #### Fetch results under `msg.results` (optional)
78
77
 
79
- <dt>proxyAddress<span class="property-type">string</span></dt>
80
- <dd>Proxy address</dd>
78
+ 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.
81
79
 
82
- <dt>proxyPort<span class="property-type">string</span></dt>
83
- <dd>Proxy port</dd>
80
+ #### Global status messages under `msg.updated` (optional)
84
81
 
85
- <dt>timeZone<span class="property-type">string</span></dt>
86
- <dd>Time zone</dd>
87
- </dl>
82
+ 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.
88
83
 
89
- <h3>Hue Bridge Events</h3>
90
- <p>The event message that the bridge sends contains the following data in the <b>msg.payload</b> object:</p>
91
- <dl class="message-properties">
92
- <dt>id<span class="property-type">string</span></dt>
93
- <dd>Unique ID of the Hue Bridge</dd>
84
+ #### Last command under `msg.command` (optional)
94
85
 
95
- <dt>name<span class="property-type">string</span></dt>
96
- <dd>Name of the bridge</dd>
86
+ 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.
97
87
 
98
- <dt>factoryNew<span class="property-type">boolean</span></dt>
99
- <dd>Whether or not the bridge is factory new</dd>
88
+ ### Examples from HueMagic
100
89
 
101
- <dt>replacesBridgeId<span class="property-type">string / null</span></dt>
102
- <dd>Replaces bridge id (for migrating from old bridges)</dd>
90
+ HueMagic provides some sample configurations for this node. 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.
103
91
 
104
- <dt>dataStoreVersion<span class="property-type">string</span></dt>
105
- <dd>Data store version</dd>
106
-
107
- <dt>starterKitId<span class="property-type">string</span></dt>
108
- <dd>Name of the starterkit created in the factory</dd>
109
-
110
- <dt>softwareVersion<span class="property-type">string</span></dt>
111
- <dd>Software version of the bridge</dd>
112
-
113
- <dt>apiVersion<span class="property-type">string</span></dt>
114
- <dd>API version of the bridge</dd>
115
-
116
- <dt>zigbeeChannel<span class="property-type">int</span></dt>
117
- <dd>ZigBee channel (for communicating with lights)</dd>
118
-
119
- <dt>macAddress<span class="property-type">string</span></dt>
120
- <dd>MAC address</dd>
121
-
122
- <dt>ipAddress<span class="property-type">string</span></dt>
123
- <dd>IP address</dd>
124
-
125
- <dt>dhcpEnabled<span class="property-type">boolean</span></dt>
126
- <dd>Whether or not DHCP is enabled</dd>
127
-
128
- <dt>netmask<span class="property-type">string</span></dt>
129
- <dd>Netmask</dd>
130
-
131
- <dt>gateway<span class="property-type">string</span></dt>
132
- <dd>Gateway</dd>
133
-
134
- <dt>proxyAddress<span class="property-type">string</span></dt>
135
- <dd>Proxy address</dd>
136
-
137
- <dt>proxyPort<span class="property-type">string</span></dt>
138
- <dd>Proxy port</dd>
139
-
140
- <dt>utcTime<span class="property-type">string</span></dt>
141
- <dd>UTC time of the bridge</dd>
142
-
143
- <dt>timeZone<span class="property-type">string</span></dt>
144
- <dd>Time zone</dd>
145
-
146
- <dt>localTime<span class="property-type">string</span></dt>
147
- <dd>Local time of the bridge</dd>
148
-
149
- <dt>portalServicesEnabled<span class="property-type">boolean</span></dt>
150
- <dd>Whether or not portal services are enabled</dd>
151
-
152
- <dt>portalConnected<span class="property-type">boolean</span></dt>
153
- <dd>Whether or not portal is connected</dd>
154
-
155
- <dt>linkButtonEnabled<span class="property-type">boolean</span></dt>
156
- <dd>Whether or not link button is enabled</dd>
157
-
158
- <dt>touchlinkEnabled<span class="property-type">boolean</span></dt>
159
- <dd>Whether or not TouchLink is enabled</dd>
160
-
161
- <dt>model<span class="property-type">object</span></dt>
162
- <dd>The model object of the bridge includes model specific information like the model.id, model.manufacturer and model.name</dd>
163
- </dl>
164
-
165
- <h3>Global update events</h3>
166
- <p>The bridge also sends events when a certain active resource (lights, groups, sensors, etc.) changes its status.</p>
167
- <dl class="message-properties">
168
- <dt>msg.updated<span class="property-type">object</span></dt>
169
- <dd>The whole object of the device (check docs)</dd>
170
-
171
- <dt>msg.type<span class="property-type">string</span></dt>
172
- <dd>Can be one of the following: light, group, rule, motion, brightness, temperature, switch, tap</dd>
173
- </dl>
92
+ ![examples](https://user-images.githubusercontent.com/5302050/148681840-2275c15a-7c0c-4a37-b817-199608e571d2.gif)
174
93
  </script>
@@ -5,10 +5,8 @@
5
5
  {
6
6
  "name": "Name",
7
7
  "input-name": "Hue Bridge name",
8
- "autoupdates": "Auto updates",
9
- "autoupdates-info": "Activate automatic firmware updates",
10
- "skipglobalevents": "Skip global events",
11
- "skipglobalevents-info": "Skip global device updates / messages on this node"
8
+ "skipglobalevents-info": "Skip global device updates / messages on this node",
9
+ "sendinitevents-node": "Do not suppress initialization event"
12
10
  },
13
11
  "node":
14
12
  {
@@ -18,21 +16,12 @@
18
16
  "connected": "connected",
19
17
  "starting-tl": "starting TouchLink…",
20
18
  "started-tl": "TouchLink started…",
21
- "f-users": "fetching users…",
22
- "f-lights": "fetching lights…",
23
- "f-groups": "fetching groups…",
24
- "f-sensors": "fetching sensors…",
25
- "f-scenes": "fetching scenes…",
26
- "f-rules": "fetching rules…",
27
- "f-schedules": "fetching schedules…",
28
- "f-rlinks": "fetching resource links…",
29
- "f-timezones": "fetching timezones…",
30
- "f-internet": "fetching Internet Services…",
31
- "f-portal": "fetching Portal…",
19
+ "f-ressources": "fetching ressources…",
32
20
  "updating-settings": "updating settings…",
33
21
  "settings-updated": "settings updated",
34
22
  "input": "settings / fetch",
35
- "output": "bridge information"
23
+ "output": "bridge information",
24
+ "statusmsg": "Status queried successfully…"
36
25
  }
37
26
  }
38
27
  }
@@ -1,53 +1,67 @@
1
- <script type="text/x-red" data-help-name="hue-brightness">
2
- <p>Hue brightness node to receive current light level in Lux and daylight / darkness.</p>
1
+ <script type="text/markdown" data-help-name="hue-brightness">
2
+ The "Hue Brightness" node can read the current light level from a suitable sensor on the bridge.
3
3
 
4
- <h3>Setup</h3>
5
- <p>Select the preconfigured Hue Bridge and hit the search button to find all available Lux sensors. Type in the name of the sensor manually or keep the default device name. Note that events will only be sent on deploy (once) and if the light level changes. If necessary, all status updates of this node can be ignored by activating the "Skip events" option.</p>
4
+ ### Setup
6
5
 
7
- <h3>Light Level Events</h3>
8
- <p>The event message that the light sensor sends contains the following data in the <b>msg.payload</b> object:</p>
9
- <dl class="message-properties">
10
- <dt>lux<span class="property-type">int</span></dt>
11
- <dd>Real lux value</dd>
6
+ 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.
12
7
 
13
- <dt>lightLevel<span class="property-type">int</span></dt>
14
- <dd>Light level</dd>
8
+ 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.
15
9
 
16
- <dt>dark<span class="property-type">boolean</span></dt>
17
- <dd>True if it's dark</dd>
10
+ ### Get status
18
11
 
19
- <dt>daylight<span class="property-type">boolean</span></dt>
20
- <dd>True if daylight recognized</dd>
12
+ 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.
21
13
 
22
- <dt>updated<span class="property-type">string</span></dt>
23
- <dd>ISO 8601 date string of the last light level update</dd>
24
- </dl>
14
+ : status (boolean): Returns the current status of the sensor
25
15
 
26
- <h3>Additional Sensor Info</h3>
27
- <p>Additional information about the sensor is going to be sent to the <b>msg.info</b> object:</p>
28
- <dl class="message-properties">
29
- <dt>id<span class="property-type">int</span></dt>
30
- <dd>Numerical id of the sensor as registered on the bridge</dd>
16
+ ### Turn the sensor on / off
31
17
 
32
- <dt>uniqueId<span class="property-type">string</span></dt>
33
- <dd>Unique Id of the sensor (typically hardware id)</dd>
18
+ 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:
34
19
 
35
- <dt>name<span class="property-type">string</span></dt>
36
- <dd>Name for the sensor</dd>
20
+ : payload (boolean): `true` switches the sensor on, `false` switches it off
37
21
 
38
- <dt>type<span class="property-type">string</span></dt>
39
- <dd>Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch)</dd>
22
+ ### Status messages from the node
40
23
 
41
- <dt>softwareVersion<span class="property-type">float</span></dt>
42
- <dd>Software version of the sensor</dd>
24
+ As soon as the sensor has detected a change in the light level, the following status message is returned:
43
25
 
44
- <dt>battery<span class="property-type">int</span></dt>
45
- <dd>Current battery level of the sensor in percent</dd>
26
+ #### Status object under `msg.payload`
46
27
 
47
- <dt>model<span class="property-type">object</span></dt>
48
- <dd>The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type</dd>
49
- </dl>
28
+ : active (boolean): Indicates whether the sensor is turned on or off
29
+ : reachable (boolean | string): `true` if the sensor is connected to the bridge, `unknown` if the connection status deviates
30
+ : 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
31
+ : lux (int): Indicates the real LUX value of the light level
32
+ : lightLevel (int): Indicates the light intensity of the sensor
33
+ : dark (boolean): `true`, if darkness was registered
34
+ : daylight (boolean): `true`, if daylight was registered
35
+ : updated (string): Time of the last update of the resource by HueMagic (ISO 8601)
50
36
 
51
- <h3>Last State Information</h3>
52
- <p>This node also sends the entire last state data (before the update) in the <b>msg.lastState</b> 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.</p>
37
+ #### Information about the sensor under `msg.info`
38
+
39
+ : id (string): Indicates the new ID of the sensor
40
+ : idV1 (string | boolean): Indicates the old ID of the sensor
41
+ : uniqueId (string): The unique ID of the sensor
42
+ : deviceId (string): The unique ID of the device
43
+ : name (string): The currently set name of the sensor
44
+ : type (string): The type of the sensor (always `light_level`)
45
+ : softwareVersion (string): The current firmware of the sensor
46
+ : battery (float): The current battery level of the sensor
47
+ : batteryState (string): The current status of the battery level. Can contain `normal`, `low` or `critical` as a value
48
+ : model (object): Contains the model information of the sensor under `id`, `manufacturer`, `name`, `type` and `certified`
49
+
50
+ #### Status changes under `msg.updated`
51
+
52
+ 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.
53
+
54
+ #### Last status of the sensor under `msg.lastState`
55
+
56
+ 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`.
57
+
58
+ #### Last command under `msg.command` (optional)
59
+
60
+ 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.
61
+
62
+ ### Examples from HueMagic
63
+
64
+ HueMagic provides some sample configurations for this node. 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.
65
+
66
+ ![examples](https://user-images.githubusercontent.com/5302050/148681840-2275c15a-7c0c-4a37-b817-199608e571d2.gif)
53
67
  </script>
@@ -5,24 +5,31 @@
5
5
  {
6
6
  "name": "Name",
7
7
  "input-name": "Brightness sensor name",
8
- "skipevents": "Skip events",
9
8
  "skipevents-node": "Skip events from node",
9
+ "sendinitevents-node": "Do not suppress initialization event",
10
10
  "searching": "Searching sensors…",
11
11
  "none-found": "No brightness sensors found!",
12
12
  "unknown-error": "Something went wrong. Please retry.",
13
13
  "sensor": "Sensor",
14
- "all": "All groups / lights"
14
+ "all": "All groups / lights",
15
+ "universalevents": "Universal Events",
16
+ "universalevents-node": "Receives all messages from other nodes of the same type (only in universal mode)"
15
17
  },
16
18
  "node":
17
19
  {
18
20
  "title": "Hue Brightness",
19
21
  "not-configured": "not configured",
22
+ "deactivated": "deactivated",
20
23
  "init": "initializing…",
21
24
  "not-reachable": "not reachable",
22
25
  "lux": "__lux__ Lux",
23
26
  "lux-dark": "__lux__ Lux (dark)",
24
27
  "lux-daylight": "__lux__ Lux (daylight)",
25
- "output": "brightness (changed)"
28
+ "input": "status query",
29
+ "output": "brightness (changed)",
30
+ "universal": "universal mode",
31
+ "command": "executing command…",
32
+ "statusmsg": "Status queried successfully…"
26
33
  }
27
34
  }
28
35
  }
@@ -0,0 +1,58 @@
1
+ <script type="text/markdown" data-help-name="hue-buttons">
2
+ The "Hue Buttons" node receives switching events from input devices connected to the bridge.
3
+
4
+ ### Setup
5
+
6
+ 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.
7
+
8
+ 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.
9
+
10
+ ### Get status
11
+
12
+ 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.
13
+
14
+ : status (boolean): Returns the current status of the switch/button
15
+
16
+ ### Status messages from the node
17
+
18
+ As soon as a key has been pressed, the following status message is returned by the node:
19
+
20
+ #### Status object under `msg.payload`
21
+
22
+ : reachable (boolean | string): `true` if the switch/button is connected to the bridge, `unknown` if the connection status deviates
23
+ : 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
24
+ : button (int | boolean): Numeric ID of the key that was last pressed or `false` if no key was pressed
25
+ : 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
26
+ : updated (string): Time of the last update of the resource by HueMagic (ISO 8601)
27
+
28
+ #### Information about the switch/button under `msg.info`
29
+
30
+ : id (string): Indicates the new ID of the switch/button
31
+ : idV1 (string | boolean): Indicates the old ID of the switch/button
32
+ : uniqueId (string): The unique ID of the switch/button
33
+ : deviceId (string): The unique ID of the device
34
+ : name (string): The currently set name of the switch/button
35
+ : type (string): The type of the switch/button (always `button`)
36
+ : softwareVersion (string): The current firmware of the switch/button
37
+ : battery (float): The current battery level of the switch/button
38
+ : batteryState (string): The current status of the battery level. Can contain `normal`, `low` or `critical` as a value
39
+ : model (object): Contains the model information of the switch/button under `id` , `manufacturer`, `name`, `type` and `certified`
40
+
41
+ #### Status changes under `msg.updated`
42
+
43
+ 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.
44
+
45
+ #### Last status of the switch/button under `msg.lastState`
46
+
47
+ 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`.
48
+
49
+ #### Last command under `msg.command` (optional)
50
+
51
+ 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.
52
+
53
+ ### Examples from HueMagic
54
+
55
+ HueMagic provides some sample configurations for this node. 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.
56
+
57
+ ![examples](https://user-images.githubusercontent.com/5302050/148681840-2275c15a-7c0c-4a37-b817-199608e571d2.gif)
58
+ </script>
@@ -0,0 +1,34 @@
1
+ {
2
+ "hue-buttons":
3
+ {
4
+ "config":
5
+ {
6
+ "name": "Name",
7
+ "input-name": "Button name",
8
+ "skipevents-node": "Skip events from node",
9
+ "sendinitevents-node": "Do not suppress initialization event",
10
+ "searching": "Searching Hue Buttons…",
11
+ "none-found": "No Hue Button found!",
12
+ "unknown-error": "Something went wrong. Please retry.",
13
+ "button": "Button",
14
+ "universalevents": "Universal Events",
15
+ "universalevents-node": "Receives all messages from other nodes of the same type (only in universal mode)"
16
+ },
17
+ "node":
18
+ {
19
+ "title": "Hue Buttons",
20
+ "not-configured": "not configured",
21
+ "waiting": "waiting…",
22
+ "button-on": "On",
23
+ "action-pressed": "pressed",
24
+ "action-holded": "held",
25
+ "action-shortreleased": "short released",
26
+ "action-longreleased": "long released",
27
+ "input": "status query",
28
+ "output": "pressed button",
29
+ "universal": "universal mode",
30
+ "command": "executing command…",
31
+ "statusmsg": "Status queried successfully…"
32
+ }
33
+ }
34
+ }