@halsystems/red-bacnet 1.4.0 → 1.4.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.1]
4
+ ### Changed
5
+ - `discover_point` allows device id to be null, to discover based on IP configuration
6
+
3
7
  ## [1.4.0]
4
8
  ### Changed
5
9
  - `read_point` readMethod removed `Read Multiple Fallback Single` option
@@ -100,6 +100,10 @@ module.exports = {
100
100
  device,
101
101
  { stripUnknown: true }
102
102
  );
103
+ // if device id is null, set to 4194303
104
+ if (result.deviceId == null)
105
+ result.deviceId = 4194303;
106
+
103
107
  if (error) {
104
108
  this.eventEmitter.emit(EVENT_ERROR, errMsg(
105
109
  this.name, ERR_SCHEMA_VALIDATION, error
package/common/schema.js CHANGED
@@ -6,7 +6,7 @@ const Joi = require('joi');
6
6
  module.exports = {
7
7
  bacnetDeviceSchema: Joi.object({
8
8
  deviceName: Joi.string().allow('').default(''),
9
- deviceId: Joi.number().min(0).max(4194302).required(),
9
+ deviceId: Joi.number().min(0).max(4194303).allow(null).required(),
10
10
  network: Joi.number().min(0).max(65534).allow(null).default(null),
11
11
  ipAddress: Joi.string().required().custom((value, helpers) => {
12
12
  const [ip, port] = value.split(':');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@halsystems/red-bacnet",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "NodeRED BACnet IP client",
5
5
  "email": "open_source@halsystems.com.au",
6
6
  "repository": {