Skip to content

Commit

Permalink
Merge pull request #149 from zwave-js/dev
Browse files Browse the repository at this point in the history
6.4.0
  • Loading branch information
marcus-j-davies authored Nov 28, 2021
2 parents f500c16 + a587ca7 commit e1ac221
Show file tree
Hide file tree
Showing 17 changed files with 11,167 additions and 126 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# node-red-contrib-zwave-js Change Log

- 6.4.0

**Fixes**
- When a new node appears in the UI list, after it gets added to the network, its battery is correctly reported.
- Fix potential crash, if **Remove Failed Node** is called twice for the same node.
- Device nodes now clone the received network message, removing a situation where filter node outputs,
are affected by other device nodes having the same interest in the object.
- Account for 3 digit node ID's in UI
- Fixed `event-filter` ignoring `strict `mode

**New Features**
- Implemented Zwave S2 Security Smart Start.
This includes a new mobile UI, allowing you to use it as a device inclusion tool.
- Expose further driver timeout options

**Changes**
- Controller ready checks are now made prior to showing any UI modal form, that may depend on the controller.
- The battery icon in the node list is now updated, whenever a device transmits an update.
- JSON Keys are now quoted in the UI monitor.
- The **timestamp** value in event messages are now the time in milliseconds from the unix epoch.
- Bump ZWJS to 8.8.2
- Bump serial port to 9.2.8

- 6.3.0

**Fixes**
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The most powerful/fully integrated Z-Wave node for Node-RED based on Z-Wave JS.
- Full Z-Wave control inside Node-RED including:
- Device inclusion/exclusion wizard
- S0 and S2 security support
- Supports Security S2 Smart Start (Mobile companion web application)
- Network mesh graph
- Firmware updates
- Associations management
Expand Down
123 changes: 62 additions & 61 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,63 +1,64 @@
{
"name": "node-red-contrib-zwave-js",
"version": "6.3.0",
"license": "MIT",
"description": "An extremely powerful, easy to use, and feature rich Z-Wave node for Node Red, based on Z-Wave JS.",
"dependencies": {
"express": "^4.17.1",
"limiter": "^2.1.0",
"lodash": "^4.17.21",
"serialport": "9.2.4",
"winston": "^3.3.3",
"winston-transport": "^4.4.0",
"zwave-js": "^8.5.1"
},
"devDependencies": {
"eslint": "^8.0.1",
"prettier": "^2.4.1"
},
"engines": {
"node": ">=12.22.2",
"npm": ">=6.14.13"
},
"keywords": [
"node-red",
"zwave",
"zwave-js",
"controller",
"smart",
"automation",
"home-automation",
"home"
],
"node-red": {
"nodes": {
"zwave-js": "zwave-js/zwave-js.js",
"zwave-device": "zwave-js/zwave-device.js",
"event-filter": "zwave-js/event-filter.js",
"cmd-factory": "zwave-js/cmd-factory.js"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/zwave-js/node-red-contrib-zwave-js.git"
},
"author": {
"name": "Marcus Davies",
"email": "[email protected]"
},
"contributors": [
{
"name": "hufftheweevil (Justin)",
"url": "https://github.com/hufftheweevil"
},
{
"name": "crxporter",
"url": "https://github.com/crxporter"
}
],
"bugs": {
"url": "https://github.com/zwave-js/node-red-contrib-zwave-js/issues"
},
"homepage": "https://github.com/zwave-js/node-red-contrib-zwave-js#readme"
"name": "node-red-contrib-zwave-js",
"version": "6.4.0",
"license": "MIT",
"description": "An extremely powerful, easy to use, and feature rich Z-Wave node for Node Red, based on Z-Wave JS.",
"dependencies": {
"express": "^4.17.1",
"limiter": "^2.1.0",
"lodash": "^4.17.21",
"serialport": "9.2.8",
"winston": "^3.3.3",
"winston-transport": "^4.4.0",
"zwave-js": "^8.8.2",
"ip": "^1.1.5"
},
"devDependencies": {
"eslint": "^8.3.0",
"prettier": "^2.5.0"
},
"engines": {
"node": ">=12.22.2",
"npm": ">=6.14.13"
},
"keywords": [
"node-red",
"zwave",
"zwave-js",
"controller",
"smart",
"automation",
"home-automation",
"home"
],
"node-red": {
"nodes": {
"zwave-js": "zwave-js/zwave-js.js",
"zwave-device": "zwave-js/zwave-device.js",
"event-filter": "zwave-js/event-filter.js",
"cmd-factory": "zwave-js/cmd-factory.js"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/zwave-js/node-red-contrib-zwave-js.git"
},
"author": {
"name": "Marcus Davies",
"email": "[email protected]"
},
"contributors": [
{
"name": "hufftheweevil (Justin)",
"url": "https://github.com/hufftheweevil"
},
{
"name": "crxporter",
"url": "https://github.com/crxporter"
}
],
"bugs": {
"url": "https://github.com/zwave-js/node-red-contrib-zwave-js/issues"
},
"homepage": "https://github.com/zwave-js/node-red-contrib-zwave-js#readme"
}
17 changes: 12 additions & 5 deletions zwave-js/event-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ module.exports = function (RED) {
if (Filter.events.includes(msg.payload.event)) {
if (Filter.valueIds.length > 0) {
for (const ValueID of Filter.valueIds) {
if (IsValueIDMatch(ValueID, msg, msg.payload.event)) {
if (
IsValueIDMatch(
ValueID,
msg,
msg.payload.event,
Filter.strict
)
) {
msg.filter = Filter;
SendingArray[ArrayIndex] = msg;
node.status({
Expand Down Expand Up @@ -88,20 +95,20 @@ module.exports = function (RED) {
}
}

function IsValueIDMatch(ValueID, MSG, Event) {
function IsValueIDMatch(ValueID, MSG, Event, Strict) {
let Root = MSG.payload.object;

if (Event === 'GET_VALUE_RESPONSE') {
Root = Root.valueId;
if (!config.strict) {
if (!Strict) {
delete ValueID['endpoint'];
}
const Result = LD.isMatch(Root, ValueID);
return Result;
}

if (Event === 'VALUE_UPDATED') {
if (!config.strict) {
if (!Strict) {
delete ValueID['endpoint'];
}
const Result = LD.isMatch(Root, ValueID);
Expand All @@ -114,7 +121,7 @@ module.exports = function (RED) {
}

if (Event === 'VALUE_NOTIFICATION') {
if (!config.strict) {
if (!Strict) {
delete ValueID['endpoint'];
}
const Result = LD.isMatch(Root, ValueID);
Expand Down
Loading

0 comments on commit e1ac221

Please sign in to comment.