node-red-contrib-knx-ultimate 2.0.0 → 2.0.2
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 +9 -0
- package/KNXEngine/dptlib/index.js +1 -1
- package/KNXUltimate.code-workspace +11 -1
- package/README.md +1 -1
- package/img/hue.png +0 -0
- package/img/hueButton.png +0 -0
- package/img/hueLight.png +0 -0
- package/img/knx.png +0 -0
- package/nodes/hue-config.js +20 -6
- package/nodes/knxUltimateHueButton.html +586 -0
- package/nodes/knxUltimateHueButton.js +159 -0
- package/nodes/knxUltimateHueLight.html +363 -55
- package/nodes/knxUltimateHueLight.js +70 -13
- package/nodes/locales/en-US/knxUltimateHueLight.json +3 -3
- package/nodes/utils/hueColorConverter.js +237 -0
- package/nodes/utils/hueUtils.js +37 -21
- package/package.json +6 -4
- package/nodes/locales/en-US/knxUltimateHueLight.html +0 -10
- /package/nodes/locales/{de → de-disabled}/hue-config.html +0 -0
- /package/nodes/locales/{de → de-disabled}/hue-config.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimate-config.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimate-config.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimate.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimate.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateAlerter.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateAlerter.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateGlobalContext.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateGlobalContext.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateHueLight.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateHueLight.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateLoadControl.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateLoadControl.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateLogger.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateLogger.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateSceneController.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateSceneController.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateViewer.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateViewer.json +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateWatchDog.html +0 -0
- /package/nodes/locales/{de → de-disabled}/knxUltimateWatchDog.json +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 2.0.2</b> - June 2023<br/>
|
|
11
|
+
- NEW: HUE Button node. All HUE integrations are in BETA.<br/>
|
|
12
|
+
- Slowly integrating the help in the node-red help section.<br/>
|
|
13
|
+
</p>
|
|
14
|
+
<p>
|
|
15
|
+
<b>Version 2.0.1</b> - June 2023<br/>
|
|
16
|
+
- NEW: more KNX group addresses in the HUE Light node<br/>
|
|
17
|
+
</p>
|
|
9
18
|
<p>
|
|
10
19
|
<b>Version 2.0.0</b> - June 2023<br/>
|
|
11
20
|
- NEW Added HUE Light node. More HUE nodes to come. Please feel free to try it.<br/>
|
|
@@ -95,7 +95,7 @@ dpts.populateAPDU = function (value, apdu, dptid) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
// generic APDU is assumed to convey an unsigned integer of arbitrary bitlength
|
|
98
|
-
if (dpt.basetype.hasOwnProperty('signedness') && dpt.basetype.signedness
|
|
98
|
+
if (dpt.basetype.hasOwnProperty('signedness') && dpt.basetype.signedness === 'signed') {
|
|
99
99
|
apdu.data.writeIntBE(tgtvalue, 0, nbytes)
|
|
100
100
|
} else {
|
|
101
101
|
apdu.data.writeUIntBE(tgtvalue, 0, nbytes)
|
|
@@ -9,5 +9,15 @@
|
|
|
9
9
|
"path": "../node-red-contrib-knx-ultimate.wiki"
|
|
10
10
|
}
|
|
11
11
|
],
|
|
12
|
-
"settings": {
|
|
12
|
+
"settings": {
|
|
13
|
+
|
|
14
|
+
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
|
|
15
|
+
"editor.formatOnPaste": false, // required
|
|
16
|
+
"editor.formatOnType": false, // required
|
|
17
|
+
"editor.formatOnSave": true, // optional
|
|
18
|
+
"editor.formatOnSaveMode": "file", // required to format on save
|
|
19
|
+
"files.autoSave": "onFocusChange", // optional but recommended
|
|
20
|
+
"vs-code-prettier-eslint.prettierLast": "false" // set as "true" to run 'prettier' last not first
|
|
21
|
+
|
|
22
|
+
}
|
|
13
23
|
}
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ msg.payload = {red:255, green:200, blue:30} // Put some colors in our life
|
|
|
35
35
|
* **ALERTER node** [here](https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/Alerter-Configuration). With the Alerter node you can signal to a display or to the node-red-contrib-tts-ultimate node (audio feedback), whenever the selected devices are alerted, i.e. they have payload **true**.
|
|
36
36
|
* **LOAD CONTROL node** [here](https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/LoadControl-Configuration). Control your loads (Oven, Washing machine, etc..) and avoit shutting down the main voltage due to too high power consumption.
|
|
37
37
|
* **VIEWER node** [here](https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/knxUltimateViewer). View all Group Addresses and values of your KNX BUS, in the Node-Red Dashboard.
|
|
38
|
-
* **PHILIPS HUE nodeset** [here](https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/en-hue-configuration). Link HUE
|
|
38
|
+
* **PHILIPS HUE nodeset** [here](https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/en-hue-configuration). Link HUE devices to KNX in a simple way.
|
|
39
39
|
|
|
40
40
|
<br>
|
|
41
41
|
<br>
|
package/img/hue.png
ADDED
|
Binary file
|
|
Binary file
|
package/img/hueLight.png
ADDED
|
Binary file
|
package/img/knx.png
ADDED
|
Binary file
|
package/nodes/hue-config.js
CHANGED
|
@@ -81,7 +81,7 @@ module.exports = (RED) => {
|
|
|
81
81
|
|
|
82
82
|
// Init HUE Utility
|
|
83
83
|
node.hueManager = new hueClass(node.host, node.credentials.username, node.credentials.clientkey, config.bridgeid)
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
// Event clip V2
|
|
86
86
|
node.hueManager.on('event', _event => {
|
|
87
87
|
node.nodeClients.forEach(_oClient => {
|
|
@@ -90,7 +90,7 @@ module.exports = (RED) => {
|
|
|
90
90
|
})
|
|
91
91
|
})
|
|
92
92
|
|
|
93
|
-
// Endpoint
|
|
93
|
+
// Endpoint frontend
|
|
94
94
|
RED.httpAdmin.get('/KNXUltimateGetAllLightsHUE', RED.auth.needsPermission('hue-config.read'), function (req, res) {
|
|
95
95
|
try {
|
|
96
96
|
(async () => {
|
|
@@ -110,10 +110,24 @@ module.exports = (RED) => {
|
|
|
110
110
|
}
|
|
111
111
|
})
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
RED.httpAdmin.get('/KNXUltimateGetDevicesHUE', RED.auth.needsPermission('hue-config.read'), function (req, res) {
|
|
114
|
+
try {
|
|
115
|
+
(async () => {
|
|
116
|
+
try {
|
|
117
|
+
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
|
118
|
+
const jRet = await node.hueManager.getDevices(req.query.rtype)
|
|
119
|
+
res.json(jRet)
|
|
120
|
+
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
|
|
121
|
+
} catch (err) {
|
|
122
|
+
RED.log.error('Errore KNXUltimategetButtonsHUE non gestito ' + err.message)
|
|
123
|
+
res.json({ error: err.message })
|
|
124
|
+
}
|
|
125
|
+
})()
|
|
126
|
+
} catch (err) {
|
|
127
|
+
RED.log.error('Errore KNXUltimategetButtons bsonto ' + err.message)
|
|
128
|
+
res.json({ error: err.message })
|
|
129
|
+
}
|
|
130
|
+
})
|
|
117
131
|
|
|
118
132
|
node.addClient = (_Node) => {
|
|
119
133
|
// Check if node already exists
|