@zwave-js/cc 13.10.1 → 14.0.0-beta.0
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 +31 -20
- package/build/cc/AlarmSensorCC.d.ts.map +1 -1
- package/build/cc/AlarmSensorCC.js +106 -87
- package/build/cc/AlarmSensorCC.js.map +1 -1
- package/build/cc/AssociationCC.d.ts +38 -32
- package/build/cc/AssociationCC.d.ts.map +1 -1
- package/build/cc/AssociationCC.js +193 -176
- package/build/cc/AssociationCC.js.map +1 -1
- package/build/cc/AssociationGroupInfoCC.d.ts +42 -36
- package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/cc/AssociationGroupInfoCC.js +218 -200
- package/build/cc/AssociationGroupInfoCC.js.map +1 -1
- package/build/cc/BarrierOperatorCC.d.ts +41 -24
- package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
- package/build/cc/BarrierOperatorCC.js +143 -109
- package/build/cc/BarrierOperatorCC.js.map +1 -1
- package/build/cc/BasicCC.d.ts +22 -23
- package/build/cc/BasicCC.d.ts.map +1 -1
- package/build/cc/BasicCC.js +83 -77
- package/build/cc/BasicCC.js.map +1 -1
- package/build/cc/BatteryCC.d.ts +22 -14
- package/build/cc/BatteryCC.d.ts.map +1 -1
- package/build/cc/BatteryCC.js +116 -87
- package/build/cc/BatteryCC.js.map +1 -1
- package/build/cc/BinarySensorCC.d.ts +22 -19
- package/build/cc/BinarySensorCC.d.ts.map +1 -1
- package/build/cc/BinarySensorCC.js +103 -93
- package/build/cc/BinarySensorCC.js.map +1 -1
- package/build/cc/BinarySwitchCC.d.ts +20 -20
- package/build/cc/BinarySwitchCC.d.ts.map +1 -1
- package/build/cc/BinarySwitchCC.js +71 -59
- package/build/cc/BinarySwitchCC.js.map +1 -1
- package/build/cc/CRC16CC.d.ts +9 -9
- package/build/cc/CRC16CC.d.ts.map +1 -1
- package/build/cc/CRC16CC.js +36 -36
- package/build/cc/CRC16CC.js.map +1 -1
- package/build/cc/CentralSceneCC.d.ts +34 -16
- package/build/cc/CentralSceneCC.d.ts.map +1 -1
- package/build/cc/CentralSceneCC.js +116 -79
- package/build/cc/CentralSceneCC.js.map +1 -1
- package/build/cc/ClimateControlScheduleCC.d.ts +38 -21
- package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/cc/ClimateControlScheduleCC.js +113 -81
- package/build/cc/ClimateControlScheduleCC.js.map +1 -1
- package/build/cc/ClockCC.d.ts +18 -11
- package/build/cc/ClockCC.d.ts.map +1 -1
- package/build/cc/ClockCC.js +57 -43
- package/build/cc/ClockCC.js.map +1 -1
- package/build/cc/ColorSwitchCC.d.ts +37 -33
- package/build/cc/ColorSwitchCC.d.ts.map +1 -1
- package/build/cc/ColorSwitchCC.js +216 -189
- package/build/cc/ColorSwitchCC.js.map +1 -1
- package/build/cc/ConfigurationCC.d.ts +89 -74
- package/build/cc/ConfigurationCC.d.ts.map +1 -1
- package/build/cc/ConfigurationCC.js +541 -485
- package/build/cc/ConfigurationCC.js.map +1 -1
- package/build/cc/DeviceResetLocallyCC.d.ts +3 -3
- package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -1
- package/build/cc/DeviceResetLocallyCC.js +14 -14
- package/build/cc/DeviceResetLocallyCC.js.map +1 -1
- package/build/cc/DoorLockCC.d.ts +66 -27
- package/build/cc/DoorLockCC.d.ts.map +1 -1
- package/build/cc/DoorLockCC.js +288 -197
- package/build/cc/DoorLockCC.js.map +1 -1
- package/build/cc/DoorLockLoggingCC.d.ts +23 -13
- package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/cc/DoorLockLoggingCC.js +81 -63
- package/build/cc/DoorLockLoggingCC.js.map +1 -1
- package/build/cc/EnergyProductionCC.d.ts +16 -14
- package/build/cc/EnergyProductionCC.d.ts.map +1 -1
- package/build/cc/EnergyProductionCC.js +58 -52
- package/build/cc/EnergyProductionCC.js.map +1 -1
- package/build/cc/EntryControlCC.d.ts +44 -18
- package/build/cc/EntryControlCC.d.ts.map +1 -1
- package/build/cc/EntryControlCC.js +163 -112
- package/build/cc/EntryControlCC.js.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts +69 -34
- package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/cc/FirmwareUpdateMetaDataCC.js +311 -245
- package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/cc/HumidityControlModeCC.d.ts +24 -16
- package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
- package/build/cc/HumidityControlModeCC.js +80 -65
- package/build/cc/HumidityControlModeCC.js.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.d.ts +11 -7
- package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/cc/HumidityControlOperatingStateCC.js +31 -22
- package/build/cc/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/cc/HumidityControlSetpointCC.d.ts +68 -49
- package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/cc/HumidityControlSetpointCC.js +203 -181
- package/build/cc/HumidityControlSetpointCC.js.map +1 -1
- package/build/cc/InclusionControllerCC.d.ts +13 -11
- package/build/cc/InclusionControllerCC.d.ts.map +1 -1
- package/build/cc/InclusionControllerCC.js +49 -42
- package/build/cc/InclusionControllerCC.js.map +1 -1
- package/build/cc/IndicatorCC.d.ts +46 -39
- package/build/cc/IndicatorCC.d.ts.map +1 -1
- package/build/cc/IndicatorCC.js +298 -277
- package/build/cc/IndicatorCC.js.map +1 -1
- package/build/cc/IrrigationCC.d.ts +127 -57
- package/build/cc/IrrigationCC.d.ts.map +1 -1
- package/build/cc/IrrigationCC.js +496 -352
- package/build/cc/IrrigationCC.js.map +1 -1
- package/build/cc/LanguageCC.d.ts +17 -11
- package/build/cc/LanguageCC.d.ts.map +1 -1
- package/build/cc/LanguageCC.js +54 -44
- package/build/cc/LanguageCC.js.map +1 -1
- package/build/cc/LockCC.d.ts +16 -11
- package/build/cc/LockCC.d.ts.map +1 -1
- package/build/cc/LockCC.js +48 -38
- package/build/cc/LockCC.js.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.d.ts +12 -11
- package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/cc/ManufacturerProprietaryCC.js +45 -50
- package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
- package/build/cc/ManufacturerSpecificCC.d.ts +20 -13
- package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/cc/ManufacturerSpecificCC.js +79 -63
- package/build/cc/ManufacturerSpecificCC.js.map +1 -1
- package/build/cc/MeterCC.d.ts +30 -26
- package/build/cc/MeterCC.d.ts.map +1 -1
- package/build/cc/MeterCC.js +236 -204
- package/build/cc/MeterCC.js.map +1 -1
- package/build/cc/MultiChannelAssociationCC.d.ts +31 -26
- package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/cc/MultiChannelAssociationCC.js +177 -168
- package/build/cc/MultiChannelAssociationCC.js.map +1 -1
- package/build/cc/MultiChannelCC.d.ts +70 -49
- package/build/cc/MultiChannelCC.d.ts.map +1 -1
- package/build/cc/MultiChannelCC.js +377 -318
- package/build/cc/MultiChannelCC.js.map +1 -1
- package/build/cc/MultiCommandCC.d.ts +9 -9
- package/build/cc/MultiCommandCC.d.ts.map +1 -1
- package/build/cc/MultiCommandCC.js +35 -36
- package/build/cc/MultiCommandCC.js.map +1 -1
- package/build/cc/MultilevelSensorCC.d.ts +38 -33
- package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
- package/build/cc/MultilevelSensorCC.js +172 -152
- package/build/cc/MultilevelSensorCC.js.map +1 -1
- package/build/cc/MultilevelSwitchCC.d.ts +29 -25
- package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/cc/MultilevelSwitchCC.js +147 -127
- package/build/cc/MultilevelSwitchCC.js.map +1 -1
- package/build/cc/NoOperationCC.d.ts +0 -8
- package/build/cc/NoOperationCC.d.ts.map +1 -1
- package/build/cc/NoOperationCC.js +2 -11
- package/build/cc/NoOperationCC.js.map +1 -1
- package/build/cc/NodeNamingCC.d.ts +27 -17
- package/build/cc/NodeNamingCC.d.ts.map +1 -1
- package/build/cc/NodeNamingCC.js +86 -69
- package/build/cc/NodeNamingCC.js.map +1 -1
- package/build/cc/NotificationCC.d.ts +46 -43
- package/build/cc/NotificationCC.d.ts.map +1 -1
- package/build/cc/NotificationCC.js +317 -303
- package/build/cc/NotificationCC.js.map +1 -1
- package/build/cc/PowerlevelCC.d.ts +22 -18
- package/build/cc/PowerlevelCC.d.ts.map +1 -1
- package/build/cc/PowerlevelCC.js +125 -95
- package/build/cc/PowerlevelCC.js.map +1 -1
- package/build/cc/ProtectionCC.d.ts +49 -26
- package/build/cc/ProtectionCC.d.ts.map +1 -1
- package/build/cc/ProtectionCC.js +172 -126
- package/build/cc/ProtectionCC.js.map +1 -1
- package/build/cc/SceneActivationCC.d.ts +8 -7
- package/build/cc/SceneActivationCC.d.ts.map +1 -1
- package/build/cc/SceneActivationCC.js +28 -23
- package/build/cc/SceneActivationCC.js.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.d.ts +23 -15
- package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneActuatorConfigurationCC.js +79 -62
- package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.d.ts +25 -17
- package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/cc/SceneControllerConfigurationCC.js +92 -78
- package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
- package/build/cc/ScheduleEntryLockCC.d.ts +86 -72
- package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
- package/build/cc/ScheduleEntryLockCC.js +607 -455
- package/build/cc/ScheduleEntryLockCC.js.map +1 -1
- package/build/cc/Security2CC.d.ts +78 -87
- package/build/cc/Security2CC.d.ts.map +1 -1
- package/build/cc/Security2CC.js +798 -765
- package/build/cc/Security2CC.js.map +1 -1
- package/build/cc/SecurityCC.d.ts +47 -42
- package/build/cc/SecurityCC.d.ts.map +1 -1
- package/build/cc/SecurityCC.js +240 -218
- package/build/cc/SecurityCC.js.map +1 -1
- package/build/cc/SoundSwitchCC.d.ts +36 -29
- package/build/cc/SoundSwitchCC.d.ts.map +1 -1
- package/build/cc/SoundSwitchCC.js +180 -157
- package/build/cc/SoundSwitchCC.js.map +1 -1
- package/build/cc/SupervisionCC.d.ts +17 -14
- package/build/cc/SupervisionCC.d.ts.map +1 -1
- package/build/cc/SupervisionCC.js +86 -66
- package/build/cc/SupervisionCC.js.map +1 -1
- package/build/cc/ThermostatFanModeCC.d.ts +25 -15
- package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanModeCC.js +79 -60
- package/build/cc/ThermostatFanModeCC.js.map +1 -1
- package/build/cc/ThermostatFanStateCC.d.ts +11 -7
- package/build/cc/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatFanStateCC.js +31 -22
- package/build/cc/ThermostatFanStateCC.js.map +1 -1
- package/build/cc/ThermostatModeCC.d.ts +24 -21
- package/build/cc/ThermostatModeCC.d.ts.map +1 -1
- package/build/cc/ThermostatModeCC.js +106 -90
- package/build/cc/ThermostatModeCC.js.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.d.ts +11 -7
- package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/cc/ThermostatOperatingStateCC.js +31 -22
- package/build/cc/ThermostatOperatingStateCC.js.map +1 -1
- package/build/cc/ThermostatSetbackCC.d.ts +14 -13
- package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetbackCC.js +64 -57
- package/build/cc/ThermostatSetbackCC.js.map +1 -1
- package/build/cc/ThermostatSetpointCC.d.ts +38 -57
- package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/cc/ThermostatSetpointCC.js +200 -264
- package/build/cc/ThermostatSetpointCC.js.map +1 -1
- package/build/cc/TimeCC.d.ts +24 -20
- package/build/cc/TimeCC.d.ts.map +1 -1
- package/build/cc/TimeCC.js +119 -108
- package/build/cc/TimeCC.js.map +1 -1
- package/build/cc/TimeParametersCC.d.ts +18 -14
- package/build/cc/TimeParametersCC.d.ts.map +1 -1
- package/build/cc/TimeParametersCC.js +77 -69
- package/build/cc/TimeParametersCC.js.map +1 -1
- package/build/cc/TransportServiceCC.d.ts +29 -32
- package/build/cc/TransportServiceCC.d.ts.map +1 -1
- package/build/cc/TransportServiceCC.js +159 -161
- package/build/cc/TransportServiceCC.js.map +1 -1
- package/build/cc/UserCodeCC.d.ts +83 -66
- package/build/cc/UserCodeCC.d.ts.map +1 -1
- package/build/cc/UserCodeCC.js +449 -402
- package/build/cc/UserCodeCC.js.map +1 -1
- package/build/cc/VersionCC.d.ts +36 -20
- package/build/cc/VersionCC.d.ts.map +1 -1
- package/build/cc/VersionCC.js +190 -149
- package/build/cc/VersionCC.js.map +1 -1
- package/build/cc/WakeUpCC.d.ts +27 -13
- package/build/cc/WakeUpCC.d.ts.map +1 -1
- package/build/cc/WakeUpCC.js +105 -77
- package/build/cc/WakeUpCC.js.map +1 -1
- package/build/cc/WindowCoveringCC.d.ts +39 -27
- package/build/cc/WindowCoveringCC.d.ts.map +1 -1
- package/build/cc/WindowCoveringCC.js +169 -137
- package/build/cc/WindowCoveringCC.js.map +1 -1
- package/build/cc/ZWavePlusCC.d.ts +8 -7
- package/build/cc/ZWavePlusCC.d.ts.map +1 -1
- package/build/cc/ZWavePlusCC.js +44 -37
- package/build/cc/ZWavePlusCC.js.map +1 -1
- package/build/cc/ZWaveProtocolCC.d.ts +111 -84
- package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
- package/build/cc/ZWaveProtocolCC.js +583 -508
- package/build/cc/ZWaveProtocolCC.js.map +1 -1
- package/build/cc/index.d.ts +37 -34
- package/build/cc/index.d.ts.map +1 -1
- package/build/cc/index.js +6 -7
- package/build/cc/index.js.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts +29 -24
- package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
- package/build/cc/manufacturerProprietary/FibaroCC.js +109 -112
- package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/lib/API.d.ts +21 -18
- package/build/lib/API.d.ts.map +1 -1
- package/build/lib/API.js +25 -49
- package/build/lib/API.js.map +1 -1
- package/build/lib/CommandClass.d.ts +51 -89
- package/build/lib/CommandClass.d.ts.map +1 -1
- package/build/lib/CommandClass.js +177 -249
- package/build/lib/CommandClass.js.map +1 -1
- package/build/lib/EncapsulatingCommandClass.d.ts +1 -15
- package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -1
- package/build/lib/EncapsulatingCommandClass.js.map +1 -1
- package/build/lib/ICommandClassContainer.d.ts +1 -8
- package/build/lib/ICommandClassContainer.d.ts.map +1 -1
- package/build/lib/ICommandClassContainer.js +0 -8
- package/build/lib/ICommandClassContainer.js.map +1 -1
- package/build/lib/Values.d.ts +3 -3
- package/build/lib/Values.d.ts.map +1 -1
- package/build/lib/_Types.d.ts.map +1 -1
- package/build/lib/_Types.js +1 -0
- package/build/lib/_Types.js.map +1 -1
- package/build/lib/utils.d.ts +14 -13
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +94 -92
- package/build/lib/utils.js.map +1 -1
- package/package.json +4 -5
|
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var ScheduleEntryLockCCEnableSet_1, ScheduleEntryLockCCEnableAllSet_1, ScheduleEntryLockCCSupportedReport_1, ScheduleEntryLockCCWeekDayScheduleSet_1, ScheduleEntryLockCCWeekDayScheduleReport_1, ScheduleEntryLockCCWeekDayScheduleGet_1, ScheduleEntryLockCCYearDayScheduleSet_1, ScheduleEntryLockCCYearDayScheduleReport_1, ScheduleEntryLockCCYearDayScheduleGet_1, ScheduleEntryLockCCTimeOffsetSet_1, ScheduleEntryLockCCTimeOffsetReport_1, ScheduleEntryLockCCDailyRepeatingScheduleSet_1, ScheduleEntryLockCCDailyRepeatingScheduleReport_1, ScheduleEntryLockCCDailyRepeatingScheduleGet_1;
|
|
8
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
10
|
exports.ScheduleEntryLockCCDailyRepeatingScheduleGet = exports.ScheduleEntryLockCCDailyRepeatingScheduleReport = exports.ScheduleEntryLockCCDailyRepeatingScheduleSet = exports.ScheduleEntryLockCCTimeOffsetGet = exports.ScheduleEntryLockCCTimeOffsetReport = exports.ScheduleEntryLockCCTimeOffsetSet = exports.ScheduleEntryLockCCYearDayScheduleGet = exports.ScheduleEntryLockCCYearDayScheduleReport = exports.ScheduleEntryLockCCYearDayScheduleSet = exports.ScheduleEntryLockCCWeekDayScheduleGet = exports.ScheduleEntryLockCCWeekDayScheduleReport = exports.ScheduleEntryLockCCWeekDayScheduleSet = exports.ScheduleEntryLockCCSupportedGet = exports.ScheduleEntryLockCCSupportedReport = exports.ScheduleEntryLockCCEnableAllSet = exports.ScheduleEntryLockCCEnableSet = exports.ScheduleEntryLockCC = exports.ScheduleEntryLockCCAPI = exports.ScheduleEntryLockCCValues = void 0;
|
|
10
11
|
function __assertType(argName, typeName, boundHasError) {
|
|
@@ -323,31 +324,31 @@ function toPropertyKey(scheduleKind, userId, slotId) {
|
|
|
323
324
|
return (scheduleKind << 16) | (userId << 8) | slotId;
|
|
324
325
|
}
|
|
325
326
|
/** Caches information about a schedule */
|
|
326
|
-
function persistSchedule(
|
|
327
|
+
function persistSchedule(ctx, scheduleKind, userId, slotId, schedule) {
|
|
327
328
|
const scheduleValue = exports.ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId);
|
|
328
329
|
if (schedule != undefined) {
|
|
329
|
-
this.setValue(
|
|
330
|
+
this.setValue(ctx, scheduleValue, schedule);
|
|
330
331
|
}
|
|
331
332
|
else {
|
|
332
|
-
this.removeValue(
|
|
333
|
+
this.removeValue(ctx, scheduleValue);
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
336
|
/** Updates the schedule kind assumed to be active for user in the cache */
|
|
336
|
-
function setUserCodeScheduleKindCached(
|
|
337
|
-
|
|
337
|
+
function setUserCodeScheduleKindCached(ctx, endpoint, userId, scheduleKind) {
|
|
338
|
+
ctx
|
|
338
339
|
.getValueDB(endpoint.nodeId)
|
|
339
340
|
.setValue(exports.ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index), scheduleKind);
|
|
340
341
|
}
|
|
341
342
|
/** Updates whether scheduling is active for one or all user(s) in the cache */
|
|
342
|
-
function setUserCodeScheduleEnabledCached(
|
|
343
|
+
function setUserCodeScheduleEnabledCached(ctx, endpoint, userId, enabled) {
|
|
343
344
|
const setEnabled = (userId) => {
|
|
344
|
-
|
|
345
|
+
ctx
|
|
345
346
|
.getValueDB(endpoint.nodeId)
|
|
346
347
|
.setValue(exports.ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index), enabled);
|
|
347
348
|
};
|
|
348
349
|
if (userId == undefined) {
|
|
349
350
|
// Enable/disable all users
|
|
350
|
-
const numUsers = UserCodeCC_1.UserCodeCC.getSupportedUsersCached(
|
|
351
|
+
const numUsers = UserCodeCC_1.UserCodeCC.getSupportedUsersCached(ctx, endpoint)
|
|
351
352
|
?? 0;
|
|
352
353
|
for (let userId = 1; userId <= numUsers; userId++) {
|
|
353
354
|
setEnabled(userId);
|
|
@@ -388,37 +389,37 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
388
389
|
let result;
|
|
389
390
|
if (userId != undefined) {
|
|
390
391
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.EnableSet);
|
|
391
|
-
const cc = new ScheduleEntryLockCCEnableSet(
|
|
392
|
+
const cc = new ScheduleEntryLockCCEnableSet({
|
|
392
393
|
nodeId: this.endpoint.nodeId,
|
|
393
|
-
|
|
394
|
+
endpointIndex: this.endpoint.index,
|
|
394
395
|
userId,
|
|
395
396
|
enabled,
|
|
396
397
|
});
|
|
397
|
-
result = await this.
|
|
398
|
+
result = await this.host.sendCommand(cc, this.commandOptions);
|
|
398
399
|
}
|
|
399
400
|
else {
|
|
400
401
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.EnableAllSet);
|
|
401
|
-
const cc = new ScheduleEntryLockCCEnableAllSet(
|
|
402
|
+
const cc = new ScheduleEntryLockCCEnableAllSet({
|
|
402
403
|
nodeId: this.endpoint.nodeId,
|
|
403
|
-
|
|
404
|
+
endpointIndex: this.endpoint.index,
|
|
404
405
|
enabled,
|
|
405
406
|
});
|
|
406
|
-
result = await this.
|
|
407
|
+
result = await this.host.sendCommand(cc, this.commandOptions);
|
|
407
408
|
}
|
|
408
409
|
if (this.isSinglecast() && (0, core_1.isUnsupervisedOrSucceeded)(result)) {
|
|
409
410
|
// Remember the new state in the cache
|
|
410
|
-
setUserCodeScheduleEnabledCached(this.
|
|
411
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, userId, enabled);
|
|
411
412
|
}
|
|
412
413
|
return result;
|
|
413
414
|
}
|
|
414
415
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
415
416
|
async getNumSlots() {
|
|
416
417
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.SupportedGet);
|
|
417
|
-
const cc = new ScheduleEntryLockCCSupportedGet(
|
|
418
|
+
const cc = new ScheduleEntryLockCCSupportedGet({
|
|
418
419
|
nodeId: this.endpoint.nodeId,
|
|
419
|
-
|
|
420
|
+
endpointIndex: this.endpoint.index,
|
|
420
421
|
});
|
|
421
|
-
const result = await this.
|
|
422
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
422
423
|
if (result) {
|
|
423
424
|
return (0, shared_1.pick)(result, [
|
|
424
425
|
"numWeekDaySlots",
|
|
@@ -432,7 +433,7 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
432
433
|
__assertType("schedule", "(optional) ScheduleEntryLockWeekDaySchedule", __assertType__optional_ScheduleEntryLockWeekDaySchedule.bind(void 0, schedule));
|
|
433
434
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.WeekDayScheduleSet);
|
|
434
435
|
if (this.isSinglecast()) {
|
|
435
|
-
const numSlots = ScheduleEntryLockCC.getNumWeekDaySlotsCached(this.
|
|
436
|
+
const numSlots = ScheduleEntryLockCC.getNumWeekDaySlotsCached(this.host, this.endpoint);
|
|
436
437
|
if (slot.slotId < 1 || slot.slotId > numSlots) {
|
|
437
438
|
throw new core_1.ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-week slots ${numSlots}.`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
438
439
|
}
|
|
@@ -444,9 +445,9 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
444
445
|
throw new core_1.ZWaveError(`The stop time must be after the start time.`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
445
446
|
}
|
|
446
447
|
}
|
|
447
|
-
const cc = new ScheduleEntryLockCCWeekDayScheduleSet(
|
|
448
|
+
const cc = new ScheduleEntryLockCCWeekDayScheduleSet({
|
|
448
449
|
nodeId: this.endpoint.nodeId,
|
|
449
|
-
|
|
450
|
+
endpointIndex: this.endpoint.index,
|
|
450
451
|
...slot,
|
|
451
452
|
...(schedule
|
|
452
453
|
? {
|
|
@@ -457,28 +458,28 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
457
458
|
action: _Types_1.ScheduleEntryLockSetAction.Erase,
|
|
458
459
|
}),
|
|
459
460
|
});
|
|
460
|
-
const result = await this.
|
|
461
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
461
462
|
if (this.isSinglecast() && (0, core_1.isUnsupervisedOrSucceeded)(result)) {
|
|
462
463
|
// Editing (but not erasing) a schedule will enable scheduling for that user
|
|
463
464
|
// and switch it to the current scheduling kind
|
|
464
465
|
if (!!schedule) {
|
|
465
|
-
setUserCodeScheduleEnabledCached(this.
|
|
466
|
-
setUserCodeScheduleKindCached(this.
|
|
466
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
|
|
467
|
+
setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, _Types_1.ScheduleEntryLockScheduleKind.WeekDay);
|
|
467
468
|
}
|
|
468
469
|
// And cache the schedule
|
|
469
|
-
persistSchedule.call(cc, this.
|
|
470
|
+
persistSchedule.call(cc, this.host, _Types_1.ScheduleEntryLockScheduleKind.WeekDay, slot.userId, slot.slotId, schedule ?? false);
|
|
470
471
|
}
|
|
471
472
|
return result;
|
|
472
473
|
}
|
|
473
474
|
async getWeekDaySchedule(slot) {
|
|
474
475
|
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
475
476
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.WeekDayScheduleSet);
|
|
476
|
-
const cc = new ScheduleEntryLockCCWeekDayScheduleGet(
|
|
477
|
+
const cc = new ScheduleEntryLockCCWeekDayScheduleGet({
|
|
477
478
|
nodeId: this.endpoint.nodeId,
|
|
478
|
-
|
|
479
|
+
endpointIndex: this.endpoint.index,
|
|
479
480
|
...slot,
|
|
480
481
|
});
|
|
481
|
-
const result = await this.
|
|
482
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
482
483
|
if (result?.weekday != undefined) {
|
|
483
484
|
return {
|
|
484
485
|
weekday: result.weekday,
|
|
@@ -494,7 +495,7 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
494
495
|
__assertType("schedule", "(optional) ScheduleEntryLockYearDaySchedule", __assertType__optional_ScheduleEntryLockYearDaySchedule.bind(void 0, schedule));
|
|
495
496
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.YearDayScheduleSet);
|
|
496
497
|
if (this.isSinglecast()) {
|
|
497
|
-
const numSlots = ScheduleEntryLockCC.getNumYearDaySlotsCached(this.
|
|
498
|
+
const numSlots = ScheduleEntryLockCC.getNumYearDaySlotsCached(this.host, this.endpoint);
|
|
498
499
|
if (slot.slotId < 1 || slot.slotId > numSlots) {
|
|
499
500
|
throw new core_1.ZWaveError(`The schedule slot # must be between 1 and the number of supported day-of-year slots ${numSlots}.`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
500
501
|
}
|
|
@@ -506,9 +507,9 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
506
507
|
throw new core_1.ZWaveError(`The stop date must be after the start date.`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
|
-
const cc = new ScheduleEntryLockCCYearDayScheduleSet(
|
|
510
|
+
const cc = new ScheduleEntryLockCCYearDayScheduleSet({
|
|
510
511
|
nodeId: this.endpoint.nodeId,
|
|
511
|
-
|
|
512
|
+
endpointIndex: this.endpoint.index,
|
|
512
513
|
...slot,
|
|
513
514
|
...(schedule
|
|
514
515
|
? {
|
|
@@ -519,28 +520,28 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
519
520
|
action: _Types_1.ScheduleEntryLockSetAction.Erase,
|
|
520
521
|
}),
|
|
521
522
|
});
|
|
522
|
-
const result = await this.
|
|
523
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
523
524
|
if (this.isSinglecast() && (0, core_1.isUnsupervisedOrSucceeded)(result)) {
|
|
524
525
|
// Editing (but not erasing) a schedule will enable scheduling for that user
|
|
525
526
|
// and switch it to the current scheduling kind
|
|
526
527
|
if (!!schedule) {
|
|
527
|
-
setUserCodeScheduleEnabledCached(this.
|
|
528
|
-
setUserCodeScheduleKindCached(this.
|
|
528
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
|
|
529
|
+
setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, _Types_1.ScheduleEntryLockScheduleKind.YearDay);
|
|
529
530
|
}
|
|
530
531
|
// And cache the schedule
|
|
531
|
-
persistSchedule.call(cc, this.
|
|
532
|
+
persistSchedule.call(cc, this.host, _Types_1.ScheduleEntryLockScheduleKind.YearDay, slot.userId, slot.slotId, schedule ?? false);
|
|
532
533
|
}
|
|
533
534
|
return result;
|
|
534
535
|
}
|
|
535
536
|
async getYearDaySchedule(slot) {
|
|
536
537
|
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
537
538
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.YearDayScheduleSet);
|
|
538
|
-
const cc = new ScheduleEntryLockCCYearDayScheduleGet(
|
|
539
|
+
const cc = new ScheduleEntryLockCCYearDayScheduleGet({
|
|
539
540
|
nodeId: this.endpoint.nodeId,
|
|
540
|
-
|
|
541
|
+
endpointIndex: this.endpoint.index,
|
|
541
542
|
...slot,
|
|
542
543
|
});
|
|
543
|
-
const result = await this.
|
|
544
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
544
545
|
if (result?.startYear != undefined) {
|
|
545
546
|
return {
|
|
546
547
|
startYear: result.startYear,
|
|
@@ -562,14 +563,14 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
562
563
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.DailyRepeatingScheduleSet);
|
|
563
564
|
if (this.isSinglecast()) {
|
|
564
565
|
const numSlots = ScheduleEntryLockCC
|
|
565
|
-
.getNumDailyRepeatingSlotsCached(this.
|
|
566
|
+
.getNumDailyRepeatingSlotsCached(this.host, this.endpoint);
|
|
566
567
|
if (slot.slotId < 1 || slot.slotId > numSlots) {
|
|
567
568
|
throw new core_1.ZWaveError(`The schedule slot # must be between 1 and the number of supported daily repeating slots ${numSlots}.`, core_1.ZWaveErrorCodes.Argument_Invalid);
|
|
568
569
|
}
|
|
569
570
|
}
|
|
570
|
-
const cc = new ScheduleEntryLockCCDailyRepeatingScheduleSet(
|
|
571
|
+
const cc = new ScheduleEntryLockCCDailyRepeatingScheduleSet({
|
|
571
572
|
nodeId: this.endpoint.nodeId,
|
|
572
|
-
|
|
573
|
+
endpointIndex: this.endpoint.index,
|
|
573
574
|
...slot,
|
|
574
575
|
...(schedule
|
|
575
576
|
? {
|
|
@@ -580,28 +581,28 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
580
581
|
action: _Types_1.ScheduleEntryLockSetAction.Erase,
|
|
581
582
|
}),
|
|
582
583
|
});
|
|
583
|
-
const result = await this.
|
|
584
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
584
585
|
if (this.isSinglecast() && (0, core_1.isUnsupervisedOrSucceeded)(result)) {
|
|
585
586
|
// Editing (but not erasing) a schedule will enable scheduling for that user
|
|
586
587
|
// and switch it to the current scheduling kind
|
|
587
588
|
if (!!schedule) {
|
|
588
|
-
setUserCodeScheduleEnabledCached(this.
|
|
589
|
-
setUserCodeScheduleKindCached(this.
|
|
589
|
+
setUserCodeScheduleEnabledCached(this.host, this.endpoint, slot.userId, true);
|
|
590
|
+
setUserCodeScheduleKindCached(this.host, this.endpoint, slot.userId, _Types_1.ScheduleEntryLockScheduleKind.DailyRepeating);
|
|
590
591
|
}
|
|
591
592
|
// And cache the schedule
|
|
592
|
-
persistSchedule.call(cc, this.
|
|
593
|
+
persistSchedule.call(cc, this.host, _Types_1.ScheduleEntryLockScheduleKind.DailyRepeating, slot.userId, slot.slotId, schedule ?? false);
|
|
593
594
|
}
|
|
594
595
|
return result;
|
|
595
596
|
}
|
|
596
597
|
async getDailyRepeatingSchedule(slot) {
|
|
597
598
|
__assertType("slot", "ScheduleEntryLockSlotId", __assertType__ScheduleEntryLockSlotId.bind(void 0, slot));
|
|
598
599
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.DailyRepeatingScheduleSet);
|
|
599
|
-
const cc = new ScheduleEntryLockCCDailyRepeatingScheduleGet(
|
|
600
|
+
const cc = new ScheduleEntryLockCCDailyRepeatingScheduleGet({
|
|
600
601
|
nodeId: this.endpoint.nodeId,
|
|
601
|
-
|
|
602
|
+
endpointIndex: this.endpoint.index,
|
|
602
603
|
...slot,
|
|
603
604
|
});
|
|
604
|
-
const result = await this.
|
|
605
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
605
606
|
if (result?.weekdays != undefined) {
|
|
606
607
|
return {
|
|
607
608
|
weekdays: result.weekdays,
|
|
@@ -614,11 +615,11 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
614
615
|
}
|
|
615
616
|
async getTimezone() {
|
|
616
617
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.TimeOffsetGet);
|
|
617
|
-
const cc = new ScheduleEntryLockCCTimeOffsetGet(
|
|
618
|
+
const cc = new ScheduleEntryLockCCTimeOffsetGet({
|
|
618
619
|
nodeId: this.endpoint.nodeId,
|
|
619
|
-
|
|
620
|
+
endpointIndex: this.endpoint.index,
|
|
620
621
|
});
|
|
621
|
-
const result = await this.
|
|
622
|
+
const result = await this.host.sendCommand(cc, this.commandOptions);
|
|
622
623
|
if (result) {
|
|
623
624
|
return (0, shared_1.pick)(result, ["standardOffset", "dstOffset"]);
|
|
624
625
|
}
|
|
@@ -626,12 +627,12 @@ let ScheduleEntryLockCCAPI = class ScheduleEntryLockCCAPI extends API_1.CCAPI {
|
|
|
626
627
|
async setTimezone(timezone) {
|
|
627
628
|
__assertType("timezone", "Timezone", __assertType__Timezone.bind(void 0, timezone));
|
|
628
629
|
this.assertSupportsCommand(_Types_1.ScheduleEntryLockCommand, _Types_1.ScheduleEntryLockCommand.TimeOffsetSet);
|
|
629
|
-
const cc = new ScheduleEntryLockCCTimeOffsetSet(
|
|
630
|
+
const cc = new ScheduleEntryLockCCTimeOffsetSet({
|
|
630
631
|
nodeId: this.endpoint.nodeId,
|
|
631
|
-
|
|
632
|
+
endpointIndex: this.endpoint.index,
|
|
632
633
|
...timezone,
|
|
633
634
|
});
|
|
634
|
-
return this.
|
|
635
|
+
return this.host.sendCommand(cc, this.commandOptions);
|
|
635
636
|
}
|
|
636
637
|
};
|
|
637
638
|
exports.ScheduleEntryLockCCAPI = ScheduleEntryLockCCAPI;
|
|
@@ -639,18 +640,18 @@ exports.ScheduleEntryLockCCAPI = ScheduleEntryLockCCAPI = __decorate([
|
|
|
639
640
|
(0, CommandClassDecorators_1.API)(core_1.CommandClasses["Schedule Entry Lock"])
|
|
640
641
|
], ScheduleEntryLockCCAPI);
|
|
641
642
|
let ScheduleEntryLockCC = class ScheduleEntryLockCC extends CommandClass_1.CommandClass {
|
|
642
|
-
async interview(
|
|
643
|
-
const node = this.getNode(
|
|
644
|
-
const endpoint = this.getEndpoint(
|
|
645
|
-
const api = API_1.CCAPI.create(core_1.CommandClasses["Schedule Entry Lock"],
|
|
643
|
+
async interview(ctx) {
|
|
644
|
+
const node = this.getNode(ctx);
|
|
645
|
+
const endpoint = this.getEndpoint(ctx);
|
|
646
|
+
const api = API_1.CCAPI.create(core_1.CommandClasses["Schedule Entry Lock"], ctx, endpoint).withOptions({
|
|
646
647
|
priority: core_1.MessagePriority.NodeQuery,
|
|
647
648
|
});
|
|
648
|
-
|
|
649
|
+
ctx.logNode(node.id, {
|
|
649
650
|
endpoint: this.endpointIndex,
|
|
650
651
|
message: `Interviewing ${this.ccName}...`,
|
|
651
652
|
direction: "none",
|
|
652
653
|
});
|
|
653
|
-
|
|
654
|
+
ctx.logNode(node.id, {
|
|
654
655
|
endpoint: this.endpointIndex,
|
|
655
656
|
message: "Querying supported number of schedule slots...",
|
|
656
657
|
direction: "outbound",
|
|
@@ -664,7 +665,7 @@ day of year: ${slotsResp.numYearDaySlots}`;
|
|
|
664
665
|
logMessage += `
|
|
665
666
|
daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
666
667
|
}
|
|
667
|
-
|
|
668
|
+
ctx.logNode(node.id, {
|
|
668
669
|
endpoint: this.endpointIndex,
|
|
669
670
|
message: logMessage,
|
|
670
671
|
direction: "inbound",
|
|
@@ -674,7 +675,7 @@ daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
|
674
675
|
if (api.supportsCommand(_Types_1.ScheduleEntryLockCommand.TimeOffsetSet)
|
|
675
676
|
&& (!endpoint.supportsCC(core_1.CommandClasses.Time)
|
|
676
677
|
|| endpoint.getCCVersion(core_1.CommandClasses.Time) < 2)) {
|
|
677
|
-
|
|
678
|
+
ctx.logNode(node.id, {
|
|
678
679
|
endpoint: this.endpointIndex,
|
|
679
680
|
message: "setting timezone information...",
|
|
680
681
|
direction: "outbound",
|
|
@@ -684,34 +685,34 @@ daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
|
684
685
|
await api.setTimezone(timezone);
|
|
685
686
|
}
|
|
686
687
|
// Remember that the interview is complete
|
|
687
|
-
this.setInterviewComplete(
|
|
688
|
+
this.setInterviewComplete(ctx, true);
|
|
688
689
|
}
|
|
689
690
|
/**
|
|
690
691
|
* Returns the number of supported day-of-week slots.
|
|
691
692
|
* This only works AFTER the interview process
|
|
692
693
|
*/
|
|
693
|
-
static getNumWeekDaySlotsCached(
|
|
694
|
-
return
|
|
694
|
+
static getNumWeekDaySlotsCached(ctx, endpoint) {
|
|
695
|
+
return ctx
|
|
695
696
|
.getValueDB(endpoint.nodeId)
|
|
696
|
-
.getValue(exports.ScheduleEntryLockCCValues.numWeekDaySlots.endpoint(endpoint.index)) || 0
|
|
697
|
+
.getValue(exports.ScheduleEntryLockCCValues.numWeekDaySlots.endpoint(endpoint.index)) || 0;
|
|
697
698
|
}
|
|
698
699
|
/**
|
|
699
700
|
* Returns the number of supported day-of-year slots.
|
|
700
701
|
* This only works AFTER the interview process
|
|
701
702
|
*/
|
|
702
|
-
static getNumYearDaySlotsCached(
|
|
703
|
-
return
|
|
703
|
+
static getNumYearDaySlotsCached(ctx, endpoint) {
|
|
704
|
+
return ctx
|
|
704
705
|
.getValueDB(endpoint.nodeId)
|
|
705
|
-
.getValue(exports.ScheduleEntryLockCCValues.numYearDaySlots.endpoint(endpoint.index)) || 0
|
|
706
|
+
.getValue(exports.ScheduleEntryLockCCValues.numYearDaySlots.endpoint(endpoint.index)) || 0;
|
|
706
707
|
}
|
|
707
708
|
/**
|
|
708
709
|
* Returns the number of supported daily-repeating slots.
|
|
709
710
|
* This only works AFTER the interview process
|
|
710
711
|
*/
|
|
711
|
-
static getNumDailyRepeatingSlotsCached(
|
|
712
|
-
return
|
|
712
|
+
static getNumDailyRepeatingSlotsCached(ctx, endpoint) {
|
|
713
|
+
return ctx
|
|
713
714
|
.getValueDB(endpoint.nodeId)
|
|
714
|
-
.getValue(exports.ScheduleEntryLockCCValues.numDailyRepeatingSlots.endpoint(endpoint.index)) || 0
|
|
715
|
+
.getValue(exports.ScheduleEntryLockCCValues.numDailyRepeatingSlots.endpoint(endpoint.index)) || 0;
|
|
715
716
|
}
|
|
716
717
|
/**
|
|
717
718
|
* Returns whether scheduling for a given user ID (most likely) enabled. Since the Schedule Entry Lock CC
|
|
@@ -721,8 +722,8 @@ daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
|
721
722
|
* with existing schedules is queried. To be sure, disable scheduling for all users and enable
|
|
722
723
|
* only the desired ones.
|
|
723
724
|
*/
|
|
724
|
-
static getUserCodeScheduleEnabledCached(
|
|
725
|
-
return !!
|
|
725
|
+
static getUserCodeScheduleEnabledCached(ctx, endpoint, userId) {
|
|
726
|
+
return !!ctx
|
|
726
727
|
.getValueDB(endpoint.nodeId)
|
|
727
728
|
.getValue(exports.ScheduleEntryLockCCValues.userEnabled(userId).endpoint(endpoint.index));
|
|
728
729
|
}
|
|
@@ -734,8 +735,8 @@ daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
|
734
735
|
* with existing schedules is queried. To be sure, edit a schedule of the desired kind
|
|
735
736
|
* which will automatically switch the user to that scheduling kind.
|
|
736
737
|
*/
|
|
737
|
-
static getUserCodeScheduleKindCached(
|
|
738
|
-
return
|
|
738
|
+
static getUserCodeScheduleKindCached(ctx, endpoint, userId) {
|
|
739
|
+
return ctx
|
|
739
740
|
.getValueDB(endpoint.nodeId)
|
|
740
741
|
.getValue(exports.ScheduleEntryLockCCValues.scheduleKind(userId).endpoint(endpoint.index));
|
|
741
742
|
}
|
|
@@ -747,8 +748,8 @@ daily repeating: ${slotsResp.numDailyRepeatingSlots}`;
|
|
|
747
748
|
*
|
|
748
749
|
* This only works AFTER the interview process.
|
|
749
750
|
*/
|
|
750
|
-
static getScheduleCached(
|
|
751
|
-
return
|
|
751
|
+
static getScheduleCached(ctx, endpoint, scheduleKind, userId, slotId) {
|
|
752
|
+
return ctx
|
|
752
753
|
.getValueDB(endpoint.nodeId)
|
|
753
754
|
.getValue(exports.ScheduleEntryLockCCValues.schedule(scheduleKind, userId, slotId).endpoint(endpoint.index));
|
|
754
755
|
}
|
|
@@ -759,28 +760,31 @@ exports.ScheduleEntryLockCC = ScheduleEntryLockCC = __decorate([
|
|
|
759
760
|
(0, CommandClassDecorators_1.implementedVersion)(3),
|
|
760
761
|
(0, CommandClassDecorators_1.ccValues)(exports.ScheduleEntryLockCCValues)
|
|
761
762
|
], ScheduleEntryLockCC);
|
|
762
|
-
let ScheduleEntryLockCCEnableSet = class ScheduleEntryLockCCEnableSet extends ScheduleEntryLockCC {
|
|
763
|
-
constructor(
|
|
764
|
-
super(
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
763
|
+
let ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet_1 = class ScheduleEntryLockCCEnableSet extends ScheduleEntryLockCC {
|
|
764
|
+
constructor(options) {
|
|
765
|
+
super(options);
|
|
766
|
+
this.userId = options.userId;
|
|
767
|
+
this.enabled = options.enabled;
|
|
768
|
+
}
|
|
769
|
+
static from(raw, ctx) {
|
|
770
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
771
|
+
const userId = raw.payload[0];
|
|
772
|
+
const enabled = raw.payload[1] === 0x01;
|
|
773
|
+
return new ScheduleEntryLockCCEnableSet_1({
|
|
774
|
+
nodeId: ctx.sourceNodeId,
|
|
775
|
+
userId,
|
|
776
|
+
enabled,
|
|
777
|
+
});
|
|
774
778
|
}
|
|
775
779
|
userId;
|
|
776
780
|
enabled;
|
|
777
|
-
serialize() {
|
|
781
|
+
serialize(ctx) {
|
|
778
782
|
this.payload = Buffer.from([this.userId, this.enabled ? 0x01 : 0x00]);
|
|
779
|
-
return super.serialize();
|
|
783
|
+
return super.serialize(ctx);
|
|
780
784
|
}
|
|
781
|
-
toLogEntry(
|
|
785
|
+
toLogEntry(ctx) {
|
|
782
786
|
return {
|
|
783
|
-
...super.toLogEntry(
|
|
787
|
+
...super.toLogEntry(ctx),
|
|
784
788
|
message: {
|
|
785
789
|
"user ID": this.userId,
|
|
786
790
|
action: this.enabled ? "enable" : "disable",
|
|
@@ -789,29 +793,31 @@ let ScheduleEntryLockCCEnableSet = class ScheduleEntryLockCCEnableSet extends Sc
|
|
|
789
793
|
}
|
|
790
794
|
};
|
|
791
795
|
exports.ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet;
|
|
792
|
-
exports.ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet = __decorate([
|
|
796
|
+
exports.ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet = ScheduleEntryLockCCEnableSet_1 = __decorate([
|
|
793
797
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.EnableSet),
|
|
794
798
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
795
799
|
], ScheduleEntryLockCCEnableSet);
|
|
796
|
-
let ScheduleEntryLockCCEnableAllSet = class ScheduleEntryLockCCEnableAllSet extends ScheduleEntryLockCC {
|
|
797
|
-
constructor(
|
|
798
|
-
super(
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
800
|
+
let ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet_1 = class ScheduleEntryLockCCEnableAllSet extends ScheduleEntryLockCC {
|
|
801
|
+
constructor(options) {
|
|
802
|
+
super(options);
|
|
803
|
+
this.enabled = options.enabled;
|
|
804
|
+
}
|
|
805
|
+
static from(raw, ctx) {
|
|
806
|
+
(0, core_1.validatePayload)(raw.payload.length >= 1);
|
|
807
|
+
const enabled = raw.payload[0] === 0x01;
|
|
808
|
+
return new ScheduleEntryLockCCEnableAllSet_1({
|
|
809
|
+
nodeId: ctx.sourceNodeId,
|
|
810
|
+
enabled,
|
|
811
|
+
});
|
|
806
812
|
}
|
|
807
813
|
enabled;
|
|
808
|
-
serialize() {
|
|
814
|
+
serialize(ctx) {
|
|
809
815
|
this.payload = Buffer.from([this.enabled ? 0x01 : 0x00]);
|
|
810
|
-
return super.serialize();
|
|
816
|
+
return super.serialize(ctx);
|
|
811
817
|
}
|
|
812
|
-
toLogEntry(
|
|
818
|
+
toLogEntry(ctx) {
|
|
813
819
|
return {
|
|
814
|
-
...super.toLogEntry(
|
|
820
|
+
...super.toLogEntry(ctx),
|
|
815
821
|
message: {
|
|
816
822
|
action: this.enabled ? "enable all" : "disable all",
|
|
817
823
|
},
|
|
@@ -819,39 +825,44 @@ let ScheduleEntryLockCCEnableAllSet = class ScheduleEntryLockCCEnableAllSet exte
|
|
|
819
825
|
}
|
|
820
826
|
};
|
|
821
827
|
exports.ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet;
|
|
822
|
-
exports.ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet = __decorate([
|
|
828
|
+
exports.ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet = ScheduleEntryLockCCEnableAllSet_1 = __decorate([
|
|
823
829
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.EnableAllSet),
|
|
824
830
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
825
831
|
], ScheduleEntryLockCCEnableAllSet);
|
|
826
|
-
let ScheduleEntryLockCCSupportedReport = class ScheduleEntryLockCCSupportedReport extends ScheduleEntryLockCC {
|
|
827
|
-
constructor(
|
|
828
|
-
super(
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
832
|
+
let ScheduleEntryLockCCSupportedReport = ScheduleEntryLockCCSupportedReport_1 = class ScheduleEntryLockCCSupportedReport extends ScheduleEntryLockCC {
|
|
833
|
+
constructor(options) {
|
|
834
|
+
super(options);
|
|
835
|
+
this.numWeekDaySlots = options.numWeekDaySlots;
|
|
836
|
+
this.numYearDaySlots = options.numYearDaySlots;
|
|
837
|
+
this.numDailyRepeatingSlots = options.numDailyRepeatingSlots;
|
|
838
|
+
}
|
|
839
|
+
static from(raw, ctx) {
|
|
840
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
841
|
+
const numWeekDaySlots = raw.payload[0];
|
|
842
|
+
const numYearDaySlots = raw.payload[1];
|
|
843
|
+
let numDailyRepeatingSlots;
|
|
844
|
+
if (raw.payload.length >= 3) {
|
|
845
|
+
numDailyRepeatingSlots = raw.payload[2];
|
|
846
|
+
}
|
|
847
|
+
return new ScheduleEntryLockCCSupportedReport_1({
|
|
848
|
+
nodeId: ctx.sourceNodeId,
|
|
849
|
+
numWeekDaySlots,
|
|
850
|
+
numYearDaySlots,
|
|
851
|
+
numDailyRepeatingSlots,
|
|
852
|
+
});
|
|
842
853
|
}
|
|
843
854
|
numWeekDaySlots;
|
|
844
855
|
numYearDaySlots;
|
|
845
856
|
numDailyRepeatingSlots;
|
|
846
|
-
serialize() {
|
|
857
|
+
serialize(ctx) {
|
|
847
858
|
this.payload = Buffer.from([
|
|
848
859
|
this.numWeekDaySlots,
|
|
849
860
|
this.numYearDaySlots,
|
|
850
861
|
this.numDailyRepeatingSlots ?? 0,
|
|
851
862
|
]);
|
|
852
|
-
return super.serialize();
|
|
863
|
+
return super.serialize(ctx);
|
|
853
864
|
}
|
|
854
|
-
toLogEntry(
|
|
865
|
+
toLogEntry(ctx) {
|
|
855
866
|
const message = {
|
|
856
867
|
"no. of weekday schedule slots": this.numWeekDaySlots,
|
|
857
868
|
"no. of day-of-year schedule slots": this.numYearDaySlots,
|
|
@@ -861,7 +872,7 @@ let ScheduleEntryLockCCSupportedReport = class ScheduleEntryLockCCSupportedRepor
|
|
|
861
872
|
this.numDailyRepeatingSlots;
|
|
862
873
|
}
|
|
863
874
|
return {
|
|
864
|
-
...super.toLogEntry(
|
|
875
|
+
...super.toLogEntry(ctx),
|
|
865
876
|
message,
|
|
866
877
|
};
|
|
867
878
|
}
|
|
@@ -876,7 +887,7 @@ __decorate([
|
|
|
876
887
|
__decorate([
|
|
877
888
|
(0, CommandClassDecorators_1.ccValue)(exports.ScheduleEntryLockCCValues.numDailyRepeatingSlots)
|
|
878
889
|
], ScheduleEntryLockCCSupportedReport.prototype, "numDailyRepeatingSlots", void 0);
|
|
879
|
-
exports.ScheduleEntryLockCCSupportedReport = ScheduleEntryLockCCSupportedReport = __decorate([
|
|
890
|
+
exports.ScheduleEntryLockCCSupportedReport = ScheduleEntryLockCCSupportedReport = ScheduleEntryLockCCSupportedReport_1 = __decorate([
|
|
880
891
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.SupportedReport)
|
|
881
892
|
], ScheduleEntryLockCCSupportedReport);
|
|
882
893
|
let ScheduleEntryLockCCSupportedGet = class ScheduleEntryLockCCSupportedGet extends ScheduleEntryLockCC {
|
|
@@ -886,37 +897,52 @@ exports.ScheduleEntryLockCCSupportedGet = ScheduleEntryLockCCSupportedGet = __de
|
|
|
886
897
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.SupportedGet),
|
|
887
898
|
(0, CommandClassDecorators_1.expectedCCResponse)(ScheduleEntryLockCCSupportedReport)
|
|
888
899
|
], ScheduleEntryLockCCSupportedGet);
|
|
889
|
-
let ScheduleEntryLockCCWeekDayScheduleSet = class ScheduleEntryLockCCWeekDayScheduleSet extends ScheduleEntryLockCC {
|
|
890
|
-
constructor(
|
|
891
|
-
super(
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
this.
|
|
898
|
-
this.
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
this.weekday = this.payload[3];
|
|
902
|
-
this.startHour = this.payload[4];
|
|
903
|
-
this.startMinute = this.payload[5];
|
|
904
|
-
this.stopHour = this.payload[6];
|
|
905
|
-
this.stopMinute = this.payload[7];
|
|
906
|
-
}
|
|
900
|
+
let ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet_1 = class ScheduleEntryLockCCWeekDayScheduleSet extends ScheduleEntryLockCC {
|
|
901
|
+
constructor(options) {
|
|
902
|
+
super(options);
|
|
903
|
+
this.userId = options.userId;
|
|
904
|
+
this.slotId = options.slotId;
|
|
905
|
+
this.action = options.action;
|
|
906
|
+
if (options.action === _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
907
|
+
this.weekday = options.weekday;
|
|
908
|
+
this.startHour = options.startHour;
|
|
909
|
+
this.startMinute = options.startMinute;
|
|
910
|
+
this.stopHour = options.stopHour;
|
|
911
|
+
this.stopMinute = options.stopMinute;
|
|
907
912
|
}
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
913
|
+
}
|
|
914
|
+
static from(raw, ctx) {
|
|
915
|
+
(0, core_1.validatePayload)(raw.payload.length >= 3);
|
|
916
|
+
const action = raw.payload[0];
|
|
917
|
+
(0, core_1.validatePayload)(action === _Types_1.ScheduleEntryLockSetAction.Set
|
|
918
|
+
|| action === _Types_1.ScheduleEntryLockSetAction.Erase);
|
|
919
|
+
const userId = raw.payload[1];
|
|
920
|
+
const slotId = raw.payload[2];
|
|
921
|
+
if (action !== _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
922
|
+
return new ScheduleEntryLockCCWeekDayScheduleSet_1({
|
|
923
|
+
nodeId: ctx.sourceNodeId,
|
|
924
|
+
action,
|
|
925
|
+
userId,
|
|
926
|
+
slotId,
|
|
927
|
+
});
|
|
919
928
|
}
|
|
929
|
+
(0, core_1.validatePayload)(raw.payload.length >= 8);
|
|
930
|
+
const weekday = raw.payload[3];
|
|
931
|
+
const startHour = raw.payload[4];
|
|
932
|
+
const startMinute = raw.payload[5];
|
|
933
|
+
const stopHour = raw.payload[6];
|
|
934
|
+
const stopMinute = raw.payload[7];
|
|
935
|
+
return new ScheduleEntryLockCCWeekDayScheduleSet_1({
|
|
936
|
+
nodeId: ctx.sourceNodeId,
|
|
937
|
+
action,
|
|
938
|
+
userId,
|
|
939
|
+
slotId,
|
|
940
|
+
weekday,
|
|
941
|
+
startHour,
|
|
942
|
+
startMinute,
|
|
943
|
+
stopHour,
|
|
944
|
+
stopMinute,
|
|
945
|
+
});
|
|
920
946
|
}
|
|
921
947
|
userId;
|
|
922
948
|
slotId;
|
|
@@ -926,7 +952,7 @@ let ScheduleEntryLockCCWeekDayScheduleSet = class ScheduleEntryLockCCWeekDaySche
|
|
|
926
952
|
startMinute;
|
|
927
953
|
stopHour;
|
|
928
954
|
stopMinute;
|
|
929
|
-
serialize() {
|
|
955
|
+
serialize(ctx) {
|
|
930
956
|
this.payload = Buffer.from([
|
|
931
957
|
this.action,
|
|
932
958
|
this.userId,
|
|
@@ -940,9 +966,9 @@ let ScheduleEntryLockCCWeekDayScheduleSet = class ScheduleEntryLockCCWeekDaySche
|
|
|
940
966
|
this.stopHour ?? 0xff,
|
|
941
967
|
this.stopMinute ?? 0xff,
|
|
942
968
|
]);
|
|
943
|
-
return super.serialize();
|
|
969
|
+
return super.serialize(ctx);
|
|
944
970
|
}
|
|
945
|
-
toLogEntry(
|
|
971
|
+
toLogEntry(ctx) {
|
|
946
972
|
let message;
|
|
947
973
|
if (this.action === _Types_1.ScheduleEntryLockSetAction.Erase) {
|
|
948
974
|
message = {
|
|
@@ -962,50 +988,75 @@ let ScheduleEntryLockCCWeekDayScheduleSet = class ScheduleEntryLockCCWeekDaySche
|
|
|
962
988
|
};
|
|
963
989
|
}
|
|
964
990
|
return {
|
|
965
|
-
...super.toLogEntry(
|
|
991
|
+
...super.toLogEntry(ctx),
|
|
966
992
|
message,
|
|
967
993
|
};
|
|
968
994
|
}
|
|
969
995
|
};
|
|
970
996
|
exports.ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet;
|
|
971
|
-
exports.ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet = __decorate([
|
|
997
|
+
exports.ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet = ScheduleEntryLockCCWeekDayScheduleSet_1 = __decorate([
|
|
972
998
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.WeekDayScheduleSet),
|
|
973
999
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
974
1000
|
], ScheduleEntryLockCCWeekDayScheduleSet);
|
|
975
|
-
let ScheduleEntryLockCCWeekDayScheduleReport = class ScheduleEntryLockCCWeekDayScheduleReport extends ScheduleEntryLockCC {
|
|
976
|
-
constructor(
|
|
977
|
-
super(
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
1001
|
+
let ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport_1 = class ScheduleEntryLockCCWeekDayScheduleReport extends ScheduleEntryLockCC {
|
|
1002
|
+
constructor(options) {
|
|
1003
|
+
super(options);
|
|
1004
|
+
this.userId = options.userId;
|
|
1005
|
+
this.slotId = options.slotId;
|
|
1006
|
+
this.weekday = options.weekday;
|
|
1007
|
+
this.startHour = options.startHour;
|
|
1008
|
+
this.startMinute = options.startMinute;
|
|
1009
|
+
this.stopHour = options.stopHour;
|
|
1010
|
+
this.stopMinute = options.stopMinute;
|
|
1011
|
+
}
|
|
1012
|
+
static from(raw, ctx) {
|
|
1013
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
1014
|
+
const userId = raw.payload[0];
|
|
1015
|
+
const slotId = raw.payload[1];
|
|
1016
|
+
let ccOptions = {
|
|
1017
|
+
userId,
|
|
1018
|
+
slotId,
|
|
1019
|
+
};
|
|
1020
|
+
let weekday;
|
|
1021
|
+
let startHour;
|
|
1022
|
+
let startMinute;
|
|
1023
|
+
let stopHour;
|
|
1024
|
+
let stopMinute;
|
|
1025
|
+
if (raw.payload.length >= 7) {
|
|
1026
|
+
if (raw.payload[2] !== 0xff) {
|
|
1027
|
+
weekday = raw.payload[2];
|
|
1028
|
+
}
|
|
1029
|
+
if (raw.payload[3] !== 0xff) {
|
|
1030
|
+
startHour = raw.payload[3];
|
|
1031
|
+
}
|
|
1032
|
+
if (raw.payload[4] !== 0xff) {
|
|
1033
|
+
startMinute = raw.payload[4];
|
|
1034
|
+
}
|
|
1035
|
+
if (raw.payload[5] !== 0xff) {
|
|
1036
|
+
stopHour = raw.payload[5];
|
|
1037
|
+
}
|
|
1038
|
+
if (raw.payload[6] !== 0xff) {
|
|
1039
|
+
stopMinute = raw.payload[6];
|
|
998
1040
|
}
|
|
999
1041
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1042
|
+
if (weekday != undefined
|
|
1043
|
+
&& startHour != undefined
|
|
1044
|
+
&& startMinute != undefined
|
|
1045
|
+
&& stopHour != undefined
|
|
1046
|
+
&& stopMinute != undefined) {
|
|
1047
|
+
ccOptions = {
|
|
1048
|
+
...ccOptions,
|
|
1049
|
+
weekday,
|
|
1050
|
+
startHour,
|
|
1051
|
+
startMinute,
|
|
1052
|
+
stopHour,
|
|
1053
|
+
stopMinute,
|
|
1054
|
+
};
|
|
1008
1055
|
}
|
|
1056
|
+
return new ScheduleEntryLockCCWeekDayScheduleReport_1({
|
|
1057
|
+
nodeId: ctx.sourceNodeId,
|
|
1058
|
+
...ccOptions,
|
|
1059
|
+
});
|
|
1009
1060
|
}
|
|
1010
1061
|
userId;
|
|
1011
1062
|
slotId;
|
|
@@ -1014,10 +1065,10 @@ let ScheduleEntryLockCCWeekDayScheduleReport = class ScheduleEntryLockCCWeekDayS
|
|
|
1014
1065
|
startMinute;
|
|
1015
1066
|
stopHour;
|
|
1016
1067
|
stopMinute;
|
|
1017
|
-
persistValues(
|
|
1018
|
-
if (!super.persistValues(
|
|
1068
|
+
persistValues(ctx) {
|
|
1069
|
+
if (!super.persistValues(ctx))
|
|
1019
1070
|
return false;
|
|
1020
|
-
persistSchedule.call(this,
|
|
1071
|
+
persistSchedule.call(this, ctx, _Types_1.ScheduleEntryLockScheduleKind.WeekDay, this.userId, this.slotId, this.weekday != undefined
|
|
1021
1072
|
? {
|
|
1022
1073
|
weekday: this.weekday,
|
|
1023
1074
|
startHour: this.startHour,
|
|
@@ -1028,7 +1079,7 @@ let ScheduleEntryLockCCWeekDayScheduleReport = class ScheduleEntryLockCCWeekDayS
|
|
|
1028
1079
|
: false);
|
|
1029
1080
|
return true;
|
|
1030
1081
|
}
|
|
1031
|
-
serialize() {
|
|
1082
|
+
serialize(ctx) {
|
|
1032
1083
|
this.payload = Buffer.from([
|
|
1033
1084
|
this.userId,
|
|
1034
1085
|
this.slotId,
|
|
@@ -1038,9 +1089,9 @@ let ScheduleEntryLockCCWeekDayScheduleReport = class ScheduleEntryLockCCWeekDayS
|
|
|
1038
1089
|
this.stopHour ?? 0xff,
|
|
1039
1090
|
this.stopMinute ?? 0xff,
|
|
1040
1091
|
]);
|
|
1041
|
-
return super.serialize();
|
|
1092
|
+
return super.serialize(ctx);
|
|
1042
1093
|
}
|
|
1043
|
-
toLogEntry(
|
|
1094
|
+
toLogEntry(ctx) {
|
|
1044
1095
|
let message;
|
|
1045
1096
|
if (this.weekday == undefined) {
|
|
1046
1097
|
message = {
|
|
@@ -1059,37 +1110,40 @@ let ScheduleEntryLockCCWeekDayScheduleReport = class ScheduleEntryLockCCWeekDayS
|
|
|
1059
1110
|
};
|
|
1060
1111
|
}
|
|
1061
1112
|
return {
|
|
1062
|
-
...super.toLogEntry(
|
|
1113
|
+
...super.toLogEntry(ctx),
|
|
1063
1114
|
message,
|
|
1064
1115
|
};
|
|
1065
1116
|
}
|
|
1066
1117
|
};
|
|
1067
1118
|
exports.ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport;
|
|
1068
|
-
exports.ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport = __decorate([
|
|
1119
|
+
exports.ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport = ScheduleEntryLockCCWeekDayScheduleReport_1 = __decorate([
|
|
1069
1120
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.WeekDayScheduleReport)
|
|
1070
1121
|
], ScheduleEntryLockCCWeekDayScheduleReport);
|
|
1071
|
-
let ScheduleEntryLockCCWeekDayScheduleGet = class ScheduleEntryLockCCWeekDayScheduleGet extends ScheduleEntryLockCC {
|
|
1072
|
-
constructor(
|
|
1073
|
-
super(
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1122
|
+
let ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet_1 = class ScheduleEntryLockCCWeekDayScheduleGet extends ScheduleEntryLockCC {
|
|
1123
|
+
constructor(options) {
|
|
1124
|
+
super(options);
|
|
1125
|
+
this.userId = options.userId;
|
|
1126
|
+
this.slotId = options.slotId;
|
|
1127
|
+
}
|
|
1128
|
+
static from(raw, ctx) {
|
|
1129
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
1130
|
+
const userId = raw.payload[0];
|
|
1131
|
+
const slotId = raw.payload[1];
|
|
1132
|
+
return new ScheduleEntryLockCCWeekDayScheduleGet_1({
|
|
1133
|
+
nodeId: ctx.sourceNodeId,
|
|
1134
|
+
userId,
|
|
1135
|
+
slotId,
|
|
1136
|
+
});
|
|
1083
1137
|
}
|
|
1084
1138
|
userId;
|
|
1085
1139
|
slotId;
|
|
1086
|
-
serialize() {
|
|
1140
|
+
serialize(ctx) {
|
|
1087
1141
|
this.payload = Buffer.from([this.userId, this.slotId]);
|
|
1088
|
-
return super.serialize();
|
|
1142
|
+
return super.serialize(ctx);
|
|
1089
1143
|
}
|
|
1090
|
-
toLogEntry(
|
|
1144
|
+
toLogEntry(ctx) {
|
|
1091
1145
|
return {
|
|
1092
|
-
...super.toLogEntry(
|
|
1146
|
+
...super.toLogEntry(ctx),
|
|
1093
1147
|
message: {
|
|
1094
1148
|
"user ID": this.userId,
|
|
1095
1149
|
"slot #": this.slotId,
|
|
@@ -1098,51 +1152,71 @@ let ScheduleEntryLockCCWeekDayScheduleGet = class ScheduleEntryLockCCWeekDaySche
|
|
|
1098
1152
|
}
|
|
1099
1153
|
};
|
|
1100
1154
|
exports.ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet;
|
|
1101
|
-
exports.ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet = __decorate([
|
|
1155
|
+
exports.ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet = ScheduleEntryLockCCWeekDayScheduleGet_1 = __decorate([
|
|
1102
1156
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.WeekDayScheduleGet),
|
|
1103
1157
|
(0, CommandClassDecorators_1.expectedCCResponse)(ScheduleEntryLockCCWeekDayScheduleReport)
|
|
1104
1158
|
], ScheduleEntryLockCCWeekDayScheduleGet);
|
|
1105
|
-
let ScheduleEntryLockCCYearDayScheduleSet = class ScheduleEntryLockCCYearDayScheduleSet extends ScheduleEntryLockCC {
|
|
1106
|
-
constructor(
|
|
1107
|
-
super(
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
this.stopYear = this.payload[8];
|
|
1123
|
-
this.stopMonth = this.payload[9];
|
|
1124
|
-
this.stopDay = this.payload[10];
|
|
1125
|
-
this.stopHour = this.payload[11];
|
|
1126
|
-
this.stopMinute = this.payload[12];
|
|
1127
|
-
}
|
|
1159
|
+
let ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet_1 = class ScheduleEntryLockCCYearDayScheduleSet extends ScheduleEntryLockCC {
|
|
1160
|
+
constructor(options) {
|
|
1161
|
+
super(options);
|
|
1162
|
+
this.userId = options.userId;
|
|
1163
|
+
this.slotId = options.slotId;
|
|
1164
|
+
this.action = options.action;
|
|
1165
|
+
if (options.action === _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
1166
|
+
this.startYear = options.startYear;
|
|
1167
|
+
this.startMonth = options.startMonth;
|
|
1168
|
+
this.startDay = options.startDay;
|
|
1169
|
+
this.startHour = options.startHour;
|
|
1170
|
+
this.startMinute = options.startMinute;
|
|
1171
|
+
this.stopYear = options.stopYear;
|
|
1172
|
+
this.stopMonth = options.stopMonth;
|
|
1173
|
+
this.stopDay = options.stopDay;
|
|
1174
|
+
this.stopHour = options.stopHour;
|
|
1175
|
+
this.stopMinute = options.stopMinute;
|
|
1128
1176
|
}
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
}
|
|
1177
|
+
}
|
|
1178
|
+
static from(raw, ctx) {
|
|
1179
|
+
(0, core_1.validatePayload)(raw.payload.length >= 3);
|
|
1180
|
+
const action = raw.payload[0];
|
|
1181
|
+
(0, core_1.validatePayload)(action === _Types_1.ScheduleEntryLockSetAction.Set
|
|
1182
|
+
|| action === _Types_1.ScheduleEntryLockSetAction.Erase);
|
|
1183
|
+
const userId = raw.payload[1];
|
|
1184
|
+
const slotId = raw.payload[2];
|
|
1185
|
+
if (action !== _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
1186
|
+
return new ScheduleEntryLockCCYearDayScheduleSet_1({
|
|
1187
|
+
nodeId: ctx.sourceNodeId,
|
|
1188
|
+
action,
|
|
1189
|
+
userId,
|
|
1190
|
+
slotId,
|
|
1191
|
+
});
|
|
1145
1192
|
}
|
|
1193
|
+
(0, core_1.validatePayload)(raw.payload.length >= 13);
|
|
1194
|
+
const startYear = raw.payload[3];
|
|
1195
|
+
const startMonth = raw.payload[4];
|
|
1196
|
+
const startDay = raw.payload[5];
|
|
1197
|
+
const startHour = raw.payload[6];
|
|
1198
|
+
const startMinute = raw.payload[7];
|
|
1199
|
+
const stopYear = raw.payload[8];
|
|
1200
|
+
const stopMonth = raw.payload[9];
|
|
1201
|
+
const stopDay = raw.payload[10];
|
|
1202
|
+
const stopHour = raw.payload[11];
|
|
1203
|
+
const stopMinute = raw.payload[12];
|
|
1204
|
+
return new ScheduleEntryLockCCYearDayScheduleSet_1({
|
|
1205
|
+
nodeId: ctx.sourceNodeId,
|
|
1206
|
+
action,
|
|
1207
|
+
userId,
|
|
1208
|
+
slotId,
|
|
1209
|
+
startYear,
|
|
1210
|
+
startMonth,
|
|
1211
|
+
startDay,
|
|
1212
|
+
startHour,
|
|
1213
|
+
startMinute,
|
|
1214
|
+
stopYear,
|
|
1215
|
+
stopMonth,
|
|
1216
|
+
stopDay,
|
|
1217
|
+
stopHour,
|
|
1218
|
+
stopMinute,
|
|
1219
|
+
});
|
|
1146
1220
|
}
|
|
1147
1221
|
userId;
|
|
1148
1222
|
slotId;
|
|
@@ -1157,7 +1231,7 @@ let ScheduleEntryLockCCYearDayScheduleSet = class ScheduleEntryLockCCYearDaySche
|
|
|
1157
1231
|
stopDay;
|
|
1158
1232
|
stopHour;
|
|
1159
1233
|
stopMinute;
|
|
1160
|
-
serialize() {
|
|
1234
|
+
serialize(ctx) {
|
|
1161
1235
|
this.payload = Buffer.from([
|
|
1162
1236
|
this.action,
|
|
1163
1237
|
this.userId,
|
|
@@ -1176,9 +1250,9 @@ let ScheduleEntryLockCCYearDayScheduleSet = class ScheduleEntryLockCCYearDaySche
|
|
|
1176
1250
|
this.stopHour ?? 0xff,
|
|
1177
1251
|
this.stopMinute ?? 0xff,
|
|
1178
1252
|
]);
|
|
1179
|
-
return super.serialize();
|
|
1253
|
+
return super.serialize(ctx);
|
|
1180
1254
|
}
|
|
1181
|
-
toLogEntry(
|
|
1255
|
+
toLogEntry(ctx) {
|
|
1182
1256
|
let message;
|
|
1183
1257
|
if (this.action === _Types_1.ScheduleEntryLockSetAction.Erase) {
|
|
1184
1258
|
message = {
|
|
@@ -1197,70 +1271,110 @@ let ScheduleEntryLockCCYearDayScheduleSet = class ScheduleEntryLockCCYearDaySche
|
|
|
1197
1271
|
};
|
|
1198
1272
|
}
|
|
1199
1273
|
return {
|
|
1200
|
-
...super.toLogEntry(
|
|
1274
|
+
...super.toLogEntry(ctx),
|
|
1201
1275
|
message,
|
|
1202
1276
|
};
|
|
1203
1277
|
}
|
|
1204
1278
|
};
|
|
1205
1279
|
exports.ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet;
|
|
1206
|
-
exports.ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet = __decorate([
|
|
1280
|
+
exports.ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet = ScheduleEntryLockCCYearDayScheduleSet_1 = __decorate([
|
|
1207
1281
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.YearDayScheduleSet),
|
|
1208
1282
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
1209
1283
|
], ScheduleEntryLockCCYearDayScheduleSet);
|
|
1210
|
-
let ScheduleEntryLockCCYearDayScheduleReport = class ScheduleEntryLockCCYearDayScheduleReport extends ScheduleEntryLockCC {
|
|
1211
|
-
constructor(
|
|
1212
|
-
super(
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1284
|
+
let ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport_1 = class ScheduleEntryLockCCYearDayScheduleReport extends ScheduleEntryLockCC {
|
|
1285
|
+
constructor(options) {
|
|
1286
|
+
super(options);
|
|
1287
|
+
this.userId = options.userId;
|
|
1288
|
+
this.slotId = options.slotId;
|
|
1289
|
+
this.startYear = options.startYear;
|
|
1290
|
+
this.startMonth = options.startMonth;
|
|
1291
|
+
this.startDay = options.startDay;
|
|
1292
|
+
this.startHour = options.startHour;
|
|
1293
|
+
this.startMinute = options.startMinute;
|
|
1294
|
+
this.stopYear = options.stopYear;
|
|
1295
|
+
this.stopMonth = options.stopMonth;
|
|
1296
|
+
this.stopDay = options.stopDay;
|
|
1297
|
+
this.stopHour = options.stopHour;
|
|
1298
|
+
this.stopMinute = options.stopMinute;
|
|
1299
|
+
}
|
|
1300
|
+
static from(raw, ctx) {
|
|
1301
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
1302
|
+
const userId = raw.payload[0];
|
|
1303
|
+
const slotId = raw.payload[1];
|
|
1304
|
+
let ccOptions = {
|
|
1305
|
+
userId,
|
|
1306
|
+
slotId,
|
|
1307
|
+
};
|
|
1308
|
+
let startYear;
|
|
1309
|
+
let startMonth;
|
|
1310
|
+
let startDay;
|
|
1311
|
+
let startHour;
|
|
1312
|
+
let startMinute;
|
|
1313
|
+
let stopYear;
|
|
1314
|
+
let stopMonth;
|
|
1315
|
+
let stopDay;
|
|
1316
|
+
let stopHour;
|
|
1317
|
+
let stopMinute;
|
|
1318
|
+
if (raw.payload.length >= 12) {
|
|
1319
|
+
if (raw.payload[2] !== 0xff) {
|
|
1320
|
+
startYear = raw.payload[2];
|
|
1321
|
+
}
|
|
1322
|
+
if (raw.payload[3] !== 0xff) {
|
|
1323
|
+
startMonth = raw.payload[3];
|
|
1324
|
+
}
|
|
1325
|
+
if (raw.payload[4] !== 0xff) {
|
|
1326
|
+
startDay = raw.payload[4];
|
|
1327
|
+
}
|
|
1328
|
+
if (raw.payload[5] !== 0xff) {
|
|
1329
|
+
startHour = raw.payload[5];
|
|
1330
|
+
}
|
|
1331
|
+
if (raw.payload[6] !== 0xff) {
|
|
1332
|
+
startMinute = raw.payload[6];
|
|
1333
|
+
}
|
|
1334
|
+
if (raw.payload[7] !== 0xff) {
|
|
1335
|
+
stopYear = raw.payload[7];
|
|
1336
|
+
}
|
|
1337
|
+
if (raw.payload[8] !== 0xff) {
|
|
1338
|
+
stopMonth = raw.payload[8];
|
|
1339
|
+
}
|
|
1340
|
+
if (raw.payload[9] !== 0xff) {
|
|
1341
|
+
stopDay = raw.payload[9];
|
|
1342
|
+
}
|
|
1343
|
+
if (raw.payload[10] !== 0xff) {
|
|
1344
|
+
stopHour = raw.payload[10];
|
|
1345
|
+
}
|
|
1346
|
+
if (raw.payload[11] !== 0xff) {
|
|
1347
|
+
stopMinute = raw.payload[11];
|
|
1248
1348
|
}
|
|
1249
1349
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1350
|
+
if (startYear != undefined
|
|
1351
|
+
&& startMonth != undefined
|
|
1352
|
+
&& startDay != undefined
|
|
1353
|
+
&& startHour != undefined
|
|
1354
|
+
&& startMinute != undefined
|
|
1355
|
+
&& stopYear != undefined
|
|
1356
|
+
&& stopMonth != undefined
|
|
1357
|
+
&& stopDay != undefined
|
|
1358
|
+
&& stopHour != undefined
|
|
1359
|
+
&& stopMinute != undefined) {
|
|
1360
|
+
ccOptions = {
|
|
1361
|
+
...ccOptions,
|
|
1362
|
+
startYear,
|
|
1363
|
+
startMonth,
|
|
1364
|
+
startDay,
|
|
1365
|
+
startHour,
|
|
1366
|
+
startMinute,
|
|
1367
|
+
stopYear,
|
|
1368
|
+
stopMonth,
|
|
1369
|
+
stopDay,
|
|
1370
|
+
stopHour,
|
|
1371
|
+
stopMinute,
|
|
1372
|
+
};
|
|
1263
1373
|
}
|
|
1374
|
+
return new ScheduleEntryLockCCYearDayScheduleReport_1({
|
|
1375
|
+
nodeId: ctx.sourceNodeId,
|
|
1376
|
+
...ccOptions,
|
|
1377
|
+
});
|
|
1264
1378
|
}
|
|
1265
1379
|
userId;
|
|
1266
1380
|
slotId;
|
|
@@ -1274,10 +1388,10 @@ let ScheduleEntryLockCCYearDayScheduleReport = class ScheduleEntryLockCCYearDayS
|
|
|
1274
1388
|
stopDay;
|
|
1275
1389
|
stopHour;
|
|
1276
1390
|
stopMinute;
|
|
1277
|
-
persistValues(
|
|
1278
|
-
if (!super.persistValues(
|
|
1391
|
+
persistValues(ctx) {
|
|
1392
|
+
if (!super.persistValues(ctx))
|
|
1279
1393
|
return false;
|
|
1280
|
-
persistSchedule.call(this,
|
|
1394
|
+
persistSchedule.call(this, ctx, _Types_1.ScheduleEntryLockScheduleKind.YearDay, this.userId, this.slotId, this.startYear != undefined
|
|
1281
1395
|
? {
|
|
1282
1396
|
startYear: this.startYear,
|
|
1283
1397
|
startMonth: this.startMonth,
|
|
@@ -1293,7 +1407,7 @@ let ScheduleEntryLockCCYearDayScheduleReport = class ScheduleEntryLockCCYearDayS
|
|
|
1293
1407
|
: false);
|
|
1294
1408
|
return true;
|
|
1295
1409
|
}
|
|
1296
|
-
serialize() {
|
|
1410
|
+
serialize(ctx) {
|
|
1297
1411
|
this.payload = Buffer.from([
|
|
1298
1412
|
this.userId,
|
|
1299
1413
|
this.slotId,
|
|
@@ -1308,9 +1422,9 @@ let ScheduleEntryLockCCYearDayScheduleReport = class ScheduleEntryLockCCYearDayS
|
|
|
1308
1422
|
this.stopHour ?? 0xff,
|
|
1309
1423
|
this.stopMinute ?? 0xff,
|
|
1310
1424
|
]);
|
|
1311
|
-
return super.serialize();
|
|
1425
|
+
return super.serialize(ctx);
|
|
1312
1426
|
}
|
|
1313
|
-
toLogEntry(
|
|
1427
|
+
toLogEntry(ctx) {
|
|
1314
1428
|
let message;
|
|
1315
1429
|
if (this.startYear !== undefined) {
|
|
1316
1430
|
message = {
|
|
@@ -1329,37 +1443,40 @@ let ScheduleEntryLockCCYearDayScheduleReport = class ScheduleEntryLockCCYearDayS
|
|
|
1329
1443
|
};
|
|
1330
1444
|
}
|
|
1331
1445
|
return {
|
|
1332
|
-
...super.toLogEntry(
|
|
1446
|
+
...super.toLogEntry(ctx),
|
|
1333
1447
|
message,
|
|
1334
1448
|
};
|
|
1335
1449
|
}
|
|
1336
1450
|
};
|
|
1337
1451
|
exports.ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport;
|
|
1338
|
-
exports.ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport = __decorate([
|
|
1452
|
+
exports.ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport = ScheduleEntryLockCCYearDayScheduleReport_1 = __decorate([
|
|
1339
1453
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.YearDayScheduleReport)
|
|
1340
1454
|
], ScheduleEntryLockCCYearDayScheduleReport);
|
|
1341
|
-
let ScheduleEntryLockCCYearDayScheduleGet = class ScheduleEntryLockCCYearDayScheduleGet extends ScheduleEntryLockCC {
|
|
1342
|
-
constructor(
|
|
1343
|
-
super(
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1455
|
+
let ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet_1 = class ScheduleEntryLockCCYearDayScheduleGet extends ScheduleEntryLockCC {
|
|
1456
|
+
constructor(options) {
|
|
1457
|
+
super(options);
|
|
1458
|
+
this.userId = options.userId;
|
|
1459
|
+
this.slotId = options.slotId;
|
|
1460
|
+
}
|
|
1461
|
+
static from(raw, ctx) {
|
|
1462
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
1463
|
+
const userId = raw.payload[0];
|
|
1464
|
+
const slotId = raw.payload[1];
|
|
1465
|
+
return new ScheduleEntryLockCCYearDayScheduleGet_1({
|
|
1466
|
+
nodeId: ctx.sourceNodeId,
|
|
1467
|
+
userId,
|
|
1468
|
+
slotId,
|
|
1469
|
+
});
|
|
1353
1470
|
}
|
|
1354
1471
|
userId;
|
|
1355
1472
|
slotId;
|
|
1356
|
-
serialize() {
|
|
1473
|
+
serialize(ctx) {
|
|
1357
1474
|
this.payload = Buffer.from([this.userId, this.slotId]);
|
|
1358
|
-
return super.serialize();
|
|
1475
|
+
return super.serialize(ctx);
|
|
1359
1476
|
}
|
|
1360
|
-
toLogEntry(
|
|
1477
|
+
toLogEntry(ctx) {
|
|
1361
1478
|
return {
|
|
1362
|
-
...super.toLogEntry(
|
|
1479
|
+
...super.toLogEntry(ctx),
|
|
1363
1480
|
message: {
|
|
1364
1481
|
"user ID": this.userId,
|
|
1365
1482
|
"slot #": this.slotId,
|
|
@@ -1368,35 +1485,36 @@ let ScheduleEntryLockCCYearDayScheduleGet = class ScheduleEntryLockCCYearDaySche
|
|
|
1368
1485
|
}
|
|
1369
1486
|
};
|
|
1370
1487
|
exports.ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet;
|
|
1371
|
-
exports.ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet = __decorate([
|
|
1488
|
+
exports.ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet = ScheduleEntryLockCCYearDayScheduleGet_1 = __decorate([
|
|
1372
1489
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.YearDayScheduleGet),
|
|
1373
1490
|
(0, CommandClassDecorators_1.expectedCCResponse)(ScheduleEntryLockCCYearDayScheduleReport)
|
|
1374
1491
|
], ScheduleEntryLockCCYearDayScheduleGet);
|
|
1375
|
-
let ScheduleEntryLockCCTimeOffsetSet = class ScheduleEntryLockCCTimeOffsetSet extends ScheduleEntryLockCC {
|
|
1376
|
-
constructor(
|
|
1377
|
-
super(
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1492
|
+
let ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet_1 = class ScheduleEntryLockCCTimeOffsetSet extends ScheduleEntryLockCC {
|
|
1493
|
+
constructor(options) {
|
|
1494
|
+
super(options);
|
|
1495
|
+
this.standardOffset = options.standardOffset;
|
|
1496
|
+
this.dstOffset = options.dstOffset;
|
|
1497
|
+
}
|
|
1498
|
+
static from(raw, ctx) {
|
|
1499
|
+
const { standardOffset, dstOffset } = (0, serializers_1.parseTimezone)(raw.payload);
|
|
1500
|
+
return new ScheduleEntryLockCCTimeOffsetSet_1({
|
|
1501
|
+
nodeId: ctx.sourceNodeId,
|
|
1502
|
+
standardOffset,
|
|
1503
|
+
dstOffset,
|
|
1504
|
+
});
|
|
1387
1505
|
}
|
|
1388
1506
|
standardOffset;
|
|
1389
1507
|
dstOffset;
|
|
1390
|
-
serialize() {
|
|
1508
|
+
serialize(ctx) {
|
|
1391
1509
|
this.payload = (0, serializers_1.encodeTimezone)({
|
|
1392
1510
|
standardOffset: this.standardOffset,
|
|
1393
1511
|
dstOffset: this.dstOffset,
|
|
1394
1512
|
});
|
|
1395
|
-
return super.serialize();
|
|
1513
|
+
return super.serialize(ctx);
|
|
1396
1514
|
}
|
|
1397
|
-
toLogEntry(
|
|
1515
|
+
toLogEntry(ctx) {
|
|
1398
1516
|
return {
|
|
1399
|
-
...super.toLogEntry(
|
|
1517
|
+
...super.toLogEntry(ctx),
|
|
1400
1518
|
message: {
|
|
1401
1519
|
"standard time offset": `${this.standardOffset} minutes`,
|
|
1402
1520
|
"DST offset": `${this.dstOffset} minutes`,
|
|
@@ -1405,35 +1523,36 @@ let ScheduleEntryLockCCTimeOffsetSet = class ScheduleEntryLockCCTimeOffsetSet ex
|
|
|
1405
1523
|
}
|
|
1406
1524
|
};
|
|
1407
1525
|
exports.ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet;
|
|
1408
|
-
exports.ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet = __decorate([
|
|
1526
|
+
exports.ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet = ScheduleEntryLockCCTimeOffsetSet_1 = __decorate([
|
|
1409
1527
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.TimeOffsetSet),
|
|
1410
1528
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
1411
1529
|
], ScheduleEntryLockCCTimeOffsetSet);
|
|
1412
|
-
let ScheduleEntryLockCCTimeOffsetReport = class ScheduleEntryLockCCTimeOffsetReport extends ScheduleEntryLockCC {
|
|
1413
|
-
constructor(
|
|
1414
|
-
super(
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1530
|
+
let ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport_1 = class ScheduleEntryLockCCTimeOffsetReport extends ScheduleEntryLockCC {
|
|
1531
|
+
constructor(options) {
|
|
1532
|
+
super(options);
|
|
1533
|
+
this.standardOffset = options.standardOffset;
|
|
1534
|
+
this.dstOffset = options.dstOffset;
|
|
1535
|
+
}
|
|
1536
|
+
static from(raw, ctx) {
|
|
1537
|
+
const { standardOffset, dstOffset } = (0, serializers_1.parseTimezone)(raw.payload);
|
|
1538
|
+
return new ScheduleEntryLockCCTimeOffsetReport_1({
|
|
1539
|
+
nodeId: ctx.sourceNodeId,
|
|
1540
|
+
standardOffset,
|
|
1541
|
+
dstOffset,
|
|
1542
|
+
});
|
|
1424
1543
|
}
|
|
1425
1544
|
standardOffset;
|
|
1426
1545
|
dstOffset;
|
|
1427
|
-
serialize() {
|
|
1546
|
+
serialize(ctx) {
|
|
1428
1547
|
this.payload = (0, serializers_1.encodeTimezone)({
|
|
1429
1548
|
standardOffset: this.standardOffset,
|
|
1430
1549
|
dstOffset: this.dstOffset,
|
|
1431
1550
|
});
|
|
1432
|
-
return super.serialize();
|
|
1551
|
+
return super.serialize(ctx);
|
|
1433
1552
|
}
|
|
1434
|
-
toLogEntry(
|
|
1553
|
+
toLogEntry(ctx) {
|
|
1435
1554
|
return {
|
|
1436
|
-
...super.toLogEntry(
|
|
1555
|
+
...super.toLogEntry(ctx),
|
|
1437
1556
|
message: {
|
|
1438
1557
|
"standard time offset": `${this.standardOffset} minutes`,
|
|
1439
1558
|
"DST offset": `${this.dstOffset} minutes`,
|
|
@@ -1442,7 +1561,7 @@ let ScheduleEntryLockCCTimeOffsetReport = class ScheduleEntryLockCCTimeOffsetRep
|
|
|
1442
1561
|
}
|
|
1443
1562
|
};
|
|
1444
1563
|
exports.ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport;
|
|
1445
|
-
exports.ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport = __decorate([
|
|
1564
|
+
exports.ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport = ScheduleEntryLockCCTimeOffsetReport_1 = __decorate([
|
|
1446
1565
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.TimeOffsetReport)
|
|
1447
1566
|
], ScheduleEntryLockCCTimeOffsetReport);
|
|
1448
1567
|
let ScheduleEntryLockCCTimeOffsetGet = class ScheduleEntryLockCCTimeOffsetGet extends ScheduleEntryLockCC {
|
|
@@ -1452,37 +1571,52 @@ exports.ScheduleEntryLockCCTimeOffsetGet = ScheduleEntryLockCCTimeOffsetGet = __
|
|
|
1452
1571
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.TimeOffsetGet),
|
|
1453
1572
|
(0, CommandClassDecorators_1.expectedCCResponse)(ScheduleEntryLockCCTimeOffsetReport)
|
|
1454
1573
|
], ScheduleEntryLockCCTimeOffsetGet);
|
|
1455
|
-
let ScheduleEntryLockCCDailyRepeatingScheduleSet = class ScheduleEntryLockCCDailyRepeatingScheduleSet extends ScheduleEntryLockCC {
|
|
1456
|
-
constructor(
|
|
1457
|
-
super(
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
this.
|
|
1464
|
-
this.
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
this.weekdays = (0, core_1.parseBitMask)(this.payload.subarray(3, 4), _Types_1.ScheduleEntryLockWeekday.Sunday);
|
|
1468
|
-
this.startHour = this.payload[4];
|
|
1469
|
-
this.startMinute = this.payload[5];
|
|
1470
|
-
this.durationHour = this.payload[6];
|
|
1471
|
-
this.durationMinute = this.payload[7];
|
|
1472
|
-
}
|
|
1574
|
+
let ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet_1 = class ScheduleEntryLockCCDailyRepeatingScheduleSet extends ScheduleEntryLockCC {
|
|
1575
|
+
constructor(options) {
|
|
1576
|
+
super(options);
|
|
1577
|
+
this.userId = options.userId;
|
|
1578
|
+
this.slotId = options.slotId;
|
|
1579
|
+
this.action = options.action;
|
|
1580
|
+
if (options.action === _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
1581
|
+
this.weekdays = options.weekdays;
|
|
1582
|
+
this.startHour = options.startHour;
|
|
1583
|
+
this.startMinute = options.startMinute;
|
|
1584
|
+
this.durationHour = options.durationHour;
|
|
1585
|
+
this.durationMinute = options.durationMinute;
|
|
1473
1586
|
}
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1587
|
+
}
|
|
1588
|
+
static from(raw, ctx) {
|
|
1589
|
+
(0, core_1.validatePayload)(raw.payload.length >= 3);
|
|
1590
|
+
const action = raw.payload[0];
|
|
1591
|
+
(0, core_1.validatePayload)(action === _Types_1.ScheduleEntryLockSetAction.Set
|
|
1592
|
+
|| action === _Types_1.ScheduleEntryLockSetAction.Erase);
|
|
1593
|
+
const userId = raw.payload[1];
|
|
1594
|
+
const slotId = raw.payload[2];
|
|
1595
|
+
if (action !== _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
1596
|
+
return new ScheduleEntryLockCCDailyRepeatingScheduleSet_1({
|
|
1597
|
+
nodeId: ctx.sourceNodeId,
|
|
1598
|
+
action,
|
|
1599
|
+
userId,
|
|
1600
|
+
slotId,
|
|
1601
|
+
});
|
|
1485
1602
|
}
|
|
1603
|
+
(0, core_1.validatePayload)(raw.payload.length >= 8);
|
|
1604
|
+
const weekdays = (0, core_1.parseBitMask)(raw.payload.subarray(3, 4), _Types_1.ScheduleEntryLockWeekday.Sunday);
|
|
1605
|
+
const startHour = raw.payload[4];
|
|
1606
|
+
const startMinute = raw.payload[5];
|
|
1607
|
+
const durationHour = raw.payload[6];
|
|
1608
|
+
const durationMinute = raw.payload[7];
|
|
1609
|
+
return new ScheduleEntryLockCCDailyRepeatingScheduleSet_1({
|
|
1610
|
+
nodeId: ctx.sourceNodeId,
|
|
1611
|
+
action,
|
|
1612
|
+
userId,
|
|
1613
|
+
slotId,
|
|
1614
|
+
weekdays,
|
|
1615
|
+
startHour,
|
|
1616
|
+
startMinute,
|
|
1617
|
+
durationHour,
|
|
1618
|
+
durationMinute,
|
|
1619
|
+
});
|
|
1486
1620
|
}
|
|
1487
1621
|
userId;
|
|
1488
1622
|
slotId;
|
|
@@ -1492,7 +1626,7 @@ let ScheduleEntryLockCCDailyRepeatingScheduleSet = class ScheduleEntryLockCCDail
|
|
|
1492
1626
|
startMinute;
|
|
1493
1627
|
durationHour;
|
|
1494
1628
|
durationMinute;
|
|
1495
|
-
serialize() {
|
|
1629
|
+
serialize(ctx) {
|
|
1496
1630
|
this.payload = Buffer.from([this.action, this.userId, this.slotId]);
|
|
1497
1631
|
if (this.action === _Types_1.ScheduleEntryLockSetAction.Set) {
|
|
1498
1632
|
this.payload = Buffer.concat([
|
|
@@ -1510,9 +1644,9 @@ let ScheduleEntryLockCCDailyRepeatingScheduleSet = class ScheduleEntryLockCCDail
|
|
|
1510
1644
|
// Not sure if this is correct
|
|
1511
1645
|
this.payload = Buffer.concat([this.payload, Buffer.alloc(5, 0xff)]);
|
|
1512
1646
|
}
|
|
1513
|
-
return super.serialize();
|
|
1647
|
+
return super.serialize(ctx);
|
|
1514
1648
|
}
|
|
1515
|
-
toLogEntry(
|
|
1649
|
+
toLogEntry(ctx) {
|
|
1516
1650
|
let message;
|
|
1517
1651
|
if (this.action === _Types_1.ScheduleEntryLockSetAction.Erase) {
|
|
1518
1652
|
message = {
|
|
@@ -1532,40 +1666,55 @@ let ScheduleEntryLockCCDailyRepeatingScheduleSet = class ScheduleEntryLockCCDail
|
|
|
1532
1666
|
};
|
|
1533
1667
|
}
|
|
1534
1668
|
return {
|
|
1535
|
-
...super.toLogEntry(
|
|
1669
|
+
...super.toLogEntry(ctx),
|
|
1536
1670
|
message,
|
|
1537
1671
|
};
|
|
1538
1672
|
}
|
|
1539
1673
|
};
|
|
1540
1674
|
exports.ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet;
|
|
1541
|
-
exports.ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet = __decorate([
|
|
1675
|
+
exports.ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet = ScheduleEntryLockCCDailyRepeatingScheduleSet_1 = __decorate([
|
|
1542
1676
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.DailyRepeatingScheduleSet),
|
|
1543
1677
|
(0, CommandClassDecorators_1.useSupervision)()
|
|
1544
1678
|
], ScheduleEntryLockCCDailyRepeatingScheduleSet);
|
|
1545
|
-
let ScheduleEntryLockCCDailyRepeatingScheduleReport = class ScheduleEntryLockCCDailyRepeatingScheduleReport extends ScheduleEntryLockCC {
|
|
1546
|
-
constructor(
|
|
1547
|
-
super(
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1679
|
+
let ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport_1 = class ScheduleEntryLockCCDailyRepeatingScheduleReport extends ScheduleEntryLockCC {
|
|
1680
|
+
constructor(options) {
|
|
1681
|
+
super(options);
|
|
1682
|
+
this.userId = options.userId;
|
|
1683
|
+
this.slotId = options.slotId;
|
|
1684
|
+
this.weekdays = options.weekdays;
|
|
1685
|
+
this.startHour = options.startHour;
|
|
1686
|
+
this.startMinute = options.startMinute;
|
|
1687
|
+
this.durationHour = options.durationHour;
|
|
1688
|
+
this.durationMinute = options.durationMinute;
|
|
1689
|
+
}
|
|
1690
|
+
static from(raw, ctx) {
|
|
1691
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
1692
|
+
const userId = raw.payload[0];
|
|
1693
|
+
const slotId = raw.payload[1];
|
|
1694
|
+
if (raw.payload.length >= 7 && raw.payload[2] !== 0) {
|
|
1552
1695
|
// Only parse the schedule if it is present and some weekday is selected
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1696
|
+
const weekdays = (0, core_1.parseBitMask)(raw.payload.subarray(2, 3), _Types_1.ScheduleEntryLockWeekday.Sunday);
|
|
1697
|
+
const startHour = raw.payload[3];
|
|
1698
|
+
const startMinute = raw.payload[4];
|
|
1699
|
+
const durationHour = raw.payload[5];
|
|
1700
|
+
const durationMinute = raw.payload[6];
|
|
1701
|
+
return new ScheduleEntryLockCCDailyRepeatingScheduleReport_1({
|
|
1702
|
+
nodeId: ctx.sourceNodeId,
|
|
1703
|
+
userId,
|
|
1704
|
+
slotId,
|
|
1705
|
+
weekdays,
|
|
1706
|
+
startHour,
|
|
1707
|
+
startMinute,
|
|
1708
|
+
durationHour,
|
|
1709
|
+
durationMinute,
|
|
1710
|
+
});
|
|
1560
1711
|
}
|
|
1561
1712
|
else {
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
this.durationHour = options.durationHour;
|
|
1568
|
-
this.durationMinute = options.durationMinute;
|
|
1713
|
+
return new ScheduleEntryLockCCDailyRepeatingScheduleReport_1({
|
|
1714
|
+
nodeId: ctx.sourceNodeId,
|
|
1715
|
+
userId,
|
|
1716
|
+
slotId,
|
|
1717
|
+
});
|
|
1569
1718
|
}
|
|
1570
1719
|
}
|
|
1571
1720
|
userId;
|
|
@@ -1575,10 +1724,10 @@ let ScheduleEntryLockCCDailyRepeatingScheduleReport = class ScheduleEntryLockCCD
|
|
|
1575
1724
|
startMinute;
|
|
1576
1725
|
durationHour;
|
|
1577
1726
|
durationMinute;
|
|
1578
|
-
persistValues(
|
|
1579
|
-
if (!super.persistValues(
|
|
1727
|
+
persistValues(ctx) {
|
|
1728
|
+
if (!super.persistValues(ctx))
|
|
1580
1729
|
return false;
|
|
1581
|
-
persistSchedule.call(this,
|
|
1730
|
+
persistSchedule.call(this, ctx, _Types_1.ScheduleEntryLockScheduleKind.DailyRepeating, this.userId, this.slotId, this.weekdays?.length
|
|
1582
1731
|
? {
|
|
1583
1732
|
weekdays: this.weekdays,
|
|
1584
1733
|
startHour: this.startHour,
|
|
@@ -1589,7 +1738,7 @@ let ScheduleEntryLockCCDailyRepeatingScheduleReport = class ScheduleEntryLockCCD
|
|
|
1589
1738
|
: false);
|
|
1590
1739
|
return true;
|
|
1591
1740
|
}
|
|
1592
|
-
serialize() {
|
|
1741
|
+
serialize(ctx) {
|
|
1593
1742
|
this.payload = Buffer.from([this.userId, this.slotId]);
|
|
1594
1743
|
if (this.weekdays) {
|
|
1595
1744
|
this.payload = Buffer.concat([
|
|
@@ -1607,9 +1756,9 @@ let ScheduleEntryLockCCDailyRepeatingScheduleReport = class ScheduleEntryLockCCD
|
|
|
1607
1756
|
// Not sure if this is correct, but at least we won't parse it incorrectly ourselves when setting everything to 0
|
|
1608
1757
|
this.payload = Buffer.concat([this.payload, Buffer.alloc(5, 0)]);
|
|
1609
1758
|
}
|
|
1610
|
-
return super.serialize();
|
|
1759
|
+
return super.serialize(ctx);
|
|
1611
1760
|
}
|
|
1612
|
-
toLogEntry(
|
|
1761
|
+
toLogEntry(ctx) {
|
|
1613
1762
|
let message;
|
|
1614
1763
|
if (!this.weekdays) {
|
|
1615
1764
|
message = {
|
|
@@ -1631,37 +1780,40 @@ let ScheduleEntryLockCCDailyRepeatingScheduleReport = class ScheduleEntryLockCCD
|
|
|
1631
1780
|
};
|
|
1632
1781
|
}
|
|
1633
1782
|
return {
|
|
1634
|
-
...super.toLogEntry(
|
|
1783
|
+
...super.toLogEntry(ctx),
|
|
1635
1784
|
message,
|
|
1636
1785
|
};
|
|
1637
1786
|
}
|
|
1638
1787
|
};
|
|
1639
1788
|
exports.ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport;
|
|
1640
|
-
exports.ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport = __decorate([
|
|
1789
|
+
exports.ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport = ScheduleEntryLockCCDailyRepeatingScheduleReport_1 = __decorate([
|
|
1641
1790
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.DailyRepeatingScheduleReport)
|
|
1642
1791
|
], ScheduleEntryLockCCDailyRepeatingScheduleReport);
|
|
1643
|
-
let ScheduleEntryLockCCDailyRepeatingScheduleGet = class ScheduleEntryLockCCDailyRepeatingScheduleGet extends ScheduleEntryLockCC {
|
|
1644
|
-
constructor(
|
|
1645
|
-
super(
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1792
|
+
let ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet_1 = class ScheduleEntryLockCCDailyRepeatingScheduleGet extends ScheduleEntryLockCC {
|
|
1793
|
+
constructor(options) {
|
|
1794
|
+
super(options);
|
|
1795
|
+
this.userId = options.userId;
|
|
1796
|
+
this.slotId = options.slotId;
|
|
1797
|
+
}
|
|
1798
|
+
static from(raw, ctx) {
|
|
1799
|
+
(0, core_1.validatePayload)(raw.payload.length >= 2);
|
|
1800
|
+
const userId = raw.payload[0];
|
|
1801
|
+
const slotId = raw.payload[1];
|
|
1802
|
+
return new ScheduleEntryLockCCDailyRepeatingScheduleGet_1({
|
|
1803
|
+
nodeId: ctx.sourceNodeId,
|
|
1804
|
+
userId,
|
|
1805
|
+
slotId,
|
|
1806
|
+
});
|
|
1655
1807
|
}
|
|
1656
1808
|
userId;
|
|
1657
1809
|
slotId;
|
|
1658
|
-
serialize() {
|
|
1810
|
+
serialize(ctx) {
|
|
1659
1811
|
this.payload = Buffer.from([this.userId, this.slotId]);
|
|
1660
|
-
return super.serialize();
|
|
1812
|
+
return super.serialize(ctx);
|
|
1661
1813
|
}
|
|
1662
|
-
toLogEntry(
|
|
1814
|
+
toLogEntry(ctx) {
|
|
1663
1815
|
return {
|
|
1664
|
-
...super.toLogEntry(
|
|
1816
|
+
...super.toLogEntry(ctx),
|
|
1665
1817
|
message: {
|
|
1666
1818
|
"user ID": this.userId,
|
|
1667
1819
|
"slot #": this.slotId,
|
|
@@ -1670,7 +1822,7 @@ let ScheduleEntryLockCCDailyRepeatingScheduleGet = class ScheduleEntryLockCCDail
|
|
|
1670
1822
|
}
|
|
1671
1823
|
};
|
|
1672
1824
|
exports.ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet;
|
|
1673
|
-
exports.ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet = __decorate([
|
|
1825
|
+
exports.ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet = ScheduleEntryLockCCDailyRepeatingScheduleGet_1 = __decorate([
|
|
1674
1826
|
(0, CommandClassDecorators_1.CCCommand)(_Types_1.ScheduleEntryLockCommand.DailyRepeatingScheduleGet),
|
|
1675
1827
|
(0, CommandClassDecorators_1.expectedCCResponse)(ScheduleEntryLockCCDailyRepeatingScheduleReport)
|
|
1676
1828
|
], ScheduleEntryLockCCDailyRepeatingScheduleGet);
|