Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.0.0 (Breaking) #31

Open
wants to merge 87 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
09f4606
Update Deps, switch to NPM
marcus-j-davies Aug 18, 2023
8f6e0bf
Node WaitForWakeUp basics (needs checking)
marcus-j-davies Aug 18, 2023
7c503ee
Add possibility to listen to logging events (#30)
spudwebb Aug 19, 2023
c9e115f
Remove NTK, Change Statistics Name, Change Targets, Swap WS Client, U…
marcus-j-davies Aug 19, 2023
336991f
Value Events
marcus-j-davies Aug 19, 2023
cabb03b
Node Removed update
marcus-j-davies Aug 19, 2023
996998a
New Demo, Args, Driver Instance
marcus-j-davies Aug 20, 2023
6146593
Update CHANGELOG.md
marcus-j-davies Aug 20, 2023
19e901b
Reduce Reconnect, Demo App Dev
marcus-j-davies Aug 20, 2023
b13309b
Added Keep alive to Driver, More Demo dev
marcus-j-davies Aug 20, 2023
8489e13
Demo App - Heal WIP
marcus-j-davies Aug 20, 2023
8358111
Network Heal
marcus-j-davies Aug 20, 2023
028e6fd
Demo : Heal
marcus-j-davies Aug 20, 2023
cc2213f
NET7.0
marcus-j-davies Aug 20, 2023
94b91ac
Update CHANGELOG.md
marcus-j-davies Aug 20, 2023
051e991
Runtime: Additional performance gain
marcus-j-davies Aug 20, 2023
1510f61
Exclusion Enum and Node Interview
marcus-j-davies Aug 20, 2023
2249a3f
Update CHANGELOG.md
marcus-j-davies Aug 20, 2023
990b473
Fix exclusion
marcus-j-davies Aug 20, 2023
270e9b0
Demo Main Form design
marcus-j-davies Aug 20, 2023
7fca321
Firmware, Region, Power Level
marcus-j-davies Aug 23, 2023
57863ed
Update README.md
marcus-j-davies Aug 23, 2023
8e03a73
Update README.md
marcus-j-davies Aug 23, 2023
db902d3
Add ping and fix Power Level processing
marcus-j-davies Aug 23, 2023
012cc13
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
7c7298a
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
fba0947
Schema version check
marcus-j-davies Aug 23, 2023
09bc0a6
Merge branch '4.0.0' of https://github.com/zwave-js/ZWaveJS.NET into …
marcus-j-davies Aug 23, 2023
f22e4c5
OTA + FWUS
marcus-j-davies Aug 23, 2023
1d9423c
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
2eb7b44
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
74382f2
Hard Reset
marcus-j-davies Aug 23, 2023
7ba7ae2
Merge branch '4.0.0' of https://github.com/zwave-js/ZWaveJS.NET into …
marcus-j-davies Aug 23, 2023
c979cee
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
f0fcb63
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
4b4e37b
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
2f8c2a2
Update CHANGELOG.md
marcus-j-davies Aug 23, 2023
df88a11
Small relocate
marcus-j-davies Aug 23, 2023
fb31832
Attempt to handle unexpected disconnects
marcus-j-davies Aug 23, 2023
b4373c8
Upload test PIS
marcus-j-davies Aug 23, 2023
35ea398
Seems this needs more work
marcus-j-davies Aug 23, 2023
d1e7fee
move start_listening_logs + recovery
marcus-j-davies Aug 28, 2023
96d059c
bump Server
marcus-j-davies Aug 28, 2023
e6e098e
Update Driver.cs
marcus-j-davies Aug 28, 2023
32a9e1d
Recovery Improvement
marcus-j-davies Aug 28, 2023
b653b73
Update CHANGELOG.md
marcus-j-davies Aug 28, 2023
3c576ff
Update CHANGELOG.md
marcus-j-davies Aug 28, 2023
6cfb461
Recovery & UI
marcus-j-davies Aug 28, 2023
855d00c
Merge branch '4.0.0' of https://github.com/zwave-js/ZWaveJS.NET into …
marcus-j-davies Aug 28, 2023
8ce2e86
Add ccSpecific to Metadata class
marcus-j-davies Aug 30, 2023
1c3b44b
Update Structures.cs
marcus-j-davies Aug 30, 2023
63c4662
Update CHANGELOG.md
marcus-j-davies Aug 30, 2023
381908f
Add unit and steps properties to ValueMetadata class. Make the defaul…
spudwebb Sep 10, 2023
46ed172
Add connect timeout
marcus-j-davies Sep 20, 2023
64adde8
Oops!
marcus-j-davies Sep 20, 2023
cb6db7d
3rd time lucky
marcus-j-davies Sep 20, 2023
5dbb869
Implement better error handling
marcus-j-davies Sep 25, 2023
47b1095
Add Refresh Values command (#37)
spudwebb Sep 26, 2023
27fffe8
Update CHANGELOG.md
marcus-j-davies Sep 26, 2023
90687b0
Add SetRawConfigParameterValue method to the ZWaveNode class (#38)
spudwebb Oct 2, 2023
41e87cf
Update Driver.cs
marcus-j-davies Oct 6, 2023
60971df
Small thing
marcus-j-davies Oct 11, 2023
d543812
Sentry override
marcus-j-davies Oct 11, 2023
d576bb6
Add Method Factory (V4) (#41)
marcus-j-davies Oct 12, 2023
bd9b863
Update build work flow
marcus-j-davies Oct 12, 2023
a8a0284
PSI file names in helper
marcus-j-davies Oct 12, 2023
60e3518
Update BuildPSI.yml
marcus-j-davies Oct 12, 2023
0d4a289
Make ZWaveNode.endpoints property public and remove GetAllEndpoints m…
spudwebb Oct 12, 2023
fbf9d60
Update schema + fixes (v4) (#47)
marcus-j-davies Nov 3, 2023
03a0a9e
rebuild server.psi
AlCalzone Nov 3, 2023
7e5b758
Change Message
marcus-j-davies Nov 3, 2023
453a589
Read me
marcus-j-davies Nov 3, 2023
d0547e5
Update README.md
marcus-j-davies Nov 3, 2023
509e4ae
Small fixes
marcus-j-davies Nov 12, 2023
236b0b6
Several changes (#54)
spudwebb Dec 6, 2023
f580353
Added RefreshCCValues method to the ZWaveNode class. (#55)
spudwebb Dec 13, 2023
e100d51
Update CHANGELOG.md
marcus-j-davies Dec 13, 2023
533d7cc
Add missing properties to ValueMetadata (#57)
spudwebb Dec 18, 2023
6c3db91
Update ZWaveNode.UpdateFirmware method so that its returned result co…
spudwebb Jan 9, 2024
3fe7bdc
Refactor library to support multiple drivers. (#62)
spudwebb Mar 12, 2024
1cb6e6c
Add Node Found event to the Controller class (#64)
spudwebb Apr 3, 2024
4d3851b
Update README.md
marcus-j-davies Apr 29, 2024
20088d1
Delete .github/workflows/BuildPSI.yml
marcus-j-davies Apr 29, 2024
7a4332e
Update README.md
marcus-j-davies May 1, 2024
fd41e0a
Bump schema and embedded socket client (#66)
marcus-j-davies May 1, 2024
d5fe7ba
Add NodeAlive event to the ZWaveNode class, and add lastSeen property…
spudwebb Jun 14, 2024
6b99e30
Possibility to create smart start provision entries from DSK. (#70)
spudwebb Jun 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 0 additions & 59 deletions .github/workflows/BuildPSI.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
!**/.yarn/versions
**/.pnp.*

PSI/server.js
PSI/package-lock.json
64 changes: 63 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
- v4.0.0

- Versions
- ZWave JS Driver Version: 12.2.1
- ZWave JS Server Version: 1.33.0 (Schema Version 33)

- Breaking Changes
- Removed support for **NET45**
The supported frameworks are as follows: **NET 48**, **NET 5.0**, **NET 6.0**, **NET 7.0**, **NETSTANDARD 2.0**, **NETSTANDARD 2.1**
- The **NodeStatistics** arg on the ZWaveNode class event **StatisticsUpdated** has been renamed to **NodeStatisticsUpdatedArgs**
- The **ControllerStatistics** arg on the Controller class event **StatisticsUpdated** has been renamed to **ControllerStatisticsUpdatedArgs**
- The **InclusionResult** argument has been renamed to **InclusionResultArgs**
- The **ValueUpdated** event now uses a dedicated class for the args parameter
- The **ValueNotification** event now uses a dedicated class for the args parameter
- The **NodeRemoved** event now contains a reason Enum as to why it was removed.
- The **NetworkHealDone** and **NetworkHealProgress** events now use dedicated classes for the args parameter
- The **BeginExclusion** method now requires an Exclusion Options instance
- The Node **BeginFirmwareUpdate** method has been renamed to **UpdateFrimware**, and requires a class instance.
- The Node **FirmwareUpdateProgress** event now passes an args parameter
- The Node **FirmwareUpdateFinished** event now passes an args parameter
- Setting the Node **name**, **location** and **keepAwake** values is now only possible with methods for each.
This is to address some unintentional communication between the Driver runtime and the lib.
- The method **GetAllEndpoints** has been removed, and is replaced with an **endpoints** property
- The Controller property **isHealNetworkActive** has been renamed to **isRebuildingRoutes**
- The Controller methods of **HealNode**, **BeginHealingNetwork**, **StopHealingNetwork** have been renamed to:
**RebuildNodeRoutes**, **RebuildNodeRoutes**, **StopRebuildingRoutes**
This inccludes the associated events

- New Features
- Added **SetRawConfigParameterValue** method to the ZWaveNode class.
- Added **RefreshValues** method to the ZWaveNode class.
- Added **RefreshCCValues** method to the ZWaveNode class.
- Added **WaitForWakeUp** method to the ZWaveNode class.
- Added **Ping**, method to the ZwaveNode class.
- Added **StartListeningLogs**, **StopListeningLogs** methods and the associated events to the Driver class.
- Added **ValueAdded**, **ValueRemoved** events. **ValueRemoved** was never added until now, **ValueAdded**, previously used the **ValueUpdated** event
- Added **endpointLabel** to the Endpoint class
- Added **Interview** method, to the ZWaveNode class - this should only be used if "disableOnNodeAdded" is set to true
- Allow specifying Refresh Info options, when re-interviewing a node.
- Added **FirmwareUpdateOTW** method (and supporting events) to update the Controller Firmware
- Added **SetRFRegion**, **GetRFRegion** methods to the Controller class
- Added **SetPowerlevel**, **GetPowerlevel** methods to the Controller class
- Added **GetAvailableFirmwareUpdates** methods to the Controller class
- Added **FirmwareUpdateOTA** method to the Controller class, to update a node with the fetched Updates via **GetAvailableFirmwareUpdates**
- Added **HardReset** method to the Driver class
**Warning!!!** This will Reset your controller, and will result in a clean network with no included nodes.
- Added **SoftReset** method to the Driver class
- Added the **ccSpecific** property to the **ValueMetadata** class
- Added the ability to add new server methods to the library during runtime.
This is helpful if you want to use a method that is not yet implemented, or to support an older version of an exetrnal server



- Internal changes
- Switched to an alternative websocket client package
- Massive structural / performance improvements
- Better (hopefully) recovery/connection error handling
- Redeveloped the Demo Application / Debug App
- Updated some of the defaults in the Zwave Options to mirror the Driver defaults
- Internal logic to ensure the server satifies the specified expected schema requested by the library


- v3.1.0

- Versions
Expand All @@ -9,7 +71,7 @@
- The child classes of **ZWaveOptions** are now instanciated with default values when calling their constructors.
- The **DownloadPSI** method now pulls down version locked binaries, to remove the potential for incompatible Binary/library combinations

- New Fearures
- New Features
- Added ARM prebuilt binary (Debian, RPi)
- The **DownloadPSI** method - now has an optional override, allwowing the PSI to be focibly downloaded, i.e to ensure you have the correct version.

Expand Down
38 changes: 38 additions & 0 deletions Debug Notes/Debug Notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.env file (FWUS)
-------------------------------------
API_REQUIRE_KEY=false
ADMIN_SECRET=1234567890


Wrangler
-------------------------------------
cache_persist = false


Build / Run
-------------------------------------
yarn
yarn build
yarn dev


Upload Firmware Test
-------------------------------------
set ADMIN_SECRET=1234567890
set BASE_URL=http://localhost:8787
yarn build:index
yarn upload


S2 Keys (DO NOT USE IN PRODUCTION)
-------------------------------------
0d0003d7bda539f90b5553297d043fdd
c7a2a891f6c786a679453608eb04ade5
b959a89faedab01ce55fdf23d36e6361
9142ddbbce0dc0cef42939acaac24f6e






37 changes: 37 additions & 0 deletions Debug Notes/SomeDevice/SomeDevice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"devices": [
{
"brand": "Some MFG",
"model": "Some Device",
"manufacturerId": "0x0346",
"productType": "0x0101",
"productId": "0x0202"
}
],
"upgrades": [
{
"version": "9.0",
"channel": "stable",
"changelog": "Bug Fixes:\n* Bug Fixes\n* More bug fixes",
"files": [
{
"target": 0,
"url": "https://z-wave.freshdesk.com/helpdesk/attachments/80257130806",
"integrity": "sha256:f653271acaf3ed44563dd3bfb6d98cf8bdfe34d5d68d350cf099e95af1e9724b"
}
]
},
{
"version": "9.5",
"channel": "stable",
"changelog": "Bug Fixes:\n* More More Bug Fixes\n* More More More bug fixes",
"files": [
{
"target": 0,
"url": "https://z-wave.freshdesk.com/helpdesk/attachments/80257130806",
"integrity": "sha256:f653271acaf3ed44563dd3bfb6d98cf8bdfe34d5d68d350cf099e95af1e9724b"
}
]
}
]
}
16 changes: 9 additions & 7 deletions PSI/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"version": "3.1.0",
"version": "4.0.0",
"name": "server",
"bin": "./server.js",
"dependencies": {
"@zwave-js/server": "1.17.0",
"zwave-js": "9.4.0"
"@zwave-js/server": "1.35.0",
"zwave-js": "12.5.6"
},
"devDependencies": {
"pkg": "^5.7.0"
"@yao-pkg/pkg": "^5.11.5",
"esbuild": "^0.20.2"
},
"scripts": {
"build": "pkg . --compress GZip -t host"
"build": "npm run do_esbuild && npm run do_pkgbuild",
"do_esbuild": "esbuild server_source.js --bundle --outfile=server.js --platform=node --target=node18 --external:@serialport/* --external:@zwave-js/config --external:zwave-js/package.json",
"do_pkgbuild": "pkg . --compress gzip -t host --targets node18"
},
"pkg": {
"assets": "./node_modules/@serialport/bindings-cpp/prebuilds/**/*",
"outputPath": "dist"
},
"packageManager": "yarn@3.2.1"
}
}
17 changes: 9 additions & 8 deletions PSI/server.js → PSI/server_source.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
const { Driver } = require("zwave-js");
const { ZwavejsServer } = require("@zwave-js/server");

console.log("ZWaveJS.NET: Preparing server...");

const serialPort = process.env.SERIAL_PORT;
const wsPort = parseInt(process.env.WS_PORT);
const driverOptions = JSON.parse(process.env.CONFIG);
let ServerStarted = false;
let DriverStarted = false;

console.log(`ZWaveJS.NET: Serial Port: ${serialPort}, WSPort: ${wsPort}`);

if (driverOptions.securityKeys) {
for (const key of Object.keys(driverOptions.securityKeys)) {
driverOptions.securityKeys[key] = Buffer.from(
Expand All @@ -20,7 +16,15 @@ if (driverOptions.securityKeys) {
}
}

console.log("ZWaveJS.NET: Instantiating driver...");
if (driverOptions.securityKeysLongRange) {
for (const key of Object.keys(driverOptions.securityKeysLongRange)) {
driverOptions.securityKeysLongRange[key] = Buffer.from(
driverOptions.securityKeysLongRange[key],
"hex"
);
}
}

const driver = new Driver(serialPort, driverOptions);
const server = new ZwavejsServer(driver, { port: wsPort, host: "localhost" });
server.on("listening",() =>{
Expand All @@ -30,10 +34,8 @@ driver.on("error", (e) => {});

driver.on("driver ready", () => {
server.start();
ServerStarted = true;
});

console.log("ZWaveJS.NET: Starting driver...");
driver.start()
.then(() =>{
DriverStarted = true;
Expand All @@ -45,7 +47,6 @@ driver.start()

const HandleInput = async (Data) =>{
if(Data.toString().trim() === "KILL"){
console.log("ZWaveJS.NET: Cleaning up...");
if(ServerStarted) await server.destroy();
if(DriverStarted) await driver.destroy();
process.exit(0);
Expand Down
Loading