@halsystems/red-bacnet 1.1.1 → 1.1.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.2]
4
+ ### Change
5
+ - WritePoint to not fail if point not found in points config, only raise error
6
+
3
7
  ## [1.1.1]
4
8
  ### Added
5
9
  - Unit test for BACnet string points
package/common/bacnet.js CHANGED
@@ -288,6 +288,7 @@ module.exports = {
288
288
  return value;
289
289
  } catch (err) {
290
290
  failedCount++;
291
+ // if (readMethod < 1 && failedCount >= singleReadFailedRetry)
291
292
  if (failedCount >= singleReadFailedRetry)
292
293
  throw err
293
294
  }
@@ -221,7 +221,7 @@ module.exports = {
221
221
  task: async () => {
222
222
  return await smartReadProperty(
223
223
  this.client, v.device, v.points, this.readMethod,
224
- this.maxConcurrentSinglePointRead, 5, this.concurrentTaskDelay
224
+ this.maxConcurrentSinglePointRead, 10, this.concurrentTaskDelay
225
225
  );
226
226
  }
227
227
  }));
@@ -233,10 +233,14 @@ module.exports = {
233
233
  });
234
234
 
235
235
  if (missingPoints.length > 0) {
236
+ // do not fail writing, just log the missing points and remove them from writePoints
236
237
  this.eventEmitter.emit(EVENT_ERROR, errMsg(
237
238
  this.name, ERR_WRITE_POINT_NOT_FOUND, missingPoints
238
239
  ))
239
- return false
240
+
241
+ missingPoints.forEach(point => {
242
+ delete this.writePointDetails[point];
243
+ });
240
244
  }
241
245
 
242
246
  if (priorityErrList.length > 0) {
@@ -304,4 +308,4 @@ module.exports = {
304
308
  }
305
309
 
306
310
  }
307
- }
311
+ }
@@ -46,6 +46,7 @@ const decode = (buffer, offset) => {
46
46
  if (isValidIp && isValidPort && !isBroadcast && !isMulticast && !isZero) {
47
47
  const ip = ipParts.join(".");
48
48
  linkAddress = (port === 47808) ? ip : `${ip}:${port}`;
49
+ // linkAddress = `${ip}:${port}`;
49
50
  }
50
51
  }
51
52
  break;
@@ -14,6 +14,7 @@ class Transport extends events_1.EventEmitter {
14
14
  this._server.on('message', (msg, rinfo) => {
15
15
  // NOTE HAL modified
16
16
  const port = rinfo.port || DEFAULT_BACNET_PORT;
17
+ // this.emit('message', msg, `${rinfo.address}:${port}`);
17
18
  if (port === DEFAULT_BACNET_PORT)
18
19
  this.emit('message', msg, rinfo.address);
19
20
  else
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halsystems/red-bacnet",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "NodeRED BACnet IP client",
5
5
  "email": "open_source@halsystems.com.au",
6
6
  "repository": {