Socket
Socket
Sign inDemoInstall

@zwave-js/cc

Package Overview
Dependencies
82
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 11.6.0 to 11.7.0

7

build/cc/AlarmSensorCC.d.ts
/// <reference types="node" />
import { CommandClasses, type MaybeNotKnown, type MessageOrCCLogEntry } from "@zwave-js/core/safe";
import { CommandClasses, type IZWaveEndpoint, type MaybeNotKnown, type MessageOrCCLogEntry } from "@zwave-js/core/safe";
import type { ZWaveApplicationHost, ZWaveHost } from "@zwave-js/host/safe";

@@ -149,2 +149,7 @@ import { PhysicalCCAPI } from "../lib/API";

refreshValues(applHost: ZWaveApplicationHost): Promise<void>;
/**
* Returns which sensor types are supported.
* This only works AFTER the interview process
*/
static getSupportedSensorTypesCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<AlarmSensorType[]>;
protected createMetadataForSensorType(applHost: ZWaveApplicationHost, sensorType: AlarmSensorType): void;

@@ -151,0 +156,0 @@ }

@@ -210,2 +210,11 @@ "use strict";

}
/**
* Returns which sensor types are supported.
* This only works AFTER the interview process
*/
static getSupportedSensorTypesCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.AlarmSensorCCValues.supportedSensorTypes.endpoint(endpoint.index));
}
createMetadataForSensorType(applHost, sensorType) {

@@ -212,0 +221,0 @@ const stateValue = exports.AlarmSensorCCValues.state(sensorType);

/// <reference types="node" />
import { CommandClasses, type MaybeNotKnown, type MessageOrCCLogEntry } from "@zwave-js/core/safe";
import { CommandClasses, type IZWaveEndpoint, type MaybeNotKnown, type MessageOrCCLogEntry } from "@zwave-js/core/safe";
import type { ZWaveApplicationHost, ZWaveHost } from "@zwave-js/host/safe";

@@ -78,2 +78,7 @@ import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation } from "../lib/API";

refreshValues(applHost: ZWaveApplicationHost): Promise<void>;
/**
* Returns which sensor types are supported.
* This only works AFTER the interview process
*/
static getSupportedSensorTypesCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<BinarySensorType[]>;
setMappedBasicValue(applHost: ZWaveApplicationHost, value: number): boolean;

@@ -80,0 +85,0 @@ }

@@ -195,2 +195,11 @@ "use strict";

}
/**
* Returns which sensor types are supported.
* This only works AFTER the interview process
*/
static getSupportedSensorTypesCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.BinarySensorCCValues.supportedSensorTypes.endpoint(endpoint.index));
}
setMappedBasicValue(applHost, value) {

@@ -197,0 +206,0 @@ this.setValue(applHost, exports.BinarySensorCCValues.state(_Types_1.BinarySensorType.Any), value > 0);

9

build/cc/DoorLockCC.d.ts

@@ -183,4 +183,4 @@ /// <reference types="node" />

readonly supportsEndpoints: true;
readonly autoCreate: true;
readonly minVersion: 4;
readonly autoCreate: (applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint) => boolean;
};

@@ -235,4 +235,4 @@ };

readonly supportsEndpoints: true;
readonly autoCreate: true;
readonly minVersion: 4;
readonly autoCreate: (applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint) => boolean;
};

@@ -289,4 +289,4 @@ };

readonly supportsEndpoints: true;
readonly autoCreate: true;
readonly minVersion: 4;
readonly autoCreate: (applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint) => boolean;
};

@@ -343,4 +343,4 @@ };

readonly supportsEndpoints: true;
readonly autoCreate: true;
readonly minVersion: 4;
readonly autoCreate: (applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint) => boolean;
};

@@ -753,2 +753,3 @@ };

readonly blockToBlock?: boolean;
persistValues(applHost: ZWaveApplicationHost): boolean;
toLogEntry(applHost: ZWaveApplicationHost): MessageOrCCLogEntry;

@@ -755,0 +756,0 @@ }

@@ -235,3 +235,6 @@ "use strict";

label: "Duration in seconds until lock returns to secure state",
}, { minVersion: 4 }),
}, {
minVersion: 4,
autoCreate: shouldAutoCreateAutoRelockConfigValue,
}),
...Values_1.V.staticProperty("holdAndReleaseSupported", undefined, {

@@ -244,3 +247,6 @@ internal: true,

label: "Duration in seconds the latch stays retracted",
}, { minVersion: 4 }),
}, {
minVersion: 4,
autoCreate: shouldAutoCreateHoldAndReleaseConfigValue,
}),
...Values_1.V.staticProperty("twistAssistSupported", undefined, {

@@ -253,3 +259,6 @@ internal: true,

label: "Twist Assist enabled",
}, { minVersion: 4 }),
}, {
minVersion: 4,
autoCreate: shouldAutoCreateTwistAssistConfigValue,
}),
...Values_1.V.staticProperty("blockToBlockSupported", undefined, {

@@ -262,3 +271,6 @@ internal: true,

label: "Block-to-block functionality enabled",
}, { minVersion: 4 }),
}, {
minVersion: 4,
autoCreate: shouldAutoCreateBlockToBlockConfigValue,
}),
...Values_1.V.staticProperty("latchSupported", undefined, { internal: true }),

@@ -305,2 +317,26 @@ ...Values_1.V.staticProperty("latchStatus", {

}
function shouldAutoCreateTwistAssistConfigValue(applHost, endpoint) {
const valueDB = applHost.tryGetValueDB(endpoint.nodeId);
if (!valueDB)
return false;
return !!valueDB.getValue(exports.DoorLockCCValues.twistAssistSupported.endpoint(endpoint.index));
}
function shouldAutoCreateBlockToBlockConfigValue(applHost, endpoint) {
const valueDB = applHost.tryGetValueDB(endpoint.nodeId);
if (!valueDB)
return false;
return !!valueDB.getValue(exports.DoorLockCCValues.blockToBlockSupported.endpoint(endpoint.index));
}
function shouldAutoCreateAutoRelockConfigValue(applHost, endpoint) {
const valueDB = applHost.tryGetValueDB(endpoint.nodeId);
if (!valueDB)
return false;
return !!valueDB.getValue(exports.DoorLockCCValues.autoRelockSupported.endpoint(endpoint.index));
}
function shouldAutoCreateHoldAndReleaseConfigValue(applHost, endpoint) {
const valueDB = applHost.tryGetValueDB(endpoint.nodeId);
if (!valueDB)
return false;
return !!valueDB.getValue(exports.DoorLockCCValues.holdAndReleaseSupported.endpoint(endpoint.index));
}
const configurationSetParameters = [

@@ -842,2 +878,24 @@ "operationType",

}
persistValues(applHost) {
if (!super.persistValues(applHost))
return false;
// Only store the autoRelockTime etc. params if the lock supports it
const supportsAutoRelock = !!this.getValue(applHost, exports.DoorLockCCValues.autoRelockSupported);
if (supportsAutoRelock) {
this.setValue(applHost, exports.DoorLockCCValues.autoRelockTime, this.autoRelockTime);
}
const supportsHoldAndRelease = !!this.getValue(applHost, exports.DoorLockCCValues.holdAndReleaseSupported);
if (supportsHoldAndRelease) {
this.setValue(applHost, exports.DoorLockCCValues.holdAndReleaseTime, this.holdAndReleaseTime);
}
const supportsTwistAssist = !!this.getValue(applHost, exports.DoorLockCCValues.twistAssistSupported);
if (supportsTwistAssist) {
this.setValue(applHost, exports.DoorLockCCValues.twistAssist, this.twistAssist);
}
const supportsBlockToBlock = !!this.getValue(applHost, exports.DoorLockCCValues.blockToBlockSupported);
if (supportsBlockToBlock) {
this.setValue(applHost, exports.DoorLockCCValues.blockToBlock, this.blockToBlock);
}
return true;
}
toLogEntry(applHost) {

@@ -882,14 +940,2 @@ const message = {

], DoorLockCCConfigurationReport.prototype, "lockTimeoutConfiguration", void 0);
__decorate([
(0, CommandClassDecorators_1.ccValue)(exports.DoorLockCCValues.autoRelockTime)
], DoorLockCCConfigurationReport.prototype, "autoRelockTime", void 0);
__decorate([
(0, CommandClassDecorators_1.ccValue)(exports.DoorLockCCValues.holdAndReleaseTime)
], DoorLockCCConfigurationReport.prototype, "holdAndReleaseTime", void 0);
__decorate([
(0, CommandClassDecorators_1.ccValue)(exports.DoorLockCCValues.twistAssist)
], DoorLockCCConfigurationReport.prototype, "twistAssist", void 0);
__decorate([
(0, CommandClassDecorators_1.ccValue)(exports.DoorLockCCValues.blockToBlock)
], DoorLockCCConfigurationReport.prototype, "blockToBlock", void 0);
exports.DoorLockCCConfigurationReport = DoorLockCCConfigurationReport = __decorate([

@@ -896,0 +942,0 @@ (0, CommandClassDecorators_1.CCCommand)(_Types_1.DoorLockCommand.ConfigurationReport)

/// <reference types="node" />
import { type MeterScale } from "@zwave-js/config";
import { type MaybeUnknown } from "@zwave-js/core";
import { type IZWaveEndpoint, type MaybeUnknown } from "@zwave-js/core";
import { CommandClasses, type MaybeNotKnown, type MessageOrCCLogEntry, type SinglecastCC, type SupervisionResult } from "@zwave-js/core/safe";

@@ -236,2 +236,22 @@ import type { ZWaveApplicationHost, ZWaveHost } from "@zwave-js/host/safe";

shouldRefreshValues(this: SinglecastCC<this>, applHost: ZWaveApplicationHost): boolean;
/**
* Returns which type this meter has.
* This only works AFTER the interview process
*/
static getMeterTypeCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<number>;
/**
* Returns which scales are supported by this meter.
* This only works AFTER the interview process
*/
static getSupportedScalesCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<number[]>;
/**
* Returns whether reset is supported by this meter.
* This only works AFTER the interview process
*/
static supportsResetCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<boolean>;
/**
* Returns which rate types are supported by this meter.
* This only works AFTER the interview process
*/
static getSupportedRateTypesCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<RateType[]>;
translatePropertyKey(applHost: ZWaveApplicationHost, property: string | number, propertyKey: string | number): string | undefined;

@@ -238,0 +258,0 @@ }

@@ -430,2 +430,38 @@ "use strict";

}
/**
* Returns which type this meter has.
* This only works AFTER the interview process
*/
static getMeterTypeCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.MeterCCValues.type.endpoint(endpoint.index));
}
/**
* Returns which scales are supported by this meter.
* This only works AFTER the interview process
*/
static getSupportedScalesCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.MeterCCValues.supportedScales.endpoint(endpoint.index));
}
/**
* Returns whether reset is supported by this meter.
* This only works AFTER the interview process
*/
static supportsResetCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.MeterCCValues.supportsReset.endpoint(endpoint.index));
}
/**
* Returns which rate types are supported by this meter.
* This only works AFTER the interview process
*/
static getSupportedRateTypesCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.MeterCCValues.supportedRateTypes.endpoint(endpoint.index));
}
translatePropertyKey(applHost, property, propertyKey) {

@@ -432,0 +468,0 @@ if (property === "value" && typeof propertyKey === "number") {

@@ -273,3 +273,2 @@ /// <reference types="node" />

persistValues(applHost: ZWaveApplicationHost): boolean;
readonly endpointIndex: number;
readonly genericDeviceClass: number;

@@ -276,0 +275,0 @@ readonly specificDeviceClass: number;

@@ -657,2 +657,5 @@ "use strict";

], MultiChannelCCCapabilityReport);
function testResponseForMultiChannelCapabilityGet(sent, received) {
return received.endpointIndex === sent.requestedEndpoint;
}
let MultiChannelCCCapabilityGet = exports.MultiChannelCCCapabilityGet = class MultiChannelCCCapabilityGet extends MultiChannelCC {

@@ -682,3 +685,3 @@ constructor(host, options) {

(0, CommandClassDecorators_1.CCCommand)(_Types_1.MultiChannelCommand.CapabilityGet),
(0, CommandClassDecorators_1.expectedCCResponse)(MultiChannelCCCapabilityReport)
(0, CommandClassDecorators_1.expectedCCResponse)(MultiChannelCCCapabilityReport, testResponseForMultiChannelCapabilityGet)
], MultiChannelCCCapabilityGet);

@@ -685,0 +688,0 @@ let MultiChannelCCEndPointFindReport = exports.MultiChannelCCEndPointFindReport = class MultiChannelCCEndPointFindReport extends MultiChannelCC {

/// <reference types="node" />
import { Scale } from "@zwave-js/config";
import type { MessageOrCCLogEntry, SinglecastCC, SupervisionResult, ValueID } from "@zwave-js/core/safe";
import type { IZWaveEndpoint, MessageOrCCLogEntry, SinglecastCC, SupervisionResult, ValueID } from "@zwave-js/core/safe";
import { CommandClasses, type MaybeNotKnown } from "@zwave-js/core/safe";

@@ -111,2 +111,12 @@ import type { ZWaveApplicationHost, ZWaveHost } from "@zwave-js/host/safe";

shouldRefreshValues(this: SinglecastCC<this>, applHost: ZWaveApplicationHost): boolean;
/**
* Returns which sensor types are supported.
* This only works AFTER the interview process
*/
static getSupportedSensorTypesCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint): MaybeNotKnown<number[]>;
/**
* Returns which scales are supported for a given sensor type.
* This only works AFTER the interview process
*/
static getSupportedScalesCached(applHost: ZWaveApplicationHost, endpoint: IZWaveEndpoint, sensorType: number): MaybeNotKnown<number[]>;
translatePropertyKey(applHost: ZWaveApplicationHost, property: string | number, propertyKey: string | number): string | undefined;

@@ -113,0 +123,0 @@ }

@@ -417,2 +417,20 @@ "use strict";

}
/**
* Returns which sensor types are supported.
* This only works AFTER the interview process
*/
static getSupportedSensorTypesCached(applHost, endpoint) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.MultilevelSensorCCValues.supportedSensorTypes.endpoint(endpoint.index));
}
/**
* Returns which scales are supported for a given sensor type.
* This only works AFTER the interview process
*/
static getSupportedScalesCached(applHost, endpoint, sensorType) {
return applHost
.getValueDB(endpoint.nodeId)
.getValue(exports.MultilevelSensorCCValues.supportedScales(sensorType).endpoint(endpoint.index));
}
translatePropertyKey(applHost, property, propertyKey) {

@@ -419,0 +437,0 @@ // TODO: check this

{
"name": "@zwave-js/cc",
"version": "11.6.0",
"version": "11.7.0",
"description": "zwave-js: Command Classes",

@@ -66,5 +66,5 @@ "keywords": [],

"dependencies": {
"@zwave-js/core": "11.5.2",
"@zwave-js/host": "11.6.0",
"@zwave-js/serial": "11.6.0",
"@zwave-js/core": "11.7.0",
"@zwave-js/host": "11.7.0",
"@zwave-js/serial": "11.7.0",
"@zwave-js/shared": "11.5.2",

@@ -79,4 +79,4 @@ "alcalzone-shared": "^4.0.8",

"@types/node": "^14.18.52",
"@zwave-js/maintenance": "11.5.2",
"@zwave-js/testing": "11.6.0",
"@zwave-js/maintenance": "11.7.0",
"@zwave-js/testing": "11.7.0",
"@zwave-js/transformers": "11.3.0",

@@ -83,0 +83,0 @@ "ava": "^4.3.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc