node-red-contrib-knx-ultimate 2.0.21 → 2.1.1
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/CHANGELOG.md +8 -0
- package/nodes/knxUltimateHueButton.html +1 -1
- package/nodes/knxUltimateHueLight.html +1 -1
- package/nodes/knxUltimateHueLightSensor.html +1 -1
- package/nodes/knxUltimateHueMotion.html +2 -2
- package/nodes/knxUltimateHueTapDial.html +6 -6
- package/nodes/knxUltimateHueTapDial.js +22 -0
- package/nodes/knxUltimateHueTemperatureSensor.html +1 -1
- package/nodes/utils/hueUtils.js +2 -2
- package/package.json +1 -1
- package/.vscode/launch.json +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 2.1.1</b> - June 2023<br/>
|
|
11
|
+
- NEW: Hue Tap Dial node: setting a color datapoint(232.600), the rotary dial will send a random color to the KNX group address.<br/>
|
|
12
|
+
</p>
|
|
13
|
+
<p>
|
|
14
|
+
<b>Version 2.1.0</b> - June 2023<br/>
|
|
15
|
+
- HUE nodes exited the BETA version. You can now start using HUE nodes.<br/>
|
|
16
|
+
</p>
|
|
9
17
|
<p>
|
|
10
18
|
<b>Version 2.0.21</b> - June 2023<br/>
|
|
11
19
|
- HUE: CAUTION POSSIBLE BREAKING CHANGES TO THE HUE NODES. PLEASE BE AWARE THAT HUE NODES ARE STILL IN BETA<br/>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
label: function () {
|
|
21
21
|
return (this.name);
|
|
22
22
|
},
|
|
23
|
-
paletteLabel: "Hue Motion
|
|
23
|
+
paletteLabel: "Hue Motion",
|
|
24
24
|
// button: {
|
|
25
25
|
// enabled: function() {
|
|
26
26
|
// // return whether or not the button is enabled, based on the current
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
<br />
|
|
164
164
|
<br />
|
|
165
165
|
<p align="center">
|
|
166
|
-
<i class="fa-solid fa-person-walking fa-8x"></i>
|
|
166
|
+
<i class="fa-solid fa-person-walking fa-shake fa-8x"></i>
|
|
167
167
|
</p>
|
|
168
168
|
<br />
|
|
169
169
|
<label for="node-input-server" >
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
label: function () {
|
|
21
21
|
return (this.name);
|
|
22
22
|
},
|
|
23
|
-
paletteLabel: "Hue Tap Dial
|
|
23
|
+
paletteLabel: "Hue Tap Dial",
|
|
24
24
|
// button: {
|
|
25
25
|
// enabled: function() {
|
|
26
26
|
// // return whether or not the button is enabled, based on the current
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
// ########################
|
|
70
70
|
$.getJSON('knxUltimateDpts', (data) => {
|
|
71
71
|
data.forEach(dpt => {
|
|
72
|
-
if (dpt.value.startsWith("3.007") || dpt.value.startsWith("5.
|
|
72
|
+
if (dpt.value.startsWith("3.007") || dpt.value.startsWith("5.001") || dpt.value.startsWith("232.600")) {
|
|
73
73
|
$("#node-input-dptrepeat").append($("<option></option>")
|
|
74
74
|
.attr("value", dpt.value)
|
|
75
75
|
.text(dpt.text))
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
response($.map(data, function (value, key) {
|
|
88
88
|
var sSearch = (value.ga + " (" + value.devicename + ") DPT" + value.dpt);
|
|
89
89
|
if (fullSearch(sSearch, request.term)) {
|
|
90
|
-
if (value.dpt.startsWith('5.001') || value.dpt.startsWith('3.007')) {
|
|
90
|
+
if (value.dpt.startsWith('5.001') || value.dpt.startsWith('3.007') || value.dpt.startsWith("232.600")) {
|
|
91
91
|
return {
|
|
92
92
|
label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
|
|
93
93
|
value: value.ga // Value
|
|
@@ -231,8 +231,8 @@
|
|
|
231
231
|
|
|
232
232
|
The Tap Dial device has 4 buttons and 1 rotary knob.
|
|
233
233
|
You can find the 4 buttons in the **Hue Button node**, not here!
|
|
234
|
-
The rotary service of the Tap Dial, can send a DIM (Datapoint 3.007)
|
|
235
|
-
to the selected group address.
|
|
234
|
+
The rotary service of the Tap Dial, can send a DIM (Datapoint 3.007), absolute brightness (Datapoint 5.001) to the KNX bus,
|
|
235
|
+
or a random color (Datapoint 232.600) to the selected group address.
|
|
236
236
|
|
|
237
237
|
**General**
|
|
238
238
|
|Property|Description|
|
|
@@ -249,7 +249,7 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
249
249
|
|
|
250
250
|
|Property|Description|
|
|
251
251
|
|--|--|
|
|
252
|
-
| Rotate | This command is used either to send DIM (increase/decrease)
|
|
252
|
+
| Rotate | This command is used either to send DIM (increase/decrease), aboslute brightness, or a random color, depending on the selected datapoint. |
|
|
253
253
|
|
|
254
254
|
### Outputs
|
|
255
255
|
|
|
@@ -78,6 +78,17 @@ module.exports = function (RED) {
|
|
|
78
78
|
//0 – maximum: 32767
|
|
79
79
|
node.brightnessState < 100 ? node.brightnessState += 20 : node.brightnessState = 100
|
|
80
80
|
knxMsgPayload.payload = node.brightnessState
|
|
81
|
+
} else if (knxMsgPayload.dpt.startsWith('232.600')) {
|
|
82
|
+
// Random color
|
|
83
|
+
knxMsgPayload.payload = { red: getRandomIntInclusive(0, 255), green: getRandomIntInclusive(0, 255), blue: getRandomIntInclusive(0, 255) }
|
|
84
|
+
function getRandomIntInclusive(min, max) {
|
|
85
|
+
min = Math.ceil(min);
|
|
86
|
+
max = Math.floor(max);
|
|
87
|
+
return Math.floor(Math.random() * (max - min + 1) + min); // The maximum is inclusive and the minimum is inclusive
|
|
88
|
+
}
|
|
89
|
+
// Send to KNX bus
|
|
90
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
|
|
91
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX start Dim' + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
81
92
|
}
|
|
82
93
|
} else if (_event.relative_rotary.last_event.rotation.direction === 'counter_clock_wise') {
|
|
83
94
|
if (knxMsgPayload.dpt.startsWith('3.007')) {
|
|
@@ -91,6 +102,17 @@ module.exports = function (RED) {
|
|
|
91
102
|
} else if (knxMsgPayload.dpt.startsWith('5.001')) {
|
|
92
103
|
node.brightnessState > 0 ? node.brightnessState -= 20 : node.brightnessState = 0
|
|
93
104
|
knxMsgPayload.payload = node.brightnessState
|
|
105
|
+
} else if (knxMsgPayload.dpt.startsWith('232.600')) {
|
|
106
|
+
// Random color
|
|
107
|
+
knxMsgPayload.payload = { red: getRandomIntInclusive(0, 255), green: getRandomIntInclusive(0, 255), blue: getRandomIntInclusive(0, 255) }
|
|
108
|
+
function getRandomIntInclusive(min, max) {
|
|
109
|
+
min = Math.ceil(min);
|
|
110
|
+
max = Math.floor(max);
|
|
111
|
+
return Math.floor(Math.random() * (max - min + 1) + min); // The maximum is inclusive and the minimum is inclusive
|
|
112
|
+
}
|
|
113
|
+
// Send to KNX bus
|
|
114
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
|
|
115
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX start Dim' + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
94
116
|
}
|
|
95
117
|
}
|
|
96
118
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
label: function () {
|
|
21
21
|
return (this.name);
|
|
22
22
|
},
|
|
23
|
-
paletteLabel: "Hue Temperature Sensor
|
|
23
|
+
paletteLabel: "Hue Temperature Sensor",
|
|
24
24
|
// button: {
|
|
25
25
|
// enabled: function() {
|
|
26
26
|
// // return whether or not the button is enabled, based on the current
|
package/nodes/utils/hueUtils.js
CHANGED
|
@@ -136,10 +136,10 @@ class classHUE extends EventEmitter {
|
|
|
136
136
|
retArray.push({ name: 'Light Level: ' + linkedDevName + (Room !== undefined ? ', room ' + Room.metadata.name : ''), id: device.id })
|
|
137
137
|
}
|
|
138
138
|
if (_rtype === 'temperature') {
|
|
139
|
-
retArray.push({ name: '
|
|
139
|
+
retArray.push({ name: 'Temperature: ' + linkedDevName + (Room !== undefined ? ', room ' + Room.metadata.name : ''), id: device.id })
|
|
140
140
|
}
|
|
141
141
|
if (_rtype === 'scene') {
|
|
142
|
-
retArray.push({ name: '
|
|
142
|
+
retArray.push({ name: 'Scene: ' + linkedDevName + (Room !== undefined ? ', room ' + Room.metadata.name : ''), id: device.id })
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
})
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=14.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.1.1",
|
|
7
7
|
"description": "Control your KNX intallation via Node-Red! Single Node KNX IN/OUT with optional ETS group address importer. Easy to use and highly configurable. With integrated Philips HUE devices handling.",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"mkdirp": "1.0.4",
|
package/.vscode/launch.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Usare IntelliSense per informazioni sui possibili attributi.
|
|
3
|
-
// Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti.
|
|
4
|
-
// Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"type": "node",
|
|
9
|
-
"request": "launch",
|
|
10
|
-
"name": "Avvia programma",
|
|
11
|
-
"skipFiles": [
|
|
12
|
-
"<node_internals>/**"
|
|
13
|
-
],
|
|
14
|
-
"program": "${workspaceFolder}/nodes/utils/hueUtils.js"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|