@zwave-js/cc 9.3.1-0-pr-4662-79458fb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cc/AlarmSensorCC.d.ts +54 -0
- package/build/cc/AlarmSensorCC.d.ts.map +1 -0
- package/build/cc/AlarmSensorCC.js +378 -0
- package/build/cc/AlarmSensorCC.js.map +1 -0
- package/build/cc/AssociationCC.d.ts +123 -0
- package/build/cc/AssociationCC.d.ts.map +1 -0
- package/build/cc/AssociationCC.js +615 -0
- package/build/cc/AssociationCC.js.map +1 -0
- package/build/cc/AssociationGroupInfoCC.d.ts +97 -0
- package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -0
- package/build/cc/AssociationGroupInfoCC.js +530 -0
- package/build/cc/AssociationGroupInfoCC.js.map +1 -0
- package/build/cc/BarrierOperatorCC.d.ts +75 -0
- package/build/cc/BarrierOperatorCC.d.ts.map +1 -0
- package/build/cc/BarrierOperatorCC.js +492 -0
- package/build/cc/BarrierOperatorCC.js.map +1 -0
- package/build/cc/BasicCC.d.ts +51 -0
- package/build/cc/BasicCC.d.ts.map +1 -0
- package/build/cc/BasicCC.js +344 -0
- package/build/cc/BasicCC.js.map +1 -0
- package/build/cc/BatteryCC.d.ts +56 -0
- package/build/cc/BatteryCC.d.ts.map +1 -0
- package/build/cc/BatteryCC.js +417 -0
- package/build/cc/BatteryCC.js.map +1 -0
- package/build/cc/BinarySensorCC.d.ts +52 -0
- package/build/cc/BinarySensorCC.d.ts.map +1 -0
- package/build/cc/BinarySensorCC.js +321 -0
- package/build/cc/BinarySensorCC.js.map +1 -0
- package/build/cc/BinarySwitchCC.d.ts +55 -0
- package/build/cc/BinarySwitchCC.d.ts.map +1 -0
- package/build/cc/BinarySwitchCC.js +327 -0
- package/build/cc/BinarySwitchCC.js.map +1 -0
- package/build/cc/CRC16CC.d.ts +28 -0
- package/build/cc/CRC16CC.d.ts.map +1 -0
- package/build/cc/CRC16CC.js +109 -0
- package/build/cc/CRC16CC.js.map +1 -0
- package/build/cc/CentralSceneCC.d.ts +69 -0
- package/build/cc/CentralSceneCC.d.ts.map +1 -0
- package/build/cc/CentralSceneCC.js +443 -0
- package/build/cc/CentralSceneCC.js.map +1 -0
- package/build/cc/ClimateControlScheduleCC.d.ts +78 -0
- package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -0
- package/build/cc/ClimateControlScheduleCC.js +417 -0
- package/build/cc/ClimateControlScheduleCC.js.map +1 -0
- package/build/cc/ClockCC.d.ts +40 -0
- package/build/cc/ClockCC.d.ts.map +1 -0
- package/build/cc/ClockCC.js +185 -0
- package/build/cc/ClockCC.js.map +1 -0
- package/build/cc/ColorSwitchCC.d.ts +98 -0
- package/build/cc/ColorSwitchCC.d.ts.map +1 -0
- package/build/cc/ColorSwitchCC.js +1045 -0
- package/build/cc/ColorSwitchCC.js.map +1 -0
- package/build/cc/ConfigurationCC.d.ts +315 -0
- package/build/cc/ConfigurationCC.d.ts.map +1 -0
- package/build/cc/ConfigurationCC.js +2257 -0
- package/build/cc/ConfigurationCC.js.map +1 -0
- package/build/cc/DeviceResetLocallyCC.d.ts +9 -0
- package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -0
- package/build/cc/DeviceResetLocallyCC.js +28 -0
- package/build/cc/DeviceResetLocallyCC.js.map +1 -0
- package/build/cc/DoorLockCC.d.ts +116 -0
- package/build/cc/DoorLockCC.d.ts.map +1 -0
- package/build/cc/DoorLockCC.js +1112 -0
- package/build/cc/DoorLockCC.js.map +1 -0
- package/build/cc/DoorLockLoggingCC.d.ts +41 -0
- package/build/cc/DoorLockLoggingCC.d.ts.map +1 -0
- package/build/cc/DoorLockLoggingCC.js +288 -0
- package/build/cc/DoorLockLoggingCC.js.map +1 -0
- package/build/cc/EntryControlCC.d.ts +71 -0
- package/build/cc/EntryControlCC.d.ts.map +1 -0
- package/build/cc/EntryControlCC.js +492 -0
- package/build/cc/EntryControlCC.js.map +1 -0
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +148 -0
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -0
- package/build/cc/FirmwareUpdateMetaDataCC.js +727 -0
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -0
- package/build/cc/HailCC.d.ts +6 -0
- package/build/cc/HailCC.d.ts.map +1 -0
- package/build/cc/HailCC.js +23 -0
- package/build/cc/HailCC.js.map +1 -0
- package/build/cc/HumidityControlModeCC.d.ts +47 -0
- package/build/cc/HumidityControlModeCC.d.ts.map +1 -0
- package/build/cc/HumidityControlModeCC.js +288 -0
- package/build/cc/HumidityControlModeCC.js.map +1 -0
- package/build/cc/HumidityControlOperatingStateCC.d.ts +24 -0
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -0
- package/build/cc/HumidityControlOperatingStateCC.js +129 -0
- package/build/cc/HumidityControlOperatingStateCC.js.map +1 -0
- package/build/cc/HumidityControlSetpointCC.d.ts +103 -0
- package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -0
- package/build/cc/HumidityControlSetpointCC.js +626 -0
- package/build/cc/HumidityControlSetpointCC.js.map +1 -0
- package/build/cc/IndicatorCC.d.ts +88 -0
- package/build/cc/IndicatorCC.d.ts.map +1 -0
- package/build/cc/IndicatorCC.js +758 -0
- package/build/cc/IndicatorCC.js.map +1 -0
- package/build/cc/IrrigationCC.d.ts +278 -0
- package/build/cc/IrrigationCC.d.ts.map +1 -0
- package/build/cc/IrrigationCC.js +2062 -0
- package/build/cc/IrrigationCC.js.map +1 -0
- package/build/cc/LanguageCC.d.ts +41 -0
- package/build/cc/LanguageCC.d.ts.map +1 -0
- package/build/cc/LanguageCC.js +220 -0
- package/build/cc/LanguageCC.js.map +1 -0
- package/build/cc/LockCC.d.ts +41 -0
- package/build/cc/LockCC.d.ts.map +1 -0
- package/build/cc/LockCC.js +185 -0
- package/build/cc/LockCC.js.map +1 -0
- package/build/cc/ManufacturerProprietaryCC.d.ts +31 -0
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -0
- package/build/cc/ManufacturerProprietaryCC.js +275 -0
- package/build/cc/ManufacturerProprietaryCC.js.map +1 -0
- package/build/cc/ManufacturerSpecificCC.d.ts +59 -0
- package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -0
- package/build/cc/ManufacturerSpecificCC.js +285 -0
- package/build/cc/ManufacturerSpecificCC.js.map +1 -0
- package/build/cc/MeterCC.d.ts +100 -0
- package/build/cc/MeterCC.d.ts.map +1 -0
- package/build/cc/MeterCC.js +820 -0
- package/build/cc/MeterCC.js.map +1 -0
- package/build/cc/MultiChannelAssociationCC.d.ts +127 -0
- package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -0
- package/build/cc/MultiChannelAssociationCC.js +883 -0
- package/build/cc/MultiChannelAssociationCC.js.map +1 -0
- package/build/cc/MultiChannelCC.d.ts +164 -0
- package/build/cc/MultiChannelCC.d.ts.map +1 -0
- package/build/cc/MultiChannelCC.js +1004 -0
- package/build/cc/MultiChannelCC.js.map +1 -0
- package/build/cc/MultiCommandCC.d.ts +28 -0
- package/build/cc/MultiCommandCC.d.ts.map +1 -0
- package/build/cc/MultiCommandCC.js +137 -0
- package/build/cc/MultiCommandCC.js.map +1 -0
- package/build/cc/MultilevelSensorCC.d.ts +83 -0
- package/build/cc/MultilevelSensorCC.d.ts.map +1 -0
- package/build/cc/MultilevelSensorCC.js +633 -0
- package/build/cc/MultilevelSensorCC.js.map +1 -0
- package/build/cc/MultilevelSwitchCC.d.ts +86 -0
- package/build/cc/MultilevelSwitchCC.d.ts.map +1 -0
- package/build/cc/MultilevelSwitchCC.js +774 -0
- package/build/cc/MultilevelSwitchCC.js.map +1 -0
- package/build/cc/NoOperationCC.d.ts +17 -0
- package/build/cc/NoOperationCC.d.ts.map +1 -0
- package/build/cc/NoOperationCC.js +50 -0
- package/build/cc/NoOperationCC.js.map +1 -0
- package/build/cc/NodeNamingCC.d.ts +57 -0
- package/build/cc/NodeNamingCC.d.ts.map +1 -0
- package/build/cc/NodeNamingCC.js +313 -0
- package/build/cc/NodeNamingCC.js.map +1 -0
- package/build/cc/NotificationCC.d.ts +127 -0
- package/build/cc/NotificationCC.d.ts.map +1 -0
- package/build/cc/NotificationCC.js +1193 -0
- package/build/cc/NotificationCC.js.map +1 -0
- package/build/cc/PowerlevelCC.d.ts +63 -0
- package/build/cc/PowerlevelCC.d.ts.map +1 -0
- package/build/cc/PowerlevelCC.js +262 -0
- package/build/cc/PowerlevelCC.js.map +1 -0
- package/build/cc/ProtectionCC.d.ts +94 -0
- package/build/cc/ProtectionCC.d.ts.map +1 -0
- package/build/cc/ProtectionCC.js +630 -0
- package/build/cc/ProtectionCC.js.map +1 -0
- package/build/cc/SceneActivationCC.d.ts +34 -0
- package/build/cc/SceneActivationCC.d.ts.map +1 -0
- package/build/cc/SceneActivationCC.js +170 -0
- package/build/cc/SceneActivationCC.js.map +1 -0
- package/build/cc/SceneActuatorConfigurationCC.d.ts +52 -0
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -0
- package/build/cc/SceneActuatorConfigurationCC.js +368 -0
- package/build/cc/SceneActuatorConfigurationCC.js.map +1 -0
- package/build/cc/SceneControllerConfigurationCC.d.ts +61 -0
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -0
- package/build/cc/SceneControllerConfigurationCC.js +444 -0
- package/build/cc/SceneControllerConfigurationCC.js.map +1 -0
- package/build/cc/Security2CC.d.ts +213 -0
- package/build/cc/Security2CC.d.ts.map +1 -0
- package/build/cc/Security2CC.js +1124 -0
- package/build/cc/Security2CC.js.map +1 -0
- package/build/cc/SecurityCC.d.ts +109 -0
- package/build/cc/SecurityCC.d.ts.map +1 -0
- package/build/cc/SecurityCC.js +609 -0
- package/build/cc/SecurityCC.js.map +1 -0
- package/build/cc/SoundSwitchCC.d.ts +87 -0
- package/build/cc/SoundSwitchCC.d.ts.map +1 -0
- package/build/cc/SoundSwitchCC.js +548 -0
- package/build/cc/SoundSwitchCC.js.map +1 -0
- package/build/cc/SupervisionCC.d.ts +63 -0
- package/build/cc/SupervisionCC.d.ts.map +1 -0
- package/build/cc/SupervisionCC.js +239 -0
- package/build/cc/SupervisionCC.js.map +1 -0
- package/build/cc/ThermostatFanModeCC.d.ts +53 -0
- package/build/cc/ThermostatFanModeCC.d.ts.map +1 -0
- package/build/cc/ThermostatFanModeCC.js +359 -0
- package/build/cc/ThermostatFanModeCC.js.map +1 -0
- package/build/cc/ThermostatFanStateCC.d.ts +24 -0
- package/build/cc/ThermostatFanStateCC.d.ts.map +1 -0
- package/build/cc/ThermostatFanStateCC.js +131 -0
- package/build/cc/ThermostatFanStateCC.js.map +1 -0
- package/build/cc/ThermostatModeCC.d.ts +58 -0
- package/build/cc/ThermostatModeCC.d.ts.map +1 -0
- package/build/cc/ThermostatModeCC.js +370 -0
- package/build/cc/ThermostatModeCC.js.map +1 -0
- package/build/cc/ThermostatOperatingStateCC.d.ts +24 -0
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -0
- package/build/cc/ThermostatOperatingStateCC.js +127 -0
- package/build/cc/ThermostatOperatingStateCC.js.map +1 -0
- package/build/cc/ThermostatSetbackCC.d.ts +42 -0
- package/build/cc/ThermostatSetbackCC.d.ts.map +1 -0
- package/build/cc/ThermostatSetbackCC.js +237 -0
- package/build/cc/ThermostatSetbackCC.js.map +1 -0
- package/build/cc/ThermostatSetpointCC.d.ts +98 -0
- package/build/cc/ThermostatSetpointCC.d.ts.map +1 -0
- package/build/cc/ThermostatSetpointCC.js +707 -0
- package/build/cc/ThermostatSetpointCC.js.map +1 -0
- package/build/cc/TimeCC.d.ts +78 -0
- package/build/cc/TimeCC.d.ts.map +1 -0
- package/build/cc/TimeCC.js +373 -0
- package/build/cc/TimeCC.js.map +1 -0
- package/build/cc/TimeParametersCC.d.ts +40 -0
- package/build/cc/TimeParametersCC.d.ts.map +1 -0
- package/build/cc/TimeParametersCC.js +275 -0
- package/build/cc/TimeParametersCC.js.map +1 -0
- package/build/cc/TransportServiceCC.d.ts +101 -0
- package/build/cc/TransportServiceCC.d.ts.map +1 -0
- package/build/cc/TransportServiceCC.js +404 -0
- package/build/cc/TransportServiceCC.js.map +1 -0
- package/build/cc/UserCodeCC.d.ts +219 -0
- package/build/cc/UserCodeCC.d.ts.map +1 -0
- package/build/cc/UserCodeCC.js +1526 -0
- package/build/cc/UserCodeCC.js.map +1 -0
- package/build/cc/VersionCC.d.ts +91 -0
- package/build/cc/VersionCC.d.ts.map +1 -0
- package/build/cc/VersionCC.js +654 -0
- package/build/cc/VersionCC.js.map +1 -0
- package/build/cc/WakeUpCC.d.ts +67 -0
- package/build/cc/WakeUpCC.d.ts.map +1 -0
- package/build/cc/WakeUpCC.js +425 -0
- package/build/cc/WakeUpCC.js.map +1 -0
- package/build/cc/ZWavePlusCC.d.ts +40 -0
- package/build/cc/ZWavePlusCC.d.ts.map +1 -0
- package/build/cc/ZWavePlusCC.js +269 -0
- package/build/cc/ZWavePlusCC.js.map +1 -0
- package/build/cc/index.d.ts +64 -0
- package/build/cc/index.d.ts.map +1 -0
- package/build/cc/index.js +496 -0
- package/build/cc/index.js.map +1 -0
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +62 -0
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -0
- package/build/cc/manufacturerProprietary/FibaroCC.js +247 -0
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -0
- package/build/index.d.ts +11 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +48 -0
- package/build/index.js.map +1 -0
- package/build/index_safe.d.ts +4 -0
- package/build/index_safe.d.ts.map +1 -0
- package/build/index_safe.js +30 -0
- package/build/index_safe.js.map +1 -0
- package/build/lib/API.d.ts +176 -0
- package/build/lib/API.d.ts.map +1 -0
- package/build/lib/API.js +325 -0
- package/build/lib/API.js.map +1 -0
- package/build/lib/CommandClass.d.ts +341 -0
- package/build/lib/CommandClass.d.ts.map +1 -0
- package/build/lib/CommandClass.js +1088 -0
- package/build/lib/CommandClass.js.map +1 -0
- package/build/lib/EncapsulatingCommandClass.d.ts +35 -0
- package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -0
- package/build/lib/EncapsulatingCommandClass.js +53 -0
- package/build/lib/EncapsulatingCommandClass.js.map +1 -0
- package/build/lib/ICommandClassContainer.d.ts +9 -0
- package/build/lib/ICommandClassContainer.d.ts.map +1 -0
- package/build/lib/ICommandClassContainer.js +12 -0
- package/build/lib/ICommandClassContainer.js.map +1 -0
- package/build/lib/NotificationEventPayload.d.ts +11 -0
- package/build/lib/NotificationEventPayload.d.ts.map +1 -0
- package/build/lib/NotificationEventPayload.js +11 -0
- package/build/lib/NotificationEventPayload.js.map +1 -0
- package/build/lib/Security2/Extension.d.ts +87 -0
- package/build/lib/Security2/Extension.d.ts.map +1 -0
- package/build/lib/Security2/Extension.js +235 -0
- package/build/lib/Security2/Extension.js.map +1 -0
- package/build/lib/Security2/shared.d.ts +31 -0
- package/build/lib/Security2/shared.d.ts.map +1 -0
- package/build/lib/Security2/shared.js +37 -0
- package/build/lib/Security2/shared.js.map +1 -0
- package/build/lib/_Types.d.ts +1446 -0
- package/build/lib/_Types.d.ts.map +1 -0
- package/build/lib/_Types.js +1334 -0
- package/build/lib/_Types.js.map +1 -0
- package/build/lib/serializers.d.ts +24 -0
- package/build/lib/serializers.d.ts.map +1 -0
- package/build/lib/serializers.js +66 -0
- package/build/lib/serializers.js.map +1 -0
- package/build/lib/utils.d.ts +13 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +675 -0
- package/build/lib/utils.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,654 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.VersionCCZWaveSoftwareGet = exports.VersionCCZWaveSoftwareReport = exports.VersionCCCapabilitiesGet = exports.VersionCCCapabilitiesReport = exports.VersionCCCommandClassGet = exports.VersionCCCommandClassReport = exports.VersionCCGet = exports.VersionCCReport = exports.VersionCC = exports.VersionCCAPI = exports.getSDKVersionMetadata = exports.getSDKVersionValueId = exports.getFirmwareVersionsMetadata = exports.getFirmwareVersionsValueId = void 0;
|
|
10
|
+
function __assertType(argName, typeName, boundHasError) {
|
|
11
|
+
const { ZWaveError, ZWaveErrorCodes } = require("@zwave-js/core");
|
|
12
|
+
if (boundHasError()) {
|
|
13
|
+
throw new ZWaveError(typeName ? `${argName} is not a ${typeName}` : `${argName} has the wrong type`, ZWaveErrorCodes.Argument_Invalid);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
const __assertType__number = $o => {
|
|
17
|
+
function _number($o) {
|
|
18
|
+
return typeof $o !== "number" ? {} : null;
|
|
19
|
+
}
|
|
20
|
+
return _number($o);
|
|
21
|
+
};
|
|
22
|
+
const safe_1 = require("@zwave-js/core/safe");
|
|
23
|
+
const safe_2 = require("@zwave-js/shared/safe");
|
|
24
|
+
const API_1 = require("../lib/API");
|
|
25
|
+
const CommandClass_1 = require("../lib/CommandClass");
|
|
26
|
+
const _Types_1 = require("../lib/_Types");
|
|
27
|
+
/** @publicAPI */
|
|
28
|
+
function getFirmwareVersionsValueId() {
|
|
29
|
+
return {
|
|
30
|
+
commandClass: safe_1.CommandClasses.Version,
|
|
31
|
+
property: "firmwareVersions",
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
exports.getFirmwareVersionsValueId = getFirmwareVersionsValueId;
|
|
35
|
+
/** @publicAPI */
|
|
36
|
+
function getFirmwareVersionsMetadata() {
|
|
37
|
+
return {
|
|
38
|
+
...safe_1.ValueMetadata.ReadOnly,
|
|
39
|
+
type: "string[]",
|
|
40
|
+
label: "Z-Wave chip firmware versions",
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.getFirmwareVersionsMetadata = getFirmwareVersionsMetadata;
|
|
44
|
+
/** @publicAPI */
|
|
45
|
+
function getSDKVersionValueId() {
|
|
46
|
+
return {
|
|
47
|
+
commandClass: safe_1.CommandClasses.Version,
|
|
48
|
+
property: "sdkVersion",
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
exports.getSDKVersionValueId = getSDKVersionValueId;
|
|
52
|
+
/** @publicAPI */
|
|
53
|
+
function getSDKVersionMetadata() {
|
|
54
|
+
return {
|
|
55
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
56
|
+
label: "SDK version",
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
exports.getSDKVersionMetadata = getSDKVersionMetadata;
|
|
60
|
+
function parseVersion(buffer) {
|
|
61
|
+
if (buffer[0] === 0 && buffer[1] === 0 && buffer[2] === 0)
|
|
62
|
+
return "unused";
|
|
63
|
+
return `${buffer[0]}.${buffer[1]}.${buffer[2]}`;
|
|
64
|
+
}
|
|
65
|
+
// @noSetValueAPI This CC is read-only
|
|
66
|
+
let VersionCCAPI = class VersionCCAPI extends API_1.PhysicalCCAPI {
|
|
67
|
+
supportsCommand(cmd) {
|
|
68
|
+
switch (cmd) {
|
|
69
|
+
case _Types_1.VersionCommand.Get:
|
|
70
|
+
case _Types_1.VersionCommand.CommandClassGet:
|
|
71
|
+
return true; // This is mandatory
|
|
72
|
+
case _Types_1.VersionCommand.CapabilitiesGet:
|
|
73
|
+
// The API might have been created before the versions were determined,
|
|
74
|
+
// so `this.version` may contains a wrong value
|
|
75
|
+
return (this.applHost.getSafeCCVersionForNode(this.ccId, this.endpoint.nodeId, this.endpoint.index) >= 3);
|
|
76
|
+
case _Types_1.VersionCommand.ZWaveSoftwareGet: {
|
|
77
|
+
let ret = this.getValueDB().getValue({
|
|
78
|
+
commandClass: (0, CommandClass_1.getCommandClass)(this),
|
|
79
|
+
endpoint: this.endpoint.index,
|
|
80
|
+
property: "supportsZWaveSoftwareGet",
|
|
81
|
+
});
|
|
82
|
+
if (ret == undefined)
|
|
83
|
+
ret = safe_1.unknownBoolean;
|
|
84
|
+
return ret;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return super.supportsCommand(cmd);
|
|
88
|
+
}
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
90
|
+
async get() {
|
|
91
|
+
this.assertSupportsCommand(_Types_1.VersionCommand, _Types_1.VersionCommand.Get);
|
|
92
|
+
const cc = new VersionCCGet(this.applHost, {
|
|
93
|
+
nodeId: this.endpoint.nodeId,
|
|
94
|
+
endpoint: this.endpoint.index,
|
|
95
|
+
});
|
|
96
|
+
const response = await this.applHost.sendCommand(cc, this.commandOptions);
|
|
97
|
+
if (response) {
|
|
98
|
+
return (0, safe_2.pick)(response, [
|
|
99
|
+
"libraryType",
|
|
100
|
+
"protocolVersion",
|
|
101
|
+
"firmwareVersions",
|
|
102
|
+
"hardwareVersion",
|
|
103
|
+
]);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
async getCCVersion(requestedCC) {
|
|
107
|
+
__assertType("requestedCC", "CommandClasses", __assertType__number.bind(void 0, requestedCC));
|
|
108
|
+
this.assertSupportsCommand(_Types_1.VersionCommand, _Types_1.VersionCommand.CommandClassGet);
|
|
109
|
+
const cc = new VersionCCCommandClassGet(this.applHost, {
|
|
110
|
+
nodeId: this.endpoint.nodeId,
|
|
111
|
+
endpoint: this.endpoint.index,
|
|
112
|
+
requestedCC,
|
|
113
|
+
});
|
|
114
|
+
const response = await this.applHost.sendCommand(cc, this.commandOptions);
|
|
115
|
+
return response === null || response === void 0 ? void 0 : response.ccVersion;
|
|
116
|
+
}
|
|
117
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
118
|
+
async getCapabilities() {
|
|
119
|
+
this.assertSupportsCommand(_Types_1.VersionCommand, _Types_1.VersionCommand.CapabilitiesGet);
|
|
120
|
+
const cc = new VersionCCCapabilitiesGet(this.applHost, {
|
|
121
|
+
nodeId: this.endpoint.nodeId,
|
|
122
|
+
endpoint: this.endpoint.index,
|
|
123
|
+
});
|
|
124
|
+
const response = await this.applHost.sendCommand(cc, this.commandOptions);
|
|
125
|
+
if (response) {
|
|
126
|
+
return (0, safe_2.pick)(response, ["supportsZWaveSoftwareGet"]);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
130
|
+
async getZWaveSoftware() {
|
|
131
|
+
this.assertSupportsCommand(_Types_1.VersionCommand, _Types_1.VersionCommand.ZWaveSoftwareGet);
|
|
132
|
+
const cc = new VersionCCZWaveSoftwareGet(this.applHost, {
|
|
133
|
+
nodeId: this.endpoint.nodeId,
|
|
134
|
+
endpoint: this.endpoint.index,
|
|
135
|
+
});
|
|
136
|
+
const response = await this.applHost.sendCommand(cc, this.commandOptions);
|
|
137
|
+
if (response) {
|
|
138
|
+
return (0, safe_2.pick)(response, [
|
|
139
|
+
"sdkVersion",
|
|
140
|
+
"applicationFrameworkAPIVersion",
|
|
141
|
+
"applicationFrameworkBuildNumber",
|
|
142
|
+
"hostInterfaceVersion",
|
|
143
|
+
"hostInterfaceBuildNumber",
|
|
144
|
+
"zWaveProtocolVersion",
|
|
145
|
+
"zWaveProtocolBuildNumber",
|
|
146
|
+
"applicationVersion",
|
|
147
|
+
"applicationBuildNumber",
|
|
148
|
+
]);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
VersionCCAPI = __decorate([
|
|
153
|
+
(0, CommandClass_1.API)(safe_1.CommandClasses.Version)
|
|
154
|
+
], VersionCCAPI);
|
|
155
|
+
exports.VersionCCAPI = VersionCCAPI;
|
|
156
|
+
let VersionCC = class VersionCC extends CommandClass_1.CommandClass {
|
|
157
|
+
determineRequiredCCInterviews() {
|
|
158
|
+
// VersionCC must be the 2nd CC after ManufacturerSpecificCC
|
|
159
|
+
return [safe_1.CommandClasses["Manufacturer Specific"]];
|
|
160
|
+
}
|
|
161
|
+
async interview(applHost) {
|
|
162
|
+
const node = this.getNode(applHost);
|
|
163
|
+
// SDS13782: In a Multi Channel device, the Version Command Class MUST be supported by the Root Device, while
|
|
164
|
+
// the Version Command Class SHOULD NOT be supported by individual End Points.
|
|
165
|
+
//
|
|
166
|
+
// There may be cases where a given Command Class is not implemented by the Root Device of a Multi
|
|
167
|
+
// Channel device. However, the Root Device MUST respond to Version requests for any Command Class
|
|
168
|
+
// implemented by the Multi Channel device; also in cases where the actual Command Class is only
|
|
169
|
+
// provided by an End Point.
|
|
170
|
+
const endpoint = this.getEndpoint(applHost);
|
|
171
|
+
// Use the CC API of the root device for all queries
|
|
172
|
+
const api = API_1.CCAPI.create(safe_1.CommandClasses.Version, applHost, node).withOptions({
|
|
173
|
+
priority: safe_1.MessagePriority.NodeQuery,
|
|
174
|
+
});
|
|
175
|
+
applHost.controllerLog.logNode(node.id, {
|
|
176
|
+
endpoint: this.endpointIndex,
|
|
177
|
+
message: `Interviewing ${this.ccName}...`,
|
|
178
|
+
direction: "none",
|
|
179
|
+
});
|
|
180
|
+
const queryCCVersion = async (cc) => {
|
|
181
|
+
// only query the ones we support a version > 1 for
|
|
182
|
+
const maxImplemented = (0, CommandClass_1.getImplementedVersion)(cc);
|
|
183
|
+
if (maxImplemented <= 1) {
|
|
184
|
+
applHost.controllerLog.logNode(node.id, ` skipping query for ${safe_1.CommandClasses[cc]} (${(0, safe_2.num2hex)(cc)}) because max implemented version is ${maxImplemented}`);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
applHost.controllerLog.logNode(node.id, {
|
|
188
|
+
endpoint: this.endpointIndex,
|
|
189
|
+
message: ` querying the CC version for ${(0, safe_1.getCCName)(cc)}...`,
|
|
190
|
+
direction: "outbound",
|
|
191
|
+
});
|
|
192
|
+
// query the CC version
|
|
193
|
+
const supportedVersion = await api.getCCVersion(cc);
|
|
194
|
+
if (supportedVersion != undefined) {
|
|
195
|
+
// Remember which CC version this endpoint supports
|
|
196
|
+
let logMessage;
|
|
197
|
+
if (supportedVersion > 0) {
|
|
198
|
+
endpoint.addCC(cc, {
|
|
199
|
+
version: supportedVersion,
|
|
200
|
+
});
|
|
201
|
+
logMessage = ` supports CC ${safe_1.CommandClasses[cc]} (${(0, safe_2.num2hex)(cc)}) in version ${supportedVersion}`;
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
// We were lied to - the NIF said this CC is supported, now the node claims it isn't
|
|
205
|
+
// Make sure this is not a critical CC, which must be supported though
|
|
206
|
+
switch (cc) {
|
|
207
|
+
case safe_1.CommandClasses.Version:
|
|
208
|
+
case safe_1.CommandClasses["Manufacturer Specific"]:
|
|
209
|
+
logMessage = ` claims NOT to support CC ${safe_1.CommandClasses[cc]} (${(0, safe_2.num2hex)(cc)}), but it must. Assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`;
|
|
210
|
+
endpoint.addCC(cc, { version: 1 });
|
|
211
|
+
break;
|
|
212
|
+
default:
|
|
213
|
+
logMessage = ` does NOT support CC ${safe_1.CommandClasses[cc]} (${(0, safe_2.num2hex)(cc)})`;
|
|
214
|
+
endpoint.removeCC(cc);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
applHost.controllerLog.logNode(node.id, {
|
|
218
|
+
endpoint: this.endpointIndex,
|
|
219
|
+
message: logMessage,
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
applHost.controllerLog.logNode(node.id, {
|
|
224
|
+
endpoint: this.endpointIndex,
|
|
225
|
+
message: `CC version query for ${(0, safe_1.getCCName)(cc)} timed out - assuming the ${this.endpointIndex === 0 ? "node" : "endpoint"} supports version 1...`,
|
|
226
|
+
level: "warn",
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
// Version information should not change (except for firmware updates)
|
|
231
|
+
// And it is only relevant on the root endpoint (the node)
|
|
232
|
+
if (this.endpointIndex === 0) {
|
|
233
|
+
// Step 1: Query Version CC version
|
|
234
|
+
await queryCCVersion(safe_1.CommandClasses.Version);
|
|
235
|
+
// The CC instance was created before the versions were determined, so `this.version` contains a wrong value
|
|
236
|
+
this.version = applHost.getSafeCCVersionForNode(safe_1.CommandClasses.Version, node.id, this.endpointIndex);
|
|
237
|
+
// Step 2: Query node versions
|
|
238
|
+
applHost.controllerLog.logNode(node.id, {
|
|
239
|
+
endpoint: this.endpointIndex,
|
|
240
|
+
message: "querying node versions...",
|
|
241
|
+
direction: "outbound",
|
|
242
|
+
});
|
|
243
|
+
const versionGetResponse = await api.get();
|
|
244
|
+
if (versionGetResponse) {
|
|
245
|
+
// prettier-ignore
|
|
246
|
+
let logMessage = `received response for node versions:
|
|
247
|
+
library type: ${safe_1.ZWaveLibraryTypes[versionGetResponse.libraryType]} (${(0, safe_2.num2hex)(versionGetResponse.libraryType)})
|
|
248
|
+
protocol version: ${versionGetResponse.protocolVersion}
|
|
249
|
+
firmware versions: ${versionGetResponse.firmwareVersions.join(", ")}`;
|
|
250
|
+
if (versionGetResponse.hardwareVersion != undefined) {
|
|
251
|
+
logMessage += `\n hardware version: ${versionGetResponse.hardwareVersion}`;
|
|
252
|
+
}
|
|
253
|
+
applHost.controllerLog.logNode(node.id, {
|
|
254
|
+
endpoint: this.endpointIndex,
|
|
255
|
+
message: logMessage,
|
|
256
|
+
direction: "inbound",
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
// Step 3: Query all other CC versions
|
|
261
|
+
applHost.controllerLog.logNode(node.id, {
|
|
262
|
+
endpoint: this.endpointIndex,
|
|
263
|
+
message: "querying CC versions...",
|
|
264
|
+
direction: "outbound",
|
|
265
|
+
});
|
|
266
|
+
for (const [cc] of endpoint.getCCs()) {
|
|
267
|
+
// We already queried the Version CC version at the start of this interview
|
|
268
|
+
if (cc === safe_1.CommandClasses.Version)
|
|
269
|
+
continue;
|
|
270
|
+
// Skip the query of endpoint CCs that are also supported by the root device
|
|
271
|
+
if (this.endpointIndex > 0 && node.getCCVersion(cc) > 0)
|
|
272
|
+
continue;
|
|
273
|
+
await queryCCVersion(cc);
|
|
274
|
+
}
|
|
275
|
+
// Step 4: Query VersionCC capabilities (root device only)
|
|
276
|
+
if (this.endpointIndex === 0 && this.version >= 3) {
|
|
277
|
+
// Step 4a: Support for SoftwareGet
|
|
278
|
+
applHost.controllerLog.logNode(node.id, {
|
|
279
|
+
endpoint: this.endpointIndex,
|
|
280
|
+
message: "querying if Z-Wave Software Get is supported...",
|
|
281
|
+
direction: "outbound",
|
|
282
|
+
});
|
|
283
|
+
const capsResponse = await api.getCapabilities();
|
|
284
|
+
if (capsResponse) {
|
|
285
|
+
const { supportsZWaveSoftwareGet } = capsResponse;
|
|
286
|
+
applHost.controllerLog.logNode(node.id, {
|
|
287
|
+
endpoint: this.endpointIndex,
|
|
288
|
+
message: `Z-Wave Software Get is${supportsZWaveSoftwareGet ? "" : " not"} supported`,
|
|
289
|
+
direction: "inbound",
|
|
290
|
+
});
|
|
291
|
+
if (supportsZWaveSoftwareGet) {
|
|
292
|
+
// Step 4b: Query Z-Wave Software versions
|
|
293
|
+
applHost.controllerLog.logNode(node.id, {
|
|
294
|
+
endpoint: this.endpointIndex,
|
|
295
|
+
message: "querying Z-Wave software versions...",
|
|
296
|
+
direction: "outbound",
|
|
297
|
+
});
|
|
298
|
+
await api.getZWaveSoftware();
|
|
299
|
+
applHost.controllerLog.logNode(node.id, {
|
|
300
|
+
endpoint: this.endpointIndex,
|
|
301
|
+
message: "received Z-Wave software versions",
|
|
302
|
+
direction: "inbound",
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
// Remember that the interview is complete
|
|
308
|
+
this.setInterviewComplete(applHost, true);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
VersionCC = __decorate([
|
|
312
|
+
(0, CommandClass_1.commandClass)(safe_1.CommandClasses.Version),
|
|
313
|
+
(0, CommandClass_1.implementedVersion)(3)
|
|
314
|
+
], VersionCC);
|
|
315
|
+
exports.VersionCC = VersionCC;
|
|
316
|
+
let VersionCCReport = class VersionCCReport extends VersionCC {
|
|
317
|
+
constructor(host, options) {
|
|
318
|
+
super(host, options);
|
|
319
|
+
(0, safe_1.validatePayload)(this.payload.length >= 5);
|
|
320
|
+
this._libraryType = this.payload[0];
|
|
321
|
+
this._protocolVersion = `${this.payload[1]}.${this.payload[2]}`;
|
|
322
|
+
this._firmwareVersions = [`${this.payload[3]}.${this.payload[4]}`];
|
|
323
|
+
if (this.version >= 2 && this.payload.length >= 7) {
|
|
324
|
+
this._hardwareVersion = this.payload[5];
|
|
325
|
+
const additionalFirmwares = this.payload[6];
|
|
326
|
+
(0, safe_1.validatePayload)(this.payload.length >= 7 + 2 * additionalFirmwares);
|
|
327
|
+
for (let i = 0; i < additionalFirmwares; i++) {
|
|
328
|
+
this.firmwareVersions.push(`${this.payload[7 + 2 * i]}.${this.payload[7 + 2 * i + 1]}`);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
get libraryType() {
|
|
333
|
+
return this._libraryType;
|
|
334
|
+
}
|
|
335
|
+
get protocolVersion() {
|
|
336
|
+
return this._protocolVersion;
|
|
337
|
+
}
|
|
338
|
+
get firmwareVersions() {
|
|
339
|
+
return this._firmwareVersions;
|
|
340
|
+
}
|
|
341
|
+
get hardwareVersion() {
|
|
342
|
+
return this._hardwareVersion;
|
|
343
|
+
}
|
|
344
|
+
toLogEntry(applHost) {
|
|
345
|
+
const message = {
|
|
346
|
+
"library type": (0, safe_2.getEnumMemberName)(safe_1.ZWaveLibraryTypes, this._libraryType),
|
|
347
|
+
"protocol version": this._protocolVersion,
|
|
348
|
+
"firmware versions": this._firmwareVersions.join(", "),
|
|
349
|
+
};
|
|
350
|
+
if (this._hardwareVersion != undefined) {
|
|
351
|
+
message["hardware version"] = this._hardwareVersion;
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
...super.toLogEntry(applHost),
|
|
355
|
+
message,
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
__decorate([
|
|
360
|
+
(0, CommandClass_1.ccValue)(),
|
|
361
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
362
|
+
...safe_1.ValueMetadata.ReadOnlyNumber,
|
|
363
|
+
label: "Library type",
|
|
364
|
+
states: (0, safe_1.enumValuesToMetadataStates)(safe_1.ZWaveLibraryTypes),
|
|
365
|
+
})
|
|
366
|
+
], VersionCCReport.prototype, "libraryType", null);
|
|
367
|
+
__decorate([
|
|
368
|
+
(0, CommandClass_1.ccValue)(),
|
|
369
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
370
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
371
|
+
label: "Z-Wave protocol version",
|
|
372
|
+
})
|
|
373
|
+
], VersionCCReport.prototype, "protocolVersion", null);
|
|
374
|
+
__decorate([
|
|
375
|
+
(0, CommandClass_1.ccValue)(),
|
|
376
|
+
(0, CommandClass_1.ccValueMetadata)(getFirmwareVersionsMetadata())
|
|
377
|
+
], VersionCCReport.prototype, "firmwareVersions", null);
|
|
378
|
+
__decorate([
|
|
379
|
+
(0, CommandClass_1.ccValue)({ minVersion: 2 }),
|
|
380
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
381
|
+
...safe_1.ValueMetadata.ReadOnlyNumber,
|
|
382
|
+
label: "Z-Wave chip hardware version",
|
|
383
|
+
})
|
|
384
|
+
], VersionCCReport.prototype, "hardwareVersion", null);
|
|
385
|
+
VersionCCReport = __decorate([
|
|
386
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.Report)
|
|
387
|
+
], VersionCCReport);
|
|
388
|
+
exports.VersionCCReport = VersionCCReport;
|
|
389
|
+
let VersionCCGet = class VersionCCGet extends VersionCC {
|
|
390
|
+
};
|
|
391
|
+
VersionCCGet = __decorate([
|
|
392
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.Get),
|
|
393
|
+
(0, CommandClass_1.expectedCCResponse)(VersionCCReport)
|
|
394
|
+
], VersionCCGet);
|
|
395
|
+
exports.VersionCCGet = VersionCCGet;
|
|
396
|
+
let VersionCCCommandClassReport = class VersionCCCommandClassReport extends VersionCC {
|
|
397
|
+
constructor(host, options) {
|
|
398
|
+
super(host, options);
|
|
399
|
+
(0, safe_1.validatePayload)(this.payload.length >= 2);
|
|
400
|
+
this._requestedCC = this.payload[0];
|
|
401
|
+
this._ccVersion = this.payload[1];
|
|
402
|
+
// No need to persist this, we're storing it manually
|
|
403
|
+
}
|
|
404
|
+
get ccVersion() {
|
|
405
|
+
return this._ccVersion;
|
|
406
|
+
}
|
|
407
|
+
get requestedCC() {
|
|
408
|
+
return this._requestedCC;
|
|
409
|
+
}
|
|
410
|
+
toLogEntry(applHost) {
|
|
411
|
+
return {
|
|
412
|
+
...super.toLogEntry(applHost),
|
|
413
|
+
message: {
|
|
414
|
+
CC: (0, safe_1.getCCName)(this.requestedCC),
|
|
415
|
+
version: this._ccVersion,
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
VersionCCCommandClassReport = __decorate([
|
|
421
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.CommandClassReport)
|
|
422
|
+
], VersionCCCommandClassReport);
|
|
423
|
+
exports.VersionCCCommandClassReport = VersionCCCommandClassReport;
|
|
424
|
+
function testResponseForVersionCommandClassGet(sent, received) {
|
|
425
|
+
// We expect a Version CommandClass Report that matches the requested CC
|
|
426
|
+
return sent.requestedCC === received.requestedCC;
|
|
427
|
+
}
|
|
428
|
+
let VersionCCCommandClassGet = class VersionCCCommandClassGet extends VersionCC {
|
|
429
|
+
constructor(host, options) {
|
|
430
|
+
super(host, options);
|
|
431
|
+
if ((0, CommandClass_1.gotDeserializationOptions)(options)) {
|
|
432
|
+
// TODO: Deserialize payload
|
|
433
|
+
throw new safe_1.ZWaveError(`${this.constructor.name}: deserialization not implemented`, safe_1.ZWaveErrorCodes.Deserialization_NotImplemented);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
this.requestedCC = options.requestedCC;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
serialize() {
|
|
440
|
+
this.payload = Buffer.from([this.requestedCC]);
|
|
441
|
+
return super.serialize();
|
|
442
|
+
}
|
|
443
|
+
toLogEntry(applHost) {
|
|
444
|
+
return {
|
|
445
|
+
...super.toLogEntry(applHost),
|
|
446
|
+
message: { CC: (0, safe_1.getCCName)(this.requestedCC) },
|
|
447
|
+
};
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
VersionCCCommandClassGet = __decorate([
|
|
451
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.CommandClassGet),
|
|
452
|
+
(0, CommandClass_1.expectedCCResponse)(VersionCCCommandClassReport, testResponseForVersionCommandClassGet)
|
|
453
|
+
], VersionCCCommandClassGet);
|
|
454
|
+
exports.VersionCCCommandClassGet = VersionCCCommandClassGet;
|
|
455
|
+
let VersionCCCapabilitiesReport = class VersionCCCapabilitiesReport extends VersionCC {
|
|
456
|
+
constructor(host, options) {
|
|
457
|
+
super(host, options);
|
|
458
|
+
(0, safe_1.validatePayload)(this.payload.length >= 1);
|
|
459
|
+
const capabilities = this.payload[0];
|
|
460
|
+
this._supportsZWaveSoftwareGet = !!(capabilities & 0b100);
|
|
461
|
+
}
|
|
462
|
+
get supportsZWaveSoftwareGet() {
|
|
463
|
+
return this._supportsZWaveSoftwareGet;
|
|
464
|
+
}
|
|
465
|
+
toLogEntry(applHost) {
|
|
466
|
+
return {
|
|
467
|
+
...super.toLogEntry(applHost),
|
|
468
|
+
message: {
|
|
469
|
+
"supports Z-Wave Software Get command": this._supportsZWaveSoftwareGet,
|
|
470
|
+
},
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
__decorate([
|
|
475
|
+
(0, CommandClass_1.ccValue)({
|
|
476
|
+
minVersion: 3,
|
|
477
|
+
internal: true,
|
|
478
|
+
})
|
|
479
|
+
], VersionCCCapabilitiesReport.prototype, "supportsZWaveSoftwareGet", null);
|
|
480
|
+
VersionCCCapabilitiesReport = __decorate([
|
|
481
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.CapabilitiesReport)
|
|
482
|
+
], VersionCCCapabilitiesReport);
|
|
483
|
+
exports.VersionCCCapabilitiesReport = VersionCCCapabilitiesReport;
|
|
484
|
+
let VersionCCCapabilitiesGet = class VersionCCCapabilitiesGet extends VersionCC {
|
|
485
|
+
};
|
|
486
|
+
VersionCCCapabilitiesGet = __decorate([
|
|
487
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.CapabilitiesGet),
|
|
488
|
+
(0, CommandClass_1.expectedCCResponse)(VersionCCCapabilitiesReport)
|
|
489
|
+
], VersionCCCapabilitiesGet);
|
|
490
|
+
exports.VersionCCCapabilitiesGet = VersionCCCapabilitiesGet;
|
|
491
|
+
let VersionCCZWaveSoftwareReport = class VersionCCZWaveSoftwareReport extends VersionCC {
|
|
492
|
+
constructor(host, options) {
|
|
493
|
+
super(host, options);
|
|
494
|
+
(0, safe_1.validatePayload)(this.payload.length >= 23);
|
|
495
|
+
this._sdkVersion = parseVersion(this.payload);
|
|
496
|
+
this._applicationFrameworkAPIVersion = parseVersion(this.payload.slice(3));
|
|
497
|
+
if (this._applicationFrameworkAPIVersion !== "unused") {
|
|
498
|
+
this._applicationFrameworkBuildNumber =
|
|
499
|
+
this.payload.readUInt16BE(6);
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
this._applicationFrameworkBuildNumber = 0;
|
|
503
|
+
}
|
|
504
|
+
this._hostInterfaceVersion = parseVersion(this.payload.slice(8));
|
|
505
|
+
if (this._hostInterfaceVersion !== "unused") {
|
|
506
|
+
this._hostInterfaceBuildNumber = this.payload.readUInt16BE(11);
|
|
507
|
+
}
|
|
508
|
+
else {
|
|
509
|
+
this._hostInterfaceBuildNumber = 0;
|
|
510
|
+
}
|
|
511
|
+
this._zWaveProtocolVersion = parseVersion(this.payload.slice(13));
|
|
512
|
+
if (this._zWaveProtocolVersion !== "unused") {
|
|
513
|
+
this._zWaveProtocolBuildNumber = this.payload.readUInt16BE(16);
|
|
514
|
+
}
|
|
515
|
+
else {
|
|
516
|
+
this._zWaveProtocolBuildNumber = 0;
|
|
517
|
+
}
|
|
518
|
+
this._applicationVersion = parseVersion(this.payload.slice(18));
|
|
519
|
+
if (this._applicationVersion !== "unused") {
|
|
520
|
+
this._applicationBuildNumber = this.payload.readUInt16BE(21);
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
this._applicationBuildNumber = 0;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
get sdkVersion() {
|
|
527
|
+
return this._sdkVersion;
|
|
528
|
+
}
|
|
529
|
+
get applicationFrameworkAPIVersion() {
|
|
530
|
+
return this._applicationFrameworkAPIVersion;
|
|
531
|
+
}
|
|
532
|
+
get applicationFrameworkBuildNumber() {
|
|
533
|
+
return this._applicationFrameworkBuildNumber;
|
|
534
|
+
}
|
|
535
|
+
get hostInterfaceVersion() {
|
|
536
|
+
return this._hostInterfaceVersion;
|
|
537
|
+
}
|
|
538
|
+
get hostInterfaceBuildNumber() {
|
|
539
|
+
return this._hostInterfaceBuildNumber;
|
|
540
|
+
}
|
|
541
|
+
get zWaveProtocolVersion() {
|
|
542
|
+
return this._zWaveProtocolVersion;
|
|
543
|
+
}
|
|
544
|
+
get zWaveProtocolBuildNumber() {
|
|
545
|
+
return this._zWaveProtocolBuildNumber;
|
|
546
|
+
}
|
|
547
|
+
get applicationVersion() {
|
|
548
|
+
return this._applicationVersion;
|
|
549
|
+
}
|
|
550
|
+
get applicationBuildNumber() {
|
|
551
|
+
return this._applicationBuildNumber;
|
|
552
|
+
}
|
|
553
|
+
toLogEntry(applHost) {
|
|
554
|
+
const message = {
|
|
555
|
+
"SDK version": this._sdkVersion,
|
|
556
|
+
};
|
|
557
|
+
message["appl. framework API version"] =
|
|
558
|
+
this._applicationFrameworkAPIVersion;
|
|
559
|
+
if (this._applicationFrameworkAPIVersion !== "unused") {
|
|
560
|
+
message["appl. framework build number"] =
|
|
561
|
+
this._applicationFrameworkBuildNumber;
|
|
562
|
+
}
|
|
563
|
+
message["host interface version"] = this._hostInterfaceVersion;
|
|
564
|
+
if (this._hostInterfaceVersion !== "unused") {
|
|
565
|
+
message["host interface build number"] =
|
|
566
|
+
this._hostInterfaceBuildNumber;
|
|
567
|
+
}
|
|
568
|
+
message["Z-Wave protocol version"] = this._zWaveProtocolVersion;
|
|
569
|
+
if (this._zWaveProtocolVersion !== "unused") {
|
|
570
|
+
message["Z-Wave protocol build number"] =
|
|
571
|
+
this._zWaveProtocolBuildNumber;
|
|
572
|
+
}
|
|
573
|
+
message["application version"] = this._applicationVersion;
|
|
574
|
+
if (this._applicationVersion !== "unused") {
|
|
575
|
+
message["application build number"] = this._applicationBuildNumber;
|
|
576
|
+
}
|
|
577
|
+
return {
|
|
578
|
+
...super.toLogEntry(applHost),
|
|
579
|
+
message,
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
__decorate([
|
|
584
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
585
|
+
(0, CommandClass_1.ccValueMetadata)(getSDKVersionMetadata())
|
|
586
|
+
], VersionCCZWaveSoftwareReport.prototype, "sdkVersion", null);
|
|
587
|
+
__decorate([
|
|
588
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
589
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
590
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
591
|
+
label: "Z-Wave application framework API version",
|
|
592
|
+
})
|
|
593
|
+
], VersionCCZWaveSoftwareReport.prototype, "applicationFrameworkAPIVersion", null);
|
|
594
|
+
__decorate([
|
|
595
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
596
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
597
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
598
|
+
label: "Z-Wave application framework API build number",
|
|
599
|
+
})
|
|
600
|
+
], VersionCCZWaveSoftwareReport.prototype, "applicationFrameworkBuildNumber", null);
|
|
601
|
+
__decorate([
|
|
602
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
603
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
604
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
605
|
+
label: "Serial API version",
|
|
606
|
+
})
|
|
607
|
+
], VersionCCZWaveSoftwareReport.prototype, "hostInterfaceVersion", null);
|
|
608
|
+
__decorate([
|
|
609
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
610
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
611
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
612
|
+
label: "Serial API build number",
|
|
613
|
+
})
|
|
614
|
+
], VersionCCZWaveSoftwareReport.prototype, "hostInterfaceBuildNumber", null);
|
|
615
|
+
__decorate([
|
|
616
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
617
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
618
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
619
|
+
label: "Z-Wave protocol version",
|
|
620
|
+
})
|
|
621
|
+
], VersionCCZWaveSoftwareReport.prototype, "zWaveProtocolVersion", null);
|
|
622
|
+
__decorate([
|
|
623
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
624
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
625
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
626
|
+
label: "Z-Wave protocol build number",
|
|
627
|
+
})
|
|
628
|
+
], VersionCCZWaveSoftwareReport.prototype, "zWaveProtocolBuildNumber", null);
|
|
629
|
+
__decorate([
|
|
630
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
631
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
632
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
633
|
+
label: "Application version",
|
|
634
|
+
})
|
|
635
|
+
], VersionCCZWaveSoftwareReport.prototype, "applicationVersion", null);
|
|
636
|
+
__decorate([
|
|
637
|
+
(0, CommandClass_1.ccValue)({ minVersion: 3 }),
|
|
638
|
+
(0, CommandClass_1.ccValueMetadata)({
|
|
639
|
+
...safe_1.ValueMetadata.ReadOnlyString,
|
|
640
|
+
label: "Application build number",
|
|
641
|
+
})
|
|
642
|
+
], VersionCCZWaveSoftwareReport.prototype, "applicationBuildNumber", null);
|
|
643
|
+
VersionCCZWaveSoftwareReport = __decorate([
|
|
644
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.ZWaveSoftwareReport)
|
|
645
|
+
], VersionCCZWaveSoftwareReport);
|
|
646
|
+
exports.VersionCCZWaveSoftwareReport = VersionCCZWaveSoftwareReport;
|
|
647
|
+
let VersionCCZWaveSoftwareGet = class VersionCCZWaveSoftwareGet extends VersionCC {
|
|
648
|
+
};
|
|
649
|
+
VersionCCZWaveSoftwareGet = __decorate([
|
|
650
|
+
(0, CommandClass_1.CCCommand)(_Types_1.VersionCommand.ZWaveSoftwareGet),
|
|
651
|
+
(0, CommandClass_1.expectedCCResponse)(VersionCCZWaveSoftwareReport)
|
|
652
|
+
], VersionCCZWaveSoftwareGet);
|
|
653
|
+
exports.VersionCCZWaveSoftwareGet = VersionCCZWaveSoftwareGet;
|
|
654
|
+
//# sourceMappingURL=VersionCC.js.map
|