node-red-contrib-huemagic 3.0.0 → 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 (138) hide show
  1. package/README.md +764 -603
  2. package/examples/Hue Bridge.json +189 -35
  3. package/examples/Hue Brightness.json +124 -14
  4. package/examples/Hue Buttons.json +88 -0
  5. package/examples/Hue Group.json +575 -63
  6. package/examples/Hue Light.json +805 -58
  7. package/examples/Hue Magic.json +69 -24
  8. package/examples/Hue Motion.json +110 -42
  9. package/examples/Hue Rules.json +105 -37
  10. package/examples/Hue Scene.json +145 -28
  11. package/examples/Hue Temperature.json +124 -14
  12. package/huemagic/animations/019-christmas.json +30 -0
  13. package/huemagic/animations/020-superhero.json +56 -0
  14. package/huemagic/animations/021-neoncity.json +52 -0
  15. package/huemagic/animations/previews/006-fireplace.gif +0 -0
  16. package/huemagic/animations/previews/013-strobo.gif +0 -0
  17. package/huemagic/animations/previews/014-randomrainbow.gif +0 -0
  18. package/huemagic/animations/previews/016-milkyway.gif +0 -0
  19. package/huemagic/animations/previews/018-forest.gif +0 -0
  20. package/huemagic/animations/previews/019-christmas.gif +0 -0
  21. package/huemagic/animations/previews/020-superhero.gif +0 -0
  22. package/huemagic/animations/previews/021-neoncity.gif +0 -0
  23. package/huemagic/hue-bridge-config.html +105 -61
  24. package/huemagic/hue-bridge-config.js +628 -319
  25. package/huemagic/hue-bridge.html +41 -21
  26. package/huemagic/hue-bridge.js +190 -396
  27. package/huemagic/hue-brightness.html +127 -59
  28. package/huemagic/hue-brightness.js +105 -55
  29. package/huemagic/hue-buttons.html +197 -0
  30. package/huemagic/hue-buttons.js +152 -0
  31. package/huemagic/hue-group.html +137 -66
  32. package/huemagic/hue-group.js +387 -403
  33. package/huemagic/hue-light.html +132 -64
  34. package/huemagic/hue-light.js +544 -378
  35. package/huemagic/hue-magic.html +36 -20
  36. package/huemagic/hue-magic.js +49 -27
  37. package/huemagic/hue-motion.html +127 -59
  38. package/huemagic/hue-motion.js +99 -101
  39. package/huemagic/hue-rules.html +121 -50
  40. package/huemagic/hue-rules.js +83 -63
  41. package/huemagic/hue-scene.html +95 -114
  42. package/huemagic/hue-scene.js +64 -95
  43. package/huemagic/hue-temperature.html +127 -59
  44. package/huemagic/hue-temperature.js +114 -56
  45. package/huemagic/icons/hue-bridge.png +0 -0
  46. package/huemagic/icons/hue-bridge.svg +3 -0
  47. package/huemagic/icons/hue-brightness.png +0 -0
  48. package/huemagic/icons/hue-brightness.svg +11 -0
  49. package/huemagic/icons/hue-buttons.png +0 -0
  50. package/huemagic/icons/hue-buttons.svg +4 -0
  51. package/huemagic/icons/hue-group.png +0 -0
  52. package/huemagic/icons/hue-group.svg +12 -0
  53. package/huemagic/icons/hue-light.png +0 -0
  54. package/huemagic/icons/hue-light.svg +3 -0
  55. package/huemagic/icons/hue-magic.png +0 -0
  56. package/huemagic/icons/hue-magic.svg +3 -0
  57. package/huemagic/icons/hue-motion.png +0 -0
  58. package/huemagic/icons/hue-motion.svg +9 -0
  59. package/huemagic/icons/hue-rules.png +0 -0
  60. package/huemagic/icons/hue-rules.svg +4 -0
  61. package/huemagic/icons/hue-scene.png +0 -0
  62. package/huemagic/icons/hue-scene.svg +5 -0
  63. package/huemagic/icons/hue-temperature.png +0 -0
  64. package/huemagic/icons/hue-temperature.svg +7 -0
  65. package/huemagic/locales/de/hue-bridge-config.html +17 -12
  66. package/huemagic/locales/de/hue-bridge-config.json +7 -5
  67. package/huemagic/locales/de/hue-bridge.html +64 -145
  68. package/huemagic/locales/de/hue-bridge.json +6 -17
  69. package/huemagic/locales/de/hue-brightness.html +50 -50
  70. package/huemagic/locales/de/hue-brightness.json +6 -5
  71. package/huemagic/locales/de/hue-buttons.html +58 -0
  72. package/huemagic/locales/de/{hue-button.json → hue-buttons.json} +7 -11
  73. package/huemagic/locales/de/hue-group.html +46 -122
  74. package/huemagic/locales/de/hue-group.json +5 -5
  75. package/huemagic/locales/de/hue-light.html +68 -116
  76. package/huemagic/locales/de/hue-light.json +5 -5
  77. package/huemagic/locales/de/hue-magic.html +65 -57
  78. package/huemagic/locales/de/hue-magic.json +2 -1
  79. package/huemagic/locales/de/hue-motion.html +47 -50
  80. package/huemagic/locales/de/hue-motion.json +5 -5
  81. package/huemagic/locales/de/hue-rules.html +68 -73
  82. package/huemagic/locales/de/hue-rules.json +5 -2
  83. package/huemagic/locales/de/hue-scene.html +23 -32
  84. package/huemagic/locales/de/hue-scene.json +5 -2
  85. package/huemagic/locales/de/hue-temperature.html +51 -48
  86. package/huemagic/locales/de/hue-temperature.json +6 -5
  87. package/huemagic/locales/en-US/hue-bridge-config.html +17 -12
  88. package/huemagic/locales/en-US/hue-bridge-config.json +5 -3
  89. package/huemagic/locales/en-US/hue-bridge.html +64 -145
  90. package/huemagic/locales/en-US/hue-bridge.json +5 -16
  91. package/huemagic/locales/en-US/hue-brightness.html +50 -50
  92. package/huemagic/locales/en-US/hue-brightness.json +5 -2
  93. package/huemagic/locales/en-US/hue-buttons.html +58 -0
  94. package/huemagic/locales/en-US/{hue-button.json → hue-buttons.json} +6 -4
  95. package/huemagic/locales/en-US/hue-group.html +46 -122
  96. package/huemagic/locales/en-US/hue-group.json +4 -2
  97. package/huemagic/locales/en-US/hue-light.html +68 -116
  98. package/huemagic/locales/en-US/hue-light.json +4 -2
  99. package/huemagic/locales/en-US/hue-magic.html +65 -57
  100. package/huemagic/locales/en-US/hue-magic.json +3 -1
  101. package/huemagic/locales/en-US/hue-motion.html +47 -50
  102. package/huemagic/locales/en-US/hue-motion.json +4 -2
  103. package/huemagic/locales/en-US/hue-rules.html +68 -73
  104. package/huemagic/locales/en-US/hue-rules.json +5 -2
  105. package/huemagic/locales/en-US/hue-scene.html +23 -32
  106. package/huemagic/locales/en-US/hue-scene.json +5 -2
  107. package/huemagic/locales/en-US/hue-temperature.html +51 -48
  108. package/huemagic/locales/en-US/hue-temperature.json +5 -2
  109. package/huemagic/utils/api.js +290 -0
  110. package/huemagic/utils/color.js +382 -0
  111. package/{utils → huemagic/utils}/merge.js +4 -6
  112. package/huemagic/utils/messages.js +447 -0
  113. package/package.json +9 -15
  114. package/examples/Hue Button.json +0 -40
  115. package/examples/Hue Switch.json +0 -40
  116. package/examples/Hue Tap.json +0 -40
  117. package/huemagic/hue-button.html +0 -132
  118. package/huemagic/hue-button.js +0 -143
  119. package/huemagic/hue-switch.html +0 -132
  120. package/huemagic/hue-switch.js +0 -163
  121. package/huemagic/hue-tap.html +0 -132
  122. package/huemagic/hue-tap.js +0 -123
  123. package/huemagic/icons/hue-button.png +0 -0
  124. package/huemagic/icons/hue-switch.png +0 -0
  125. package/huemagic/icons/hue-tap.png +0 -0
  126. package/huemagic/locales/de/hue-button.html +0 -64
  127. package/huemagic/locales/de/hue-switch.html +0 -64
  128. package/huemagic/locales/de/hue-switch.json +0 -35
  129. package/huemagic/locales/de/hue-tap.html +0 -55
  130. package/huemagic/locales/de/hue-tap.json +0 -27
  131. package/huemagic/locales/en-US/hue-button.html +0 -64
  132. package/huemagic/locales/en-US/hue-switch.html +0 -64
  133. package/huemagic/locales/en-US/hue-switch.json +0 -35
  134. package/huemagic/locales/en-US/hue-tap.html +0 -55
  135. package/huemagic/locales/en-US/hue-tap.json +0 -27
  136. package/utils/color.js +0 -9
  137. package/utils/messages.js +0 -658
  138. package/utils/rgb.js +0 -188
@@ -1,132 +0,0 @@
1
- <script type="text/x-red" data-template-name="hue-tap">
2
- <div class="form-row">
3
- <label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="hue-tap.config.name"></span></label>
4
- <input type="text" id="node-input-name" data-i18n="[placeholder]hue-tap.config.input-name">
5
- </div>
6
- <div class="form-row">
7
- <label for="node-input-bridge"><i class="fa fa-server"></i> Bridge</label>
8
- <input type="text" id="node-input-bridge">
9
- </div>
10
- <div class="form-row">
11
- <label for="node-input-sensorid"><i class="fa fa-hand-pointer-o"></i> Tap</label>
12
- <div style="display: inline-block; position: relative; width: 70%; height: 20px;">
13
- <div style="position: absolute; left: 0px; right: 40px;">
14
- <input type="text" id="node-input-sensorid" placeholder="1" style="width: 100%"/>
15
- </div>
16
- <a id="node-config-input-scan-tap-sensors" class="editor-button" style="position: absolute; right: 0px; top: 0px;">
17
- <i class="fa fa-search"></i>
18
- </a>
19
- </div>
20
- </div>
21
- <div class="form-row">
22
- <label for="node-input-skipevents"><i class="fa fa-sign-out"></i> <span data-i18n="hue-tap.config.skipevents"></span></label>
23
- <input type="checkbox" id="node-input-skipevents" style="display:inline-block; width:22px; vertical-align:baseline;"><span data-i18n="hue-tap.config.skipevents-node"></span>
24
- </label>
25
- </div>
26
- <div class="form-row">
27
- <label for="node-input-universalevents"><i class="fa fa-bullhorn"></i> <span data-i18n="hue-tap.config.universalevents"></span></label>
28
- <input type="checkbox" id="node-input-universalevents" style="display:inline-block; width:22px; vertical-align:baseline;"><span data-i18n="hue-tap.config.universalevents-node"></span>
29
- </label>
30
- </div>
31
- </script>
32
-
33
- <script type="text/javascript">
34
- RED.nodes.registerType('hue-tap',{
35
- category: 'HueMagic',
36
- color: '#46d6ca',
37
- defaults: {
38
- name: {value:""},
39
- bridge: {type: "hue-bridge", required: true},
40
- sensorid: {value:"", required: false, validate: function(id) {
41
- if(id.length < 1) { return true; }
42
- else if(!isNaN(id)) { return true; }
43
- else { return false; }
44
- }},
45
- skipevents: {value: false},
46
- universalevents: {value: false}
47
- },
48
- inputs: 1,
49
- outputs: 1,
50
- inputLabels: function() {
51
- return this._("hue-tap.node.input");
52
- },
53
- outputLabels: function() {
54
- return this._("hue-tap.node.output");
55
- },
56
- align: 'right',
57
- icon: "hue-tap.png",
58
- paletteLabel: function() {
59
- return this._("hue-tap.node.title");
60
- },
61
- label: function() {
62
- return this.name || this._("hue-tap.node.title");
63
- },
64
- oneditprepare: function()
65
- {
66
- var scope = this;
67
-
68
- function manualTapID()
69
- {
70
- var current = $('#node-input-sensorid').val();
71
- $('#node-input-sensorid').replaceWith('<input type="text" id="node-input-sensorid" style="width: 100%"/>');
72
- $('#node-input-sensorid').val(current);
73
- }
74
-
75
- function searchAndSelectHueTap()
76
- {
77
- var current = $('#node-input-sensorid').val();
78
- $('#node-input-sensorid').replaceWith('<select id="node-input-sensorid" style="width: 100%"></select>');
79
- $('#node-input-sensorid').append('<option selected="selected" value="null">'+scope._("hue-tap.config.searching")+'</option>');
80
-
81
- var bridgeConfig = RED.nodes.node($('#node-input-bridge option:selected').val());
82
- $.get('hue/sensors', {bridge: bridgeConfig.bridge, key: bridgeConfig.key, type: "ZGPSwitch"})
83
- .done( function(data) {
84
- var hueTaps = JSON.parse(data);
85
-
86
- if(hueTaps.length <= 0)
87
- {
88
- RED.notify(scope._("hue-tap.config.none-found"), "error");
89
- }
90
-
91
- // RESET OPTIONS
92
- $('#node-input-sensorid').empty();
93
-
94
- // SET TAPS AS OPTIONS
95
- hueTaps.forEach(function(sensor)
96
- {
97
- if(sensor.model == "Hue Tap")
98
- {
99
- $('#node-input-sensorid').append('<option value="' + sensor.id + '">' + sensor.name + '</option>');
100
- }
101
- });
102
-
103
- // SELECT CURRENT VALUE
104
- $('#node-input-sensorid').val(current);
105
- })
106
- .fail(function()
107
- {
108
- RED.notify(scope._("hue-tap.config.unknown-error"), "error");
109
- });
110
- }
111
-
112
- $(document).on('change', '#node-input-sensorid', function()
113
- {
114
- var sensorName = $('#node-input-sensorid option:selected').text();
115
- if(sensorName.length > 0)
116
- {
117
- $('#node-input-name').val(sensorName);
118
- }
119
- });
120
-
121
- $('#node-config-input-scan-tap-sensors').click(function()
122
- {
123
- if($('#node-input-sensorid').prop("tagName") === "INPUT")
124
- {
125
- searchAndSelectHueTap();
126
- } else {
127
- manualTapID();
128
- }
129
- });
130
- }
131
- });
132
- </script>
@@ -1,123 +0,0 @@
1
- module.exports = function(RED)
2
- {
3
- "use strict";
4
-
5
- function HueTap(config)
6
- {
7
- RED.nodes.createNode(this, config);
8
-
9
- var scope = this;
10
- var bridge = RED.nodes.getNode(config.bridge);
11
- let { HueTapMessage } = require('../utils/messages');
12
- var universalMode = false;
13
-
14
- // SAVE LAST STATE
15
- var lastState = false;
16
-
17
- //
18
- // MEMORY
19
- this.lastUpdated = false;
20
-
21
- //
22
- // CHECK CONFIG
23
- if(bridge == null)
24
- {
25
- this.status({fill: "red", shape: "ring", text: "hue-tap.node.not-configured"});
26
- return false;
27
- }
28
-
29
- //
30
- // UNIVERSAL MODE?
31
- if(!config.sensorid)
32
- {
33
- universalMode = true;
34
- this.status({fill: "grey", shape: "dot", text: "hue-tap.node.universal"});
35
- }
36
-
37
- //
38
- // UPDATE STATE
39
- if(config.sensorid)
40
- {
41
- this.status({fill: "grey", shape: "dot", text: "hue-tap.node.waiting"});
42
- }
43
-
44
- //
45
- // ON UPDATE
46
- if(config.sensorid) { bridge.events.on('sensor' + config.sensorid, function(sensor) { scope.receivedUpdates(sensor) }); }
47
- if(!config.sensorid && config.universalevents && config.universalevents == true) { bridge.events.on('sensor', function(sensor) { scope.receivedUpdates(sensor) }); }
48
-
49
- //
50
- // RECEIVED UPDATES
51
- this.receivedUpdates = function(sensor)
52
- {
53
- var lastUpdated = scope.lastUpdated || false;
54
-
55
- if(sensor.state.lastUpdated != lastUpdated)
56
- {
57
- scope.lastUpdated = sensor.state.lastUpdated;
58
-
59
- // RETURN ON FIRST DEPLOY
60
- if (lastUpdated === false)
61
- {
62
- return;
63
- }
64
-
65
- // SEND MESSAGE
66
- var hueTap = new HueTapMessage(sensor, (universalMode == false) ? lastState : false);
67
- if(!config.skipevents) { scope.send(hueTap.msg); }
68
-
69
- // SAVE LAST STATE
70
- lastState = sensor;
71
-
72
- // SEND STATUS
73
- if(universalMode == false)
74
- {
75
- scope.status({fill: "green", shape: "dot", text: RED._("hue-tap.node.pressed-button",{button: hueTap.msg.payload.button}) });
76
- }
77
-
78
- }
79
- else
80
- {
81
- if(universalMode == false)
82
- {
83
- scope.status({fill: "grey", shape: "dot", text: "hue-tap.node.waiting"});
84
- }
85
- }
86
- }
87
-
88
- //
89
- // ON COMMAND
90
- this.on('input', function(msg, send, done)
91
- {
92
- // Node-RED < 1.0
93
- send = send || function() { scope.send.apply(scope,arguments); }
94
-
95
- // DEFINE SENSOR ID
96
- var tempSensorID = (msg.topic != null && isNaN(msg.topic) == false && msg.topic.length > 0) ? parseInt(msg.topic) : config.sensorid;
97
-
98
- // GET CURRENT STATE
99
- if(typeof msg.payload != 'undefined' && typeof msg.payload.status != 'undefined')
100
- {
101
- bridge.client.sensors.getById(tempSensorID)
102
- .then(sensor => {
103
- var hueTap = new HueTapMessage(sensor, (universalMode == false) ? lastState : false);
104
- send(hueTap.msg);
105
-
106
- return true;
107
- });
108
-
109
- return true;
110
- }
111
- });
112
-
113
- //
114
- // CLOSE NODE / REMOVE EVENT LISTENER
115
- this.on('close', function()
116
- {
117
- bridge.events.removeAllListeners('sensor' + config.sensorid);
118
- bridge.events.removeAllListeners('sensor');
119
- });
120
- }
121
-
122
- RED.nodes.registerType("hue-tap", HueTap);
123
- }
Binary file
Binary file
Binary file
@@ -1,64 +0,0 @@
1
- <script type="text/x-red" data-help-name="hue-button">
2
- <p>Hue Smart Button um Schaltererignisse zu empfangen.</p>
3
-
4
- <h3>Einrichtung</h3>
5
- <p>Wählen Sie die vorkonfigurierte Hue Bridge und klicken Sie auf die Suchschaltfläche, um alle verfügbaren Hue Buttons zu finden. Geben Sie den Namen manuell ein oder behalten Sie den Standardgerätenamen bei. Beachten Sie, dass Ereignisse nur bei der Bereitstellung (einmalig) und auf Knopfdruck gesendet werden. Bei Bedarf können alle Statusaktualisierungen dieses Nodes durch Aktivieren der Option "Mitteilungen ignorieren" ignoriert werden. Wenn Sie diesen Node im Universalmodus betreiben, können Sie optional auch auswählen, ob dieser Node alle Mitteilungen von anderen Nodes desselben Typs empfangen und ausgeben soll.</p>
6
-
7
- <h3>Button Ereignisse</h3>
8
- <p>Die vom Hue Button gesendete Ereignismeldung enthält die folgenden Daten im Objekt <b>msg.payload</b>:</p>
9
- <dl class="message-properties">
10
- <dt>button<span class="property-type">int</span></dt>
11
- <dd>ID der gedrückten Taste, 1002 für normales Drücken, 1003 für langes gedrückt halten (und loslassen) und 1001 während der Button lange gedrückt wird.</dd>
12
-
13
- <dt>name<span class="property-type">string</span></dt>
14
- <dd>Lesbarer Name der gedrückten Taste (always On)</dd>
15
-
16
- <dt>action<span class="property-type">string</span></dt>
17
- <dd>Lesbare gedrückte Tastenaktion (short released, long released, holded)</dd>
18
-
19
- <dt>updated<span class="property-type">string</span></dt>
20
- <dd>ISO 8601 Datum des letzten Zeitpunkts, zu dem eine Taste gedrückt wurde</dd>
21
- </dl>
22
-
23
- <h3>Zusätzliche Sensorinformationen</h3>
24
- <p>Zusätzliche Informationen zum Gerät werden an das Objekt <b>msg.info</b> gesendet:</p>
25
- <dl class="message-properties">
26
- <dt>id<span class="property-type">int</span></dt>
27
- <dd>Numerische ID des Sensors, wie auf der Bridge registriert</dd>
28
-
29
- <dt>uniqueId<span class="property-type">string</span></dt>
30
- <dd>Eindeutige ID des Sensors (normalerweise Hardware-ID)</dd>
31
-
32
- <dt>name<span class="property-type">string</span></dt>
33
- <dd>Name des Sensors</dd>
34
-
35
- <dt>type<span class="property-type">string</span></dt>
36
- <dd>Sensor-Typ (z.B. Daylight, CLIPTemperature, ZGPSwitch)</dd>
37
-
38
- <dt>softwareVersion<span class="property-type">float</span></dt>
39
- <dd>Softwareversion des Sensors</dd>
40
-
41
- <dt>battery<span class="property-type">int</span></dt>
42
- <dd>Aktueller Batteriestand des Sensors in Prozent</dd>
43
-
44
- <dt>model<span class="property-type">object</span></dt>
45
- <dd>Das Modellobjekt des Sensors enthält modellspezifische Informationen wie model.id, model.manufacturer, model.name und model.type</dd>
46
- </dl>
47
-
48
- <h3>Status abfragen</h3>
49
- <p>Ruft den Status des Schalters ab, indem folgende Parameter an das <b>msg.payload</b> übergeben werden:</p>
50
- <dl class="message-properties">
51
- <dt class="optional">status<span class="property-type">any</span></dt>
52
- <dd>Gibt den aktuellen Status des Nodes zurück, ohne eine Aktion durchzuführen</dd>
53
- </dl>
54
-
55
- <h3>Universalmodus (optional)</h3>
56
- <p>Definiert die Sensor-ID auf der Hue Bridge manuell, wenn sie nicht in den Node-Eigenschaften konfiguriert ist:</p>
57
- <dl class="message-properties">
58
- <dt>msg.topic<span class="property-type">int</span></dt>
59
- <dd>Manuelle Definition der Sensor-ID</dd>
60
- </dl>
61
-
62
- <h3>Letzte Zustandsinformationen</h3>
63
- <p>Dieser Node schickt auch die gesamten letzten Zustandsinformationen (vor dem Update) in das <b>msg.lastState</b>-Objekt. Dieses kann entweder false (Boolean) or die Objekte payload (msg.lastState.payload) und info (msg.lastState.info) beinhalten. Der Rückgabewert "false" wird nur dann gesendet, wenn es keinen letzten Zustand gab oder der Node neu erstellt oder gestartet wurde.</p>
64
- </script>
@@ -1,64 +0,0 @@
1
- <script type="text/x-red" data-help-name="hue-switch">
2
- <p>Hue Dimmschalter um Schaltererignisse zu empfangen.</p>
3
-
4
- <h3>Einrichtung</h3>
5
- <p>Wählen Sie die vorkonfigurierte Hue Bridge und klicken Sie auf die Suchschaltfläche, um alle verfügbaren Dimmschalter zu finden. Geben Sie den Namen manuell ein oder behalten Sie den Standardgerätenamen bei. Beachten Sie, dass Ereignisse nur bei der Bereitstellung (einmalig) und auf Knopfdruck gesendet werden. Bei Bedarf können alle Statusaktualisierungen dieses Nodes durch Aktivieren der Option "Mitteilungen ignorieren" ignoriert werden. Wenn Sie diesen Node im Universalmodus betreiben, können Sie optional auch auswählen, ob dieser Node alle Mitteilungen von anderen Nodes desselben Typs empfangen und ausgeben soll.</p>
6
-
7
- <h3>Dimmschalter-Ereignisse</h3>
8
- <p>Die vom Dimmschalter gesendete Ereignismeldung enthält die folgenden Daten im Objekt <b>msg.payload</b>:</p>
9
- <dl class="message-properties">
10
- <dt>button<span class="property-type">int</span></dt>
11
- <dd>ID der gedrückten Taste</dd>
12
-
13
- <dt>name<span class="property-type">string</span></dt>
14
- <dd>Lesbarer Name der gedrückten Taste (On, Dim Up, Dim Down, Off)</dd>
15
-
16
- <dt>action<span class="property-type">string</span></dt>
17
- <dd>Lesbare gedrückte Tastenaktion (pressed, holded, short released, long released)</dd>
18
-
19
- <dt>updated<span class="property-type">string</span></dt>
20
- <dd>ISO 8601 Datum des letzten Zeitpunkts, zu dem eine Taste gedrückt wurde</dd>
21
- </dl>
22
-
23
- <h3>Zusätzliche Sensorinformationen</h3>
24
- <p>Zusätzliche Informationen zum Gerät werden an das Objekt <b>msg.info</b> gesendet:</p>
25
- <dl class="message-properties">
26
- <dt>id<span class="property-type">int</span></dt>
27
- <dd>Numerische ID des Sensors, wie auf der Bridge registriert</dd>
28
-
29
- <dt>uniqueId<span class="property-type">string</span></dt>
30
- <dd>Eindeutige ID des Sensors (normalerweise Hardware-ID)</dd>
31
-
32
- <dt>name<span class="property-type">string</span></dt>
33
- <dd>Name des Sensors</dd>
34
-
35
- <dt>type<span class="property-type">string</span></dt>
36
- <dd>Sensor-Typ (z.B. Daylight, CLIPTemperature, ZGPSwitch)</dd>
37
-
38
- <dt>softwareVersion<span class="property-type">float</span></dt>
39
- <dd>Softwareversion des Sensors</dd>
40
-
41
- <dt>battery<span class="property-type">int</span></dt>
42
- <dd>Aktueller Batteriestand des Sensors in Prozent</dd>
43
-
44
- <dt>model<span class="property-type">object</span></dt>
45
- <dd>Das Modellobjekt des Sensors enthält modellspezifische Informationen wie model.id, model.manufacturer, model.name und model.type</dd>
46
- </dl>
47
-
48
- <h3>Status abfragen</h3>
49
- <p>Ruft den Status des Schalters ab, indem folgende Parameter an das <b>msg.payload</b> übergeben werden:</p>
50
- <dl class="message-properties">
51
- <dt class="optional">status<span class="property-type">any</span></dt>
52
- <dd>Gibt den aktuellen Status des Nodes zurück, ohne eine Aktion durchzuführen</dd>
53
- </dl>
54
-
55
- <h3>Universalmodus (optional)</h3>
56
- <p>Definiert die Sensor-ID auf der Hue Bridge manuell, wenn sie nicht in den Node-Eigenschaften konfiguriert ist:</p>
57
- <dl class="message-properties">
58
- <dt>msg.topic<span class="property-type">int</span></dt>
59
- <dd>Manuelle Definition der Sensor-ID</dd>
60
- </dl>
61
-
62
- <h3>Letzte Zustandsinformationen</h3>
63
- <p>Dieser Node schickt auch die gesamten letzten Zustandsinformationen (vor dem Update) in das <b>msg.lastState</b>-Objekt. Dieses kann entweder false (Boolean) or die Objekte payload (msg.lastState.payload) und info (msg.lastState.info) beinhalten. Der Rückgabewert "false" wird nur dann gesendet, wenn es keinen letzten Zustand gab oder der Node neu erstellt oder gestartet wurde.</p>
64
- </script>
@@ -1,35 +0,0 @@
1
- {
2
- "hue-switch":
3
- {
4
- "config":
5
- {
6
- "name": "Name",
7
- "input-name": "Name des Dimmschalters",
8
- "skipevents": "Mitteilungen ignorieren",
9
- "skipevents-node": "Ignoriere die Mitteilungen des Nodes",
10
- "searching": "Suche nach Dimmschaltern…",
11
- "none-found": "Keine Dimmschalter gefunden!",
12
- "unknown-error": "Etwas ist schief gelaufen. Bitte versuchen Sie es erneut.",
13
- "switch": "Schalter",
14
- "universalevents": "Universelle Mitteilungen",
15
- "universalevents-node": "Empfängt alle Mitteilungen anderer Nodes desselben Typs (nur im Universalmodus)"
16
- },
17
- "node":
18
- {
19
- "title": "Hue Dimmschalter",
20
- "not-configured": "nicht konfiguriert",
21
- "waiting": "warte…",
22
- "button-on": "An",
23
- "button-dimup": "Dimmen (heller)",
24
- "button-dimdown": "Dimmen (dunkler)",
25
- "button-off": "Aus",
26
- "action-pressed": "gedrückt",
27
- "action-holded": "gehalten",
28
- "action-shortreleased": "kurz gedrückt",
29
- "action-longreleased": "lange gedruckt",
30
- "input": "Statusabfrage",
31
- "output": "gedrückte Taste",
32
- "universal": "Universalmodus"
33
- }
34
- }
35
- }
@@ -1,55 +0,0 @@
1
- <script type="text/x-red" data-help-name="hue-tap">
2
- <p>Hue Tap Schalter um Schaltererignisse zu empfangen.</p>
3
-
4
- <h3>Einrichtung</h3>
5
- <p>Wählen Sie die vorkonfigurierte Hue Bridge und klicken Sie auf die Suchschaltfläche, um alle verfügbaren Tap Schalter zu finden. Geben Sie den Namen manuell ein oder behalten Sie den Standardgerätenamen bei. Beachten Sie, dass Ereignisse nur bei der Bereitstellung (einmalig) und auf Knopfdruck gesendet werden. Bei Bedarf können alle Statusaktualisierungen dieses Nodes durch Aktivieren der Option "Mitteilungen ignorieren" ignoriert werden. Wenn Sie diesen Node im Universalmodus betreiben, können Sie optional auch auswählen, ob dieser Node alle Mitteilungen von anderen Nodes desselben Typs empfangen und ausgeben soll.</p>
6
-
7
- <h3>Tap-Ereignisse</h3>
8
- <p>Die vom Tap Schalter gesendete Ereignismeldung enthält die folgenden Daten im Objekt <b>msg.payload</b>:</p>
9
- <dl class="message-properties">
10
- <dt>button<span class="property-type">int</span></dt>
11
- <dd>Gedrückte Tastennummer von 1-4</dd>
12
-
13
- <dt>buttonAlt<span class="property-type">int</span></dt>
14
- <dd>Alternative Tastennummer (Rohversion)</dd>
15
-
16
- <dt>updated<span class="property-type">string</span></dt>
17
- <dd>ISO 8601 Datum des letzten Zeitpunkts, zu dem eine Taste gedrückt wurde</dd>
18
- </dl>
19
-
20
- <h3>Zusätzliche Sensorinformationen</h3>
21
- <p>Zusätzliche Informationen zum Sensor werden an das Objekt <b>msg.info</b> gesendet:</p>
22
- <dl class="message-properties">
23
- <dt>id<span class="property-type">int</span></dt>
24
- <dd>Numerische ID des Sensors, wie auf der Bridge registriert</dd>
25
-
26
- <dt>uniqueId<span class="property-type">string</span></dt>
27
- <dd>Eindeutige ID des Sensors (normalerweise Hardware-ID)</dd>
28
-
29
- <dt>name<span class="property-type">string</span></dt>
30
- <dd>Name des Sensors</dd>
31
-
32
- <dt>type<span class="property-type">string</span></dt>
33
- <dd>Sensor-Typ (z.B. Daylight, CLIPTemperature, ZGPSwitch)</dd>
34
-
35
- <dt>model<span class="property-type">object</span></dt>
36
- <dd>Das Modellobjekt des Sensors enthält modellspezifische Informationen wie model.id, model.manufacturer, model.name und model.type</dd>
37
- </dl>
38
-
39
- <h3>Status abfragen</h3>
40
- <p>Ruft den Status des Schalters ab, indem folgende Parameter an das <b>msg.payload</b> übergeben werden:</p>
41
- <dl class="message-properties">
42
- <dt class="optional">status<span class="property-type">any</span></dt>
43
- <dd>Gibt den aktuellen Status des Nodes zurück, ohne eine Aktion durchzuführen</dd>
44
- </dl>
45
-
46
- <h3>Universalmodus (optional)</h3>
47
- <p>Definiert die Sensor-ID auf der Hue Bridge manuell, wenn sie nicht in den Node-Eigenschaften konfiguriert ist:</p>
48
- <dl class="message-properties">
49
- <dt>msg.topic<span class="property-type">int</span></dt>
50
- <dd>Manuelle Definition der Sensor-ID</dd>
51
- </dl>
52
-
53
- <h3>Letzte Zustandsinformationen</h3>
54
- <p>Dieser Node schickt auch die gesamten letzten Zustandsinformationen (vor dem Update) in das <b>msg.lastState</b>-Objekt. Dieses kann entweder false (Boolean) or die Objekte payload (msg.lastState.payload) und info (msg.lastState.info) beinhalten. Der Rückgabewert "false" wird nur dann gesendet, wenn es keinen letzten Zustand gab oder der Node neu erstellt oder gestartet wurde.</p>
55
- </script>
@@ -1,27 +0,0 @@
1
- {
2
- "hue-tap":
3
- {
4
- "config":
5
- {
6
- "name": "Name",
7
- "input-name": "Name des Tap Schalters…",
8
- "skipevents": "Mitteilungen ignorieren",
9
- "skipevents-node": "Ignoriere die Mitteilungen des Nodes",
10
- "searching": "Suche nach Tap Schaltern…",
11
- "none-found": "Keine Tap Schalter gefunden!",
12
- "unknown-error": "Etwas ist schief gelaufen. Bitte versuchen Sie es erneut.",
13
- "universalevents": "Universelle Mitteilungen",
14
- "universalevents-node": "Empfängt alle Mitteilungen anderer Nodes desselben Typs (nur im Universalmodus)"
15
- },
16
- "node":
17
- {
18
- "title": "Hue Tap Schalter",
19
- "not-configured": "nicht konfiguriert",
20
- "waiting": "warte…",
21
- "pressed-button": "Taste #__button__ gedrückt",
22
- "input": "Statusabfrage",
23
- "output": "gedrückte Taste",
24
- "universal": "Universalmodus"
25
- }
26
- }
27
- }
@@ -1,64 +0,0 @@
1
- <script type="text/x-red" data-help-name="hue-button">
2
- <p>Hue Smart Button node to receive button events.</p>
3
-
4
- <h3>Setup</h3>
5
- <p>Select the preconfigured Hue Bridge and hit the search button to find all available Hue Smart Button devices. Type in the name manually or keep the default device name. Note that events will only sent on deploy (once) and if the button is pressed. If necessary, all status updates of this node can be ignored by activating the "Skip events" option. If you operate this node in universal mode, you can optionally also choose whether this node should receive and output all events from other nodes of the same type.</p>
6
-
7
- <h3>Button Events</h3>
8
- <p>The event message that the Hue Smart Button sends contains the following data in the <b>msg.payload</b> object:</p>
9
- <dl class="message-properties">
10
- <dt>button<span class="property-type">int</span></dt>
11
- <dd>Pressed button id, 1002 for normal press, 1003 for long press (release) and 1001 during long press.</dd>
12
-
13
- <dt>name<span class="property-type">string</span></dt>
14
- <dd>Human readable pressed button name (always On)</dd>
15
-
16
- <dt>action<span class="property-type">string</span></dt>
17
- <dd>Human readable pressed button action (short released, long released, holded)</dd>
18
-
19
- <dt>updated<span class="property-type">string</span></dt>
20
- <dd>ISO 8601 date string of the last time when the button was pressed</dd>
21
- </dl>
22
-
23
- <h3>Additional Sensor Info</h3>
24
- <p>Additional information about the device is going to be sent to the <b>msg.info</b> object:</p>
25
- <dl class="message-properties">
26
- <dt>id<span class="property-type">int</span></dt>
27
- <dd>Numerical id of the sensor as registered on the bridge</dd>
28
-
29
- <dt>uniqueId<span class="property-type">string</span></dt>
30
- <dd>Unique Id of the sensor (typically hardware id)</dd>
31
-
32
- <dt>name<span class="property-type">string</span></dt>
33
- <dd>Name for the sensor</dd>
34
-
35
- <dt>type<span class="property-type">string</span></dt>
36
- <dd>Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch)</dd>
37
-
38
- <dt>softwareVersion<span class="property-type">float</span></dt>
39
- <dd>Software version of the sensor</dd>
40
-
41
- <dt>battery<span class="property-type">int</span></dt>
42
- <dd>Current battery level of the Hue Switch in percent</dd>
43
-
44
- <dt>model<span class="property-type">object</span></dt>
45
- <dd>The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type</dd>
46
- </dl>
47
-
48
- <h3>Check status</h3>
49
- <p>Retrieves the status of the device by passing the following parameters to the <b>msg.payload</b>:</p>
50
- <dl class="message-properties">
51
- <dt class="optional">status<span class="property-type">any</span></dt>
52
- <dd>Returns the current status of the node without taking any action</dd>
53
- </dl>
54
-
55
- <h3>Universal Mode (optional)</h3>
56
- <p>Defines the sensor Id on the Hue Bridge manually if not configured in the node properties:</p>
57
- <dl class="message-properties">
58
- <dt>msg.topic<span class="property-type">int</span></dt>
59
- <dd>Manual definition of the sensor Id</dd>
60
- </dl>
61
-
62
- <h3>Last State Information</h3>
63
- <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>
64
- </script>
@@ -1,64 +0,0 @@
1
- <script type="text/x-red" data-help-name="hue-switch">
2
- <p>Hue Switch node to receive button events.</p>
3
-
4
- <h3>Setup</h3>
5
- <p>Select the preconfigured Hue Bridge and hit the search button to find all available Hue Switch devices. Type in the name manually or keep the default device name. Note that events will only sent on deploy (once) and if a button is pressed. If necessary, all status updates of this node can be ignored by activating the "Skip events" option. If you operate this node in universal mode, you can optionally also choose whether this node should receive and output all events from other nodes of the same type.</p>
6
-
7
- <h3>Switch Events</h3>
8
- <p>The event message that the Hue Switch sends contains the following data in the <b>msg.payload</b> object:</p>
9
- <dl class="message-properties">
10
- <dt>button<span class="property-type">int</span></dt>
11
- <dd>Pressed button id</dd>
12
-
13
- <dt>name<span class="property-type">string</span></dt>
14
- <dd>Human readable pressed button name (On, Dim Up, Dim Down, Off)</dd>
15
-
16
- <dt>action<span class="property-type">string</span></dt>
17
- <dd>Human readable pressed button action (pressed, holded, short released, long released)</dd>
18
-
19
- <dt>updated<span class="property-type">string</span></dt>
20
- <dd>ISO 8601 date string of the last time when a button was pressed</dd>
21
- </dl>
22
-
23
- <h3>Additional Sensor Info</h3>
24
- <p>Additional information about the device is going to be sent to the <b>msg.info</b> object:</p>
25
- <dl class="message-properties">
26
- <dt>id<span class="property-type">int</span></dt>
27
- <dd>Numerical id of the sensor as registered on the bridge</dd>
28
-
29
- <dt>uniqueId<span class="property-type">string</span></dt>
30
- <dd>Unique Id of the sensor (typically hardware id)</dd>
31
-
32
- <dt>name<span class="property-type">string</span></dt>
33
- <dd>Name for the sensor</dd>
34
-
35
- <dt>type<span class="property-type">string</span></dt>
36
- <dd>Sensor type (e.g. Daylight, CLIPTemperature, ZGPSwitch)</dd>
37
-
38
- <dt>softwareVersion<span class="property-type">float</span></dt>
39
- <dd>Software version of the sensor</dd>
40
-
41
- <dt>battery<span class="property-type">int</span></dt>
42
- <dd>Current battery level of the Hue Switch in percent</dd>
43
-
44
- <dt>model<span class="property-type">object</span></dt>
45
- <dd>The model object of the sensor includes model specific information like the model.id, model.manufacturer, model.name and model.type</dd>
46
- </dl>
47
-
48
- <h3>Check status</h3>
49
- <p>Retrieves the status of the device by passing the following parameters to the <b>msg.payload</b>:</p>
50
- <dl class="message-properties">
51
- <dt class="optional">status<span class="property-type">any</span></dt>
52
- <dd>Returns the current status of the node without taking any action</dd>
53
- </dl>
54
-
55
- <h3>Universal Mode (optional)</h3>
56
- <p>Defines the sensor Id on the Hue Bridge manually if not configured in the node properties:</p>
57
- <dl class="message-properties">
58
- <dt>msg.topic<span class="property-type">int</span></dt>
59
- <dd>Manual definition of the sensor Id</dd>
60
- </dl>
61
-
62
- <h3>Last State Information</h3>
63
- <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>
64
- </script>