zwave: cleanup/publish

This commit is contained in:
Koushik Dutta
2022-02-12 19:13:05 -08:00
parent 3bbf263f41
commit 08fb0aa5b7
3 changed files with 7 additions and 6 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/zwave",
"version": "0.0.41",
"version": "0.0.42",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/zwave",
"version": "0.0.41",
"version": "0.0.42",
"license": "Apache",
"dependencies": {
"@scrypted/sdk": "file:../../sdk",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/zwave",
"version": "0.0.41",
"version": "0.0.42",
"description": "Z-Wave USB Controller for Scrypted",
"author": "Scrypted",
"license": "Apache",

View File

@@ -4,7 +4,7 @@ import { CommandClassInfo, getCommandClass, getCommandClassIndex } from "./Comma
import { ZwaveDeviceBase } from "./CommandClasses/ZwaveDeviceBase";
import { getHash, getNodeHash, getInstanceHash } from "./Types";
import debounce from "lodash/debounce";
import { Driver, Endpoint, ZWaveController, ZWaveNode, CommandClass, InclusionUserCallbacks, InclusionGrant, InclusionStrategy, NodeStatus } from "zwave-js";
import { Driver, Endpoint, ZWaveController, ZWaveNode, InclusionUserCallbacks, InclusionGrant, InclusionStrategy, NodeStatus } from "zwave-js";
import { ValueID, CommandClasses } from "@zwave-js/core"
import { randomBytes } from "crypto";
import path from "path";
@@ -141,10 +141,11 @@ export class ZwaveControllerProvider extends ScryptedDeviceBase implements Devic
this.console.log('node added', node.nodeId);
bindNode(node);
rebuildNode(node);
})
});
this.controller.on('node removed', node => {
this.console.log('node removed', node?.nodeId);
})
});
driver.controller.nodes.forEach(node => {
this.console.log('node loaded', node.nodeId);