Skip to content

Commit

Permalink
V3.0 (#15)
Browse files Browse the repository at this point in the history
* Versions

* NVM

* Implement Backup events and Health Checks

* Update README.md

* Naming

* minor name corrections

* Update package.json

* Version Bumps + EP Command Classes

* PSI Serialport v10 support

* .NET Standard 2.0

* Deps

* VS

* Update ZWaveJS.NET.csproj

* Smart Start

* Route Statistics

* Update CHANGELOG.md

* Build

* Delete yarn.lock

* Create yarn.lock

* Decimal not Integer

* 3.0 Alpha

* Better socket management.

* Scratch Pad

* Toolkit

* Error Handling

* Recovery

* Unix Binary

* Thread mgmt

* Update ZWaveJS.NET.csproj

* Alpha 2

* Updates

* Cleanup

* S2 Dialog

* Kill Process

* DSK

* Node Controls

* Node Options

* Update Node.cs

* Restart Mech

* Socket

* Just because.

* Switch to container class on task result.

* Switch object

* WS Client Swap

* Net stats in UI

* Device Event Dialog Update

* Check isFinal before setting failed interview signal

* Update Event.cs

* Health Checks

* FW Updates

* Replace Failed Node

* Associations

* Alpha 6

* Smart Start

* Prep

* Update Readme.png

* So close

* I have a funny feeling, this the last (crucial) commit

* Multicast

* Update Controller.cs

* Read me

* Update README.md

* Frameworks

* Read me

* Update README.md

* Update Helpers.cs

* Create codeql-analysis.yml

* Update codeql-analysis.yml

* Yarn

* Network Heal UI

* Toolkit

* Update README.md

* Update README.md

* Release
  • Loading branch information
marcus-j-davies committed Jun 4, 2022
1 parent d58f7d2 commit 82d04ed
Show file tree
Hide file tree
Showing 118 changed files with 14,119 additions and 4,894 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/BuildPSI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
strategy:
matrix:
node-version: [16]
os: [windows-latest, macos-latest]
os: [windows-latest, macos-latest, ubuntu-latest]
include:
# Define the binary names to use for uploads
# - os: ubuntu-latest
# file: server
# asset_name: server-linux.psi
# asset_body: "Linux Server Binary"
# Define the binary names to use for uploads
- os: ubuntu-latest
file: server
asset_name: server-ubuntu.psi
asset_body: "Ubuntu Server Binary"
- os: windows-latest
file: server.exe
asset_name: server-win.psi
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
**/obj/*
**/bin/*
**/.vs/*
**/packages/*

# Node Stuff
**/node_modules/*
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## v3.0.0

- Versions
- ZWave JS Driver Version: 9.3.0
- ZWave JS Server Version: 1.17.0 (Schema Version 17)

- Breaking Changes
- The libary has been retargeted for **.NET Standard 2.0** and **.NET 4.5** to support a wider varitey of frameworks
- All ZWave methods, now return a task encapsulating a **CMDResult** instance, containing the response payload (if any) including the **success** property and any error message.
- The **NodeInterviewFailed** event now returns a **NodeInterviewFailedEventArgs** instance and no longer a generic **JObject** instance
- The controller events **ValidateDSK** and **GrantSecurityClasses** have been removed.
- **BeginInclusion** and **ReplaceFailedNode** now require an **InclusionOptions** instance (which contains User callbacks)
- The **NodeRemoved** event now returns the **ZWaveNode** instance and no longer just it's ID.
- The **NodeAdded** event now also returns an instance of **InclusionResult**.
- **SetValueOptions** has been renamed to **SetValueAPIOptions**
- **ValueMetaData** has been renamed to **ValueMetadata**

- New Features
- Added **BackupNVMRaw** method and associated user callbacks
- Added **RestoreNVM** method and associated user callbacks
- Added **CheckLifelineHealth** method and associated user callbacks
- Added **Smart Start** methods and associated user callbacks
- Added **Multicast** support

## v2.0.0

- Versions
Expand Down
768 changes: 0 additions & 768 deletions PSI/.yarn/releases/yarn-3.1.1.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions PSI/.yarnrc.yml

This file was deleted.

12 changes: 6 additions & 6 deletions PSI/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"version": "2.0.0",
"version": "3.0.0",
"name": "server",
"bin": "./server.js",
"dependencies": {
"@zwave-js/server": "1.14.0",
"zwave-js": "8.10.0"
"@zwave-js/server": "1.17.0",
"zwave-js": "9.3.0"
},
"devDependencies": {
"pkg": "^5.5.1"
"pkg": "^5.7.0"
},
"scripts": {
"build": "pkg . --compress GZip -t host"
},
"pkg": {
"assets": "./node_modules/@serialport/bindings/build/Release/bindings.node",
"assets": "./node_modules/@serialport/bindings-cpp/prebuilds/**/*",
"outputPath": "dist"
},
"packageManager": "yarn@3.1.1"
"packageManager": "yarn@3.2.1"
}
12 changes: 4 additions & 8 deletions PSI/server.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
// @ts-check

const { Driver, ZWaveError, ZWaveErrorCodes } = 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);
/** @type {import("zwave-js").ZWaveOptions} */
const driverOptions = JSON.parse(process.env.CONFIG);

console.log(`ZWaveJS.NET: Serial Port: ${serialPort}, WSPort: ${wsPort}`);
Expand All @@ -23,13 +20,13 @@ if (driverOptions.securityKeys) {

console.log("ZWaveJS.NET: Instantiating driver...");
const driver = new Driver(serialPort, driverOptions);
// @ts-expect-error The host property is a workaround
const server = new ZwavejsServer(driver, { port: wsPort, host: "localhost" });
driver.on("error", (e) => {
console.error(e);
/*
if (e instanceof ZWaveError && e.code === ZWaveErrorCodes.Driver_Failed) {
process.exit(2); // Exit code 2: restart requested
process.stderr.write("2\n");
}
*/
});

driver.on("driver ready", () => {
Expand All @@ -38,6 +35,5 @@ driver.on("driver ready", () => {

console.log("ZWaveJS.NET: Starting driver...");
driver.start().catch((e) => {
console.error(e);
process.exit(1); // Exit code 1: cannot start
process.stderr.write("1\n");
});
Loading

0 comments on commit 82d04ed

Please sign in to comment.