node-red-contrib-knx-ultimate 2.2.3 → 2.2.5

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.
@@ -22,19 +22,20 @@ module.exports = function (RED) {
22
22
  node.formatmultiplyvalue = 1;
23
23
  node.formatnegativevalue = "leave";
24
24
  node.formatdecimalsvalue = 2;
25
+ node.hueDevice = config.hueDevice;
25
26
 
26
27
  // Used to call the status update from the config node.
27
- node.setNodeStatus = ({ fill, shape, text, payload }) => {};
28
+ node.setNodeStatus = ({ fill, shape, text, payload }) => { };
28
29
  // Used to call the status update from the HUE config node.
29
30
  node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
30
- if (payload === undefined) return;
31
+ if (payload === undefined) payload = '';
31
32
  const dDate = new Date();
32
33
  payload = typeof payload === "object" ? JSON.stringify(payload) : payload.toString();
33
34
  node.status({ fill, shape, text: `${text} ${payload} (${dDate.getDate()}, ${dDate.toLocaleTimeString()})` });
34
35
  };
35
36
 
36
37
  // This function is called by the knx-ultimate config node, to output a msg.payload.
37
- node.handleSend = (msg) => {};
38
+ node.handleSend = (msg) => { };
38
39
 
39
40
  node.handleSendHUE = (_event) => {
40
41
  try {
@@ -91,7 +92,7 @@ module.exports = function (RED) {
91
92
  node.serverHue.addClient(node);
92
93
  }
93
94
 
94
- node.on("input", (msg) => {});
95
+ node.on("input", (msg) => { });
95
96
 
96
97
  node.on("close", (done) => {
97
98
  if (node.server) {
@@ -24,6 +24,7 @@ module.exports = function (RED) {
24
24
  node.formatmultiplyvalue = 1;
25
25
  node.formatnegativevalue = 'leave';
26
26
  node.formatdecimalsvalue = 2;
27
+ node.hueDevice = config.hueDevice;
27
28
 
28
29
  // Used to call the status update from the config node.
29
30
  node.setNodeStatus = ({ fill, shape, text, payload }) => {
@@ -31,7 +32,7 @@ module.exports = function (RED) {
31
32
  };
32
33
  // Used to call the status update from the HUE config node.
33
34
  node.setNodeStatusHue = ({ fill, shape, text, payload }) => {
34
- if (payload === undefined) return;
35
+ if (payload === undefined) payload = '';
35
36
  const dDate = new Date();
36
37
  payload = typeof payload === 'object' ? JSON.stringify(payload) : payload.toString();
37
38
  node.status({ fill, shape, text: text + ' ' + payload + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' });
@@ -25,6 +25,7 @@ module.exports = function (RED) {
25
25
  node.formatdecimalsvalue = 2;
26
26
  node.brightnessState = 0;
27
27
  node.isTimerDimStopRunning = false;
28
+ node.hueDevice = config.hueDevice;
28
29
 
29
30
  // Used to call the status update from the config node.
30
31
  node.setNodeStatus = ({
@@ -35,7 +36,7 @@ module.exports = function (RED) {
35
36
  node.setNodeStatusHue = ({
36
37
  fill, shape, text, payload,
37
38
  }) => {
38
- if (payload === undefined) return;
39
+ if (payload === undefined) payload = '';
39
40
  const dDate = new Date();
40
41
  payload = typeof payload === 'object' ? JSON.stringify(payload) : payload.toString();
41
42
  node.status({ fill, shape, text: `${text} ${payload} (${dDate.getDate()}, ${dDate.toLocaleTimeString()})` });
@@ -22,6 +22,7 @@ module.exports = function (RED) {
22
22
  node.formatmultiplyvalue = 1;
23
23
  node.formatnegativevalue = 'leave';
24
24
  node.formatdecimalsvalue = 2;
25
+ node.hueDevice = config.hueDevice;
25
26
 
26
27
  // Used to call the status update from the config node.
27
28
  node.setNodeStatus = ({
@@ -33,7 +34,7 @@ module.exports = function (RED) {
33
34
  node.setNodeStatusHue = ({
34
35
  fill, shape, text, payload,
35
36
  }) => {
36
- if (payload === undefined) return;
37
+ if (payload === undefined) payload = '';
37
38
  const dDate = new Date();
38
39
  payload = typeof payload === 'object' ? JSON.stringify(payload) : payload.toString();
39
40
  node.status({ fill, shape, text: `${text} ${payload} (${dDate.getDate()}, ${dDate.toLocaleTimeString()})` });
@@ -84,9 +85,7 @@ module.exports = function (RED) {
84
85
  }
85
86
  if (node.serverHue) {
86
87
  node.serverHue.removeClient(node);
87
- if (node.serverHue !== null && node.serverHue.hueManager !== null) {
88
- node.serverHue.addClient(node);
89
- }
88
+ node.serverHue.addClient(node);
90
89
  }
91
90
 
92
91
  node.on('input', (msg) => {
@@ -334,7 +334,7 @@ module.exports = function (RED) {
334
334
  node.send({ topic: node.name || node.topic, operation: 'Enabled', payload: node.sheddingStage })
335
335
  }
336
336
 
337
- // 24/04/2021 if payload is read or the output type is set to "read", do a read
337
+ // 24/04/2021 if payload is read or the Telegram type is set to "read", do a read
338
338
  if ((msg.hasOwnProperty('readstatus') && msg.readstatus === true)) {
339
339
  node.initialReadAllDevicesInRules()
340
340
  }
@@ -8,21 +8,21 @@
8
8
  "node-input-topic": "Group Addr.",
9
9
  "node-input-outputtopic": "Topic",
10
10
  "node-input-dpt": "Datapoint",
11
- "node-input-initialread": "Read status upon connection",
11
+ "node-input-initialread": "Read status on start",
12
12
  "node-input-initialread0": "No",
13
- "node-input-initialread1": "Read from KNX BUS (to receive the response from BUS, enable also -React to event GroupValue response-)",
13
+ "node-input-initialread1": "Read from KNX BUS (to receive the response from BUS, enable also -React to response telegrams-)",
14
14
  "node-input-initialread2": "Read the last value saved to file prior to disconnection",
15
- "node-input-initialread3": "Read the last value saved to file prior to disconnection. If the file is missing, read from KNX BUS (to receive the response from BUS, enable also -React to event GroupValue response-)",
16
- "node-input-notifyreadrequest": "React to event GroupValue read",
17
- "node-input-notifyresponse": "React to event GroupValue response",
18
- "node-input-notifywrite": "React to event GroupValue write",
15
+ "node-input-initialread3": "Read the last value saved to file prior to disconnection. If the file is missing, read from KNX BUS (to receive the response from BUS, enable also -React to response telegrams-)",
16
+ "node-input-notifyreadrequest": "React to read telegrams",
17
+ "node-input-notifyresponse": "React to response telegrams",
18
+ "node-input-notifywrite": "React to write telegrams",
19
19
  "node-input-notifyreadrequestalsorespondtobus": "Auto send node value as response to the BUS",
20
20
  "node-input-notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "If value is undefined, send",
21
21
  "node-input-listenallga": "Universal mode (listen to all Group Addresses)",
22
22
  "node-input-name": "Node Name",
23
- "node-input-outputtype": "Output Type",
24
- "node-input-outputRBE": "Send payload to BUS only if changed (RBE filter)",
25
- "node-input-inputRBE": "React only if payload from BUS is changed (RBE filter)",
23
+ "node-input-outputtype": "Telegram type",
24
+ "node-input-outputRBE": "Send payload to KNX only if changed (RBE filter)",
25
+ "node-input-inputRBE": "React only by changed payload (RBE filter)",
26
26
  "node-input-formatmultiplyvalue": "Multiply",
27
27
  "node-input-formatnegativevalue": "Negatives",
28
28
  "node-input-formatdecimalsvalue": "Decimals",
@@ -36,8 +36,8 @@
36
36
  "Advancedoptions": "Advanced options",
37
37
  "Formatting": "Format INPUT (datagram coming from the KNX BUS)",
38
38
  "Operations": "NUMERIC VALUES (operations are performed in order)",
39
- "OUTPUT": "OUTPUT (sends datagram to the KNX BUS)",
40
- "INPUT": "INPUT (listen to datagram from the KNX BUS)",
39
+ "OUTPUT": "CONTROL (payload to KNX bus)",
40
+ "INPUT": "STATUS (payload from KNX BUS)",
41
41
  "NUMERICVALUES": "NUMERIC VALUES (operations are performed in order)",
42
42
  "noETSWarning": "You haven't imported the ETS csv file. <br/> The node will work as blind transmitter/receiver. <a href=\"https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/2.-Node-Configuration\" target='_blank'>Click here for help about that</a>.",
43
43
  "notify-DPT3007": "You selected a relative DIM. Please <a target='_blank' href='https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/-Sample---Dimming'>click here to view this sample</a> and learn how to handle such payload.",
@@ -11,7 +11,7 @@
11
11
  <table style="font-size:12px">
12
12
  <tr>
13
13
  <td><img src="https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/greendot.png"></img></td>
14
- <td>React to event GroupValue write</td>
14
+ <td>React to write telegrams</td>
15
15
  </tr>
16
16
  <tr>
17
17
  <td><img src="https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/greenring.png"></img></td>
@@ -19,7 +19,7 @@
19
19
  </tr>
20
20
  <tr>
21
21
  <td><img src="https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/bluedot.png"></img></td>
22
- <td>React to event GroupValue response.</td>
22
+ <td>React to response telegrams.</td>
23
23
  </tr>
24
24
  <tr>
25
25
  <td><img src="https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/bluering.png"></img></td>
@@ -27,7 +27,7 @@
27
27
  </tr>
28
28
  <tr>
29
29
  <td><img src="https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/greudot.png"></img></td>
30
- <td>React to event GroupValue read.</td>
30
+ <td>React to read telegrams.</td>
31
31
  </tr>
32
32
  <tr>
33
33
  <td><img src="https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/greyring.png"></img></td>
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=16.0.0"
5
5
  },
6
- "version": "2.2.3",
6
+ "version": "2.2.5",
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 control.",
8
8
  "dependencies": {
9
9
  "binary-parser": "2.2.1",