node-red-contrib-knx-ultimate 3.0.7 → 3.0.8

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 CHANGED
@@ -6,6 +6,10 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ **Version 3.0.8** - August 2024<br/>
10
+ - Warning: Node-Red version **equals or major than 3.1.1** is needed to run this node.<br/>
11
+ - KNX Auto Responder node (BETA): fixed issue with malformed responses. Please be aware that until the node exits beta, there can be breaking changes.<br/>
12
+
9
13
  **Version 3.0.7** - August 2024<br/>
10
14
  - Warning: Node-Red version **equals or major than 3.1.1** is needed to run this node.<br/>
11
15
  - KNX Auto Responder node (BETA): at start, it loads the last states saved in a persistent file. Please be aware that until the node exits beta, there can be breaking changes.<br/>
@@ -162,10 +162,11 @@ module.exports = function (RED) {
162
162
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(`knxUltimateAutoResponder: var oGa = node.exposedGAs.find(ga => ga.address === msg.knx.destination) ${error.stack}`);
163
163
  }
164
164
  if (oGa !== undefined) {
165
+ let decodedPayload;
165
166
  try {
166
167
  // Don't care about the decoded payload, because knxUltimate-config could pass a TryToFindDatapoint from raw data
167
168
  // Take only RAW data and decode it with the dpt specified by the commandText directive
168
- const decodedPayload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(oGa.dpt));
169
+ decodedPayload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(oGa.dpt));
169
170
  } catch (error) {
170
171
  node.status({ fill: 'red', shape: 'dot', text: 'const decodedPayload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(oGa.dpt)); ' + error.message, payload: '', dpt: '', devicename: '' });
171
172
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(`knxUltimateAutoResponder: const decodedPayload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(oGa.dpt)); ${error.stack}`);
@@ -185,8 +186,12 @@ module.exports = function (RED) {
185
186
  }
186
187
  if (retVal !== undefined) {
187
188
  const dDate = new Date()
188
- node.status({ fill: 'blue', shape: 'dot', text: 'Respond ' + oFoundGA.address + ' => ' + retVal + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
189
- node.server.writeQueueAdd({ grpaddr: oFoundGA.address, payload: retVal, dpt: oFoundGA.dpt, outputtype: 'response', nodecallerid: node.id });
189
+ if (oFoundGA.address !== undefined && oFoundGA.dpt !== undefined && retVal !== undefined) {
190
+ node.server.writeQueueAdd({ grpaddr: oFoundGA.address, payload: retVal, dpt: oFoundGA.dpt, outputtype: 'response', nodecallerid: node.id });
191
+ node.status({ fill: 'blue', shape: 'dot', text: 'Respond ' + oFoundGA.address + ' => ' + retVal + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
192
+ } else {
193
+ node.status({ fill: 'yellow', shape: 'ring', text: 'Issue responding ' + oFoundGA.address + ' => ' + retVal + ' (' + dDate.getDate() + ', ' + dDate.toLocaleTimeString() + ')' })
194
+ }
190
195
  }
191
196
  } catch (error) {
192
197
  if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.error(`knxUltimateAutoResponder: after bFound ${error.stack}`);
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=16.0.0"
5
5
  },
6
- "version": "3.0.7",
6
+ "version": "3.0.8",
7
7
  "description": "Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.",
8
8
  "dependencies": {
9
9
  "binary-parser": "2.2.1",