node-red-contrib-zwave-js 9.1.3 → 10.0.0

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,14 @@
1
1
  # node-red-contrib-zwave-js Change Log
2
2
 
3
+ - 10.0.0
4
+
5
+ **Breaking Changes**
6
+ - Min Node Version is now >=20
7
+
8
+ **Changes**
9
+ - Bump ZWave JS from v14 to V15
10
+ - Bump various dependencies
11
+
3
12
  - 9.1.3
4
13
 
5
14
  **Maintenance Release**
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "node-red-contrib-zwave-js",
3
- "version": "9.1.3",
3
+ "version": "10.0.0",
4
4
  "license": "MIT",
5
5
  "description": "The most powerful, high performing and highly polished Z-Wave node for Node-RED based on Z-Wave JS. If you want a fully featured Z-Wave framework in your Node-RED instance, you have found it.",
6
6
  "dependencies": {
7
7
  "limiter": "^3.0.0",
8
8
  "lodash": "^4.17.21",
9
- "winston": "^3.17.0",
9
+ "winston": "^3.18.3",
10
10
  "winston-transport": "^4.9.0",
11
- "zwave-js": "^14.3.8"
11
+ "zwave-js": "^15.15.3"
12
12
  },
13
13
  "devDependencies": {
14
- "eslint": "^9.19.0",
15
- "prettier": "^3.4.2"
14
+ "eslint": "^9.38.0",
15
+ "prettier": "^3.6.2"
16
16
  },
17
17
  "scripts": {
18
18
  "validate": "node-red-dev validate -o validation_result.json"
19
19
  },
20
20
  "engines": {
21
- "node": ">=18.0.0"
21
+ "node": ">=20.0.0"
22
22
  },
23
23
  "keywords": [
24
24
  "node-red",
@@ -660,7 +660,7 @@ class UIServer {
660
660
  );
661
661
  }
662
662
 
663
- _SmartStartCallback(Event, Code) {
663
+ async _SmartStartCallback(Event, Code) {
664
664
  switch (Event) {
665
665
  case 'Started':
666
666
  this._RED.comms.publish(`/zwave-js/${this._NetworkIdentifier}/cmd`, {
@@ -670,7 +670,7 @@ class UIServer {
670
670
  return true;
671
671
 
672
672
  case 'Code':
673
- const inclusionPackage = ZWaveJS.parseQRCodeString(Code);
673
+ const inclusionPackage = await ZWaveJS.parseQRCodeString(Code);
674
674
  if (inclusionPackage.version === 1) {
675
675
  this._CM
676
676
  .lookupDevice(
@@ -73,9 +73,9 @@ function SendStarted(req, res) {
73
73
  }
74
74
  }
75
75
 
76
- function ParseCode(req, res) {
76
+ async function ParseCode(req, res) {
77
77
  if (CheckStatus(res)) {
78
- const Result = _Callback('Code', req.params.Code);
78
+ const Result = await _Callback('Code', req.params.Code);
79
79
  res.status(200);
80
80
  res.end(Result.toString());
81
81
  }
@@ -5,11 +5,13 @@ module.exports = function (RED) {
5
5
  const ZWaveJS = require('zwave-js');
6
6
  const { UIServer, SetupGlobals } = require('./ui/server.js');
7
7
  const {
8
- createDefaultTransportFormat,
9
8
  CommandClasses,
10
9
  ZWaveErrorCodes,
11
10
  getCCName
12
11
  } = require('@zwave-js/core');
12
+ const {
13
+ createDefaultTransportFormat
14
+ } = require('@zwave-js/core/bindings/log/node');
13
15
  const Winston = require('winston');
14
16
  const { Pin2LogTransport } = require('./Pin2LogTransport');
15
17
 
@@ -1033,7 +1035,7 @@ module.exports = function (RED) {
1033
1035
  NodeCheck(Params[0]);
1034
1036
  ReturnNode.id = Params[0];
1035
1037
  const Format = ZWaveJS.guessFirmwareFileFormat(Params[2], Params[3]);
1036
- const Firmware = ZWaveJS.extractFirmware(Params[3], Format);
1038
+ const Firmware = await ZWaveJS.extractFirmware(Params[3], Format);
1037
1039
  const Package = {
1038
1040
  data: Firmware.data,
1039
1041
  firmwareTarget: Params[1]