node-red-contrib-huemagic 3.0.0 → 4.0.3
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.
- package/README.md +764 -603
- package/examples/Hue Bridge.json +189 -35
- package/examples/Hue Brightness.json +124 -14
- package/examples/Hue Buttons.json +88 -0
- package/examples/Hue Group.json +575 -63
- package/examples/Hue Light.json +805 -58
- package/examples/Hue Magic.json +69 -24
- package/examples/Hue Motion.json +110 -42
- package/examples/Hue Rules.json +105 -37
- package/examples/Hue Scene.json +145 -28
- package/examples/Hue Temperature.json +124 -14
- package/huemagic/animations/019-christmas.json +30 -0
- package/huemagic/animations/020-superhero.json +56 -0
- package/huemagic/animations/021-neoncity.json +52 -0
- package/huemagic/animations/previews/006-fireplace.gif +0 -0
- package/huemagic/animations/previews/013-strobo.gif +0 -0
- package/huemagic/animations/previews/014-randomrainbow.gif +0 -0
- package/huemagic/animations/previews/016-milkyway.gif +0 -0
- package/huemagic/animations/previews/018-forest.gif +0 -0
- package/huemagic/animations/previews/019-christmas.gif +0 -0
- package/huemagic/animations/previews/020-superhero.gif +0 -0
- package/huemagic/animations/previews/021-neoncity.gif +0 -0
- package/huemagic/hue-bridge-config.html +105 -61
- package/huemagic/hue-bridge-config.js +631 -319
- package/huemagic/hue-bridge.html +41 -21
- package/huemagic/hue-bridge.js +190 -396
- package/huemagic/hue-brightness.html +127 -59
- package/huemagic/hue-brightness.js +111 -55
- package/huemagic/hue-buttons.html +197 -0
- package/huemagic/hue-buttons.js +158 -0
- package/huemagic/hue-group.html +137 -66
- package/huemagic/hue-group.js +387 -403
- package/huemagic/hue-light.html +132 -64
- package/huemagic/hue-light.js +544 -378
- package/huemagic/hue-magic.html +36 -20
- package/huemagic/hue-magic.js +49 -27
- package/huemagic/hue-motion.html +127 -59
- package/huemagic/hue-motion.js +105 -101
- package/huemagic/hue-rules.html +121 -50
- package/huemagic/hue-rules.js +89 -63
- package/huemagic/hue-scene.html +95 -114
- package/huemagic/hue-scene.js +64 -95
- package/huemagic/hue-temperature.html +127 -59
- package/huemagic/hue-temperature.js +120 -56
- package/huemagic/icons/hue-bridge.png +0 -0
- package/huemagic/icons/hue-bridge.svg +3 -0
- package/huemagic/icons/hue-brightness.png +0 -0
- package/huemagic/icons/hue-brightness.svg +11 -0
- package/huemagic/icons/hue-buttons.png +0 -0
- package/huemagic/icons/hue-buttons.svg +4 -0
- package/huemagic/icons/hue-group.png +0 -0
- package/huemagic/icons/hue-group.svg +12 -0
- package/huemagic/icons/hue-light.png +0 -0
- package/huemagic/icons/hue-light.svg +3 -0
- package/huemagic/icons/hue-magic.png +0 -0
- package/huemagic/icons/hue-magic.svg +3 -0
- package/huemagic/icons/hue-motion.png +0 -0
- package/huemagic/icons/hue-motion.svg +9 -0
- package/huemagic/icons/hue-rules.png +0 -0
- package/huemagic/icons/hue-rules.svg +4 -0
- package/huemagic/icons/hue-scene.png +0 -0
- package/huemagic/icons/hue-scene.svg +5 -0
- package/huemagic/icons/hue-temperature.png +0 -0
- package/huemagic/icons/hue-temperature.svg +7 -0
- package/huemagic/locales/de/hue-bridge-config.html +17 -12
- package/huemagic/locales/de/hue-bridge-config.json +7 -5
- package/huemagic/locales/de/hue-bridge.html +64 -145
- package/huemagic/locales/de/hue-bridge.json +6 -17
- package/huemagic/locales/de/hue-brightness.html +50 -50
- package/huemagic/locales/de/hue-brightness.json +6 -5
- package/huemagic/locales/de/hue-buttons.html +58 -0
- package/huemagic/locales/de/{hue-button.json → hue-buttons.json} +7 -11
- package/huemagic/locales/de/hue-group.html +46 -122
- package/huemagic/locales/de/hue-group.json +5 -5
- package/huemagic/locales/de/hue-light.html +68 -116
- package/huemagic/locales/de/hue-light.json +5 -5
- package/huemagic/locales/de/hue-magic.html +65 -57
- package/huemagic/locales/de/hue-magic.json +2 -1
- package/huemagic/locales/de/hue-motion.html +47 -50
- package/huemagic/locales/de/hue-motion.json +5 -5
- package/huemagic/locales/de/hue-rules.html +68 -73
- package/huemagic/locales/de/hue-rules.json +5 -2
- package/huemagic/locales/de/hue-scene.html +23 -32
- package/huemagic/locales/de/hue-scene.json +5 -2
- package/huemagic/locales/de/hue-temperature.html +51 -48
- package/huemagic/locales/de/hue-temperature.json +6 -5
- package/huemagic/locales/en-US/hue-bridge-config.html +17 -12
- package/huemagic/locales/en-US/hue-bridge-config.json +5 -3
- package/huemagic/locales/en-US/hue-bridge.html +64 -145
- package/huemagic/locales/en-US/hue-bridge.json +5 -16
- package/huemagic/locales/en-US/hue-brightness.html +50 -50
- package/huemagic/locales/en-US/hue-brightness.json +5 -2
- package/huemagic/locales/en-US/hue-buttons.html +58 -0
- package/huemagic/locales/en-US/{hue-button.json → hue-buttons.json} +6 -4
- package/huemagic/locales/en-US/hue-group.html +46 -122
- package/huemagic/locales/en-US/hue-group.json +4 -2
- package/huemagic/locales/en-US/hue-light.html +68 -116
- package/huemagic/locales/en-US/hue-light.json +4 -2
- package/huemagic/locales/en-US/hue-magic.html +65 -57
- package/huemagic/locales/en-US/hue-magic.json +3 -1
- package/huemagic/locales/en-US/hue-motion.html +47 -50
- package/huemagic/locales/en-US/hue-motion.json +4 -2
- package/huemagic/locales/en-US/hue-rules.html +68 -73
- package/huemagic/locales/en-US/hue-rules.json +5 -2
- package/huemagic/locales/en-US/hue-scene.html +23 -32
- package/huemagic/locales/en-US/hue-scene.json +5 -2
- package/huemagic/locales/en-US/hue-temperature.html +51 -48
- package/huemagic/locales/en-US/hue-temperature.json +5 -2
- package/huemagic/utils/api.js +290 -0
- package/huemagic/utils/color.js +382 -0
- package/{utils → huemagic/utils}/merge.js +4 -6
- package/huemagic/utils/messages.js +447 -0
- package/package.json +9 -15
- package/examples/Hue Button.json +0 -40
- package/examples/Hue Switch.json +0 -40
- package/examples/Hue Tap.json +0 -40
- package/huemagic/hue-button.html +0 -132
- package/huemagic/hue-button.js +0 -143
- package/huemagic/hue-switch.html +0 -132
- package/huemagic/hue-switch.js +0 -163
- package/huemagic/hue-tap.html +0 -132
- package/huemagic/hue-tap.js +0 -123
- package/huemagic/icons/hue-button.png +0 -0
- package/huemagic/icons/hue-switch.png +0 -0
- package/huemagic/icons/hue-tap.png +0 -0
- package/huemagic/locales/de/hue-button.html +0 -64
- package/huemagic/locales/de/hue-switch.html +0 -64
- package/huemagic/locales/de/hue-switch.json +0 -35
- package/huemagic/locales/de/hue-tap.html +0 -55
- package/huemagic/locales/de/hue-tap.json +0 -27
- package/huemagic/locales/en-US/hue-button.html +0 -64
- package/huemagic/locales/en-US/hue-switch.html +0 -64
- package/huemagic/locales/en-US/hue-switch.json +0 -35
- package/huemagic/locales/en-US/hue-tap.html +0 -55
- package/huemagic/locales/en-US/hue-tap.json +0 -27
- package/utils/color.js +0 -9
- package/utils/messages.js +0 -658
- package/utils/rgb.js +0 -188
package/huemagic/hue-bridge.html
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
<script type="text/x-red" data-template-name="hue-bridge-node">
|
|
2
2
|
<div class="form-row">
|
|
3
3
|
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="hue-bridge.config.name"></span></label>
|
|
4
|
-
<input type="text" id="node-input-name" data-i18n="[placeholder]hue-bridge.config.input-name">
|
|
4
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]hue-bridge.config.input-name" style="width: calc(100% - 105px)">
|
|
5
5
|
</div>
|
|
6
6
|
<div class="form-row">
|
|
7
7
|
<label for="node-input-bridge"><i class="fa fa-server"></i> Bridge</label>
|
|
8
|
-
<input type="text" id="node-input-bridge">
|
|
8
|
+
<input type="text" id="node-input-bridge" style="width: calc(100% - 105px)">
|
|
9
9
|
</div>
|
|
10
|
-
<div class="form-row">
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
</
|
|
10
|
+
<div class="form-row" style="margin-top: 30px">
|
|
11
|
+
<div style="display: inline-flex; width: calc(100% - 105px)">
|
|
12
|
+
<input type="checkbox" id="node-input-skipglobalevents" style="flex: 15px;">
|
|
13
|
+
<span data-i18n="hue-bridge.config.skipglobalevents-info" style="width: 100%; margin-left: 10px;"></span>
|
|
14
|
+
</div>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="form-row">
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
<div style="display: inline-flex; width: calc(100% - 105px)">
|
|
18
|
+
<input type="checkbox" id="node-input-initevents" style="flex: 15px;">
|
|
19
|
+
<span data-i18n="hue-bridge.config.sendinitevents-node" style="width: 100%; margin-left: 10px;"></span>
|
|
20
|
+
</div>
|
|
20
21
|
</div>
|
|
21
22
|
</script>
|
|
22
23
|
|
|
@@ -25,26 +26,45 @@
|
|
|
25
26
|
category: 'HueMagic',
|
|
26
27
|
color: '#b7b7b7',
|
|
27
28
|
defaults: {
|
|
28
|
-
name: {value:""},
|
|
29
|
-
bridge: {type: "hue-bridge", required: true},
|
|
30
|
-
autoupdates: {value: true},
|
|
31
|
-
skipglobalevents: {value: false}
|
|
29
|
+
name: { value:"" },
|
|
30
|
+
bridge: { type: "hue-bridge", required: true },
|
|
31
|
+
autoupdates: { value: true },
|
|
32
|
+
skipglobalevents: { value: false },
|
|
33
|
+
initevents: { value: false }
|
|
32
34
|
},
|
|
35
|
+
align: 'left',
|
|
36
|
+
icon: "hue-bridge.png",
|
|
33
37
|
inputs: 1,
|
|
34
38
|
outputs: 1,
|
|
39
|
+
label: function() {
|
|
40
|
+
return this.name || this._("hue-bridge.node.title");
|
|
41
|
+
},
|
|
42
|
+
paletteLabel: function() {
|
|
43
|
+
return this._("hue-bridge.node.title");
|
|
44
|
+
},
|
|
35
45
|
inputLabels: function() {
|
|
36
46
|
return this._("hue-bridge.node.input");
|
|
37
47
|
},
|
|
38
48
|
outputLabels: function() {
|
|
39
49
|
return this._("hue-bridge.node.output");
|
|
40
50
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
button: {
|
|
52
|
+
onclick: function()
|
|
53
|
+
{
|
|
54
|
+
const node = this;
|
|
55
|
+
if(node.bridge)
|
|
56
|
+
{
|
|
57
|
+
$.ajax({
|
|
58
|
+
url: "inject/" + node.id,
|
|
59
|
+
type: "POST",
|
|
60
|
+
data: JSON.stringify({ __user_inject_props__: "status"}),
|
|
61
|
+
contentType: "application/json; charset=utf-8",
|
|
62
|
+
success: function (resp) {
|
|
63
|
+
RED.notify(node.name + ": " + node._("hue-bridge.node.statusmsg"), { type: "success", id: "status", timeout: 2000 });
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
48
68
|
}
|
|
49
69
|
});
|
|
50
70
|
</script>
|