hoffmation-base 3.0.0-alpha.27 → 3.0.0-alpha.28
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.
|
@@ -96,8 +96,8 @@ class TimeCallback {
|
|
|
96
96
|
}
|
|
97
97
|
break;
|
|
98
98
|
}
|
|
99
|
-
if (nextCalculatedTime < now && this.nextToDo && this.nextToDo >
|
|
100
|
-
server_1.ServerLogService.writeLog(logLevel_1.LogLevel.Info,
|
|
99
|
+
if (nextCalculatedTime < now && this.nextToDo && this.nextToDo > this.lastDone) {
|
|
100
|
+
server_1.ServerLogService.writeLog(logLevel_1.LogLevel.Info, `Time Callback recalc results in the past, while previous target wasn't yet done --> fire immediately.`);
|
|
101
101
|
this.perform(now);
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
@@ -110,11 +110,11 @@ class TimeCallback {
|
|
|
110
110
|
}
|
|
111
111
|
perform(now = new Date()) {
|
|
112
112
|
server_1.ServerLogService.writeLog(logLevel_1.LogLevel.Debug, `Timecallback '${this.name}' fired`);
|
|
113
|
-
this.cFunction();
|
|
114
113
|
this.lastDone = now;
|
|
115
114
|
this.nextToDo = undefined;
|
|
116
115
|
this._calculationSunrise = undefined;
|
|
117
116
|
this._calculationSunset = undefined;
|
|
117
|
+
this.cFunction();
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
exports.TimeCallback = TimeCallback;
|
|
@@ -79,11 +79,11 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
sunriseUp(c) {
|
|
82
|
-
this.windows.forEach((
|
|
83
|
-
if (!this.getRoom().settings.sonnenAufgangRollos ||
|
|
82
|
+
this.windows.forEach((w) => {
|
|
83
|
+
if (!this.getRoom().settings.sonnenAufgangRollos || w.getShutter().length === 0) {
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
w.setDesiredPosition(new models_1.WindowSetDesiredPositionCommand(c, 100));
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
restoreShutterPosition(c) {
|
|
@@ -164,7 +164,7 @@ class WindowGroup extends base_group_1.BaseGroup {
|
|
|
164
164
|
}
|
|
165
165
|
if (this.sunriseShutterCallback === undefined) {
|
|
166
166
|
this.log(models_1.LogLevel.Debug, `Add Sunrise shutter TimeCallback for ${this.roomName}`);
|
|
167
|
-
this.sunriseShutterCallback = new models_1.TimeCallback(`${this.roomName}
|
|
167
|
+
this.sunriseShutterCallback = new models_1.TimeCallback(`${this.roomName} Sunrise Shutter`, models_1.TimeCallbackType.Sunrise, () => {
|
|
168
168
|
if (room.skipNextRolloUp) {
|
|
169
169
|
this.log(models_1.LogLevel.Info, `${this.roomName} skipped sunrise up due to room.skipNextRolloUp`);
|
|
170
170
|
room.skipNextRolloUp = false;
|
|
@@ -89,11 +89,11 @@ class ZigbeeShutter extends zigbeeDevice_1.ZigbeeDevice {
|
|
|
89
89
|
this._firstCommandRecieved = true;
|
|
90
90
|
}
|
|
91
91
|
else if (this._firstCommandRecieved && c.isInitial) {
|
|
92
|
-
this.log(models_1.LogLevel.Debug, `Skipped initial
|
|
92
|
+
this.log(models_1.LogLevel.Debug, `Skipped initial shutter to ${pPosition} as we recieved a command already`);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
95
|
if (this.currentLevel === pPosition && !c.isForceAction) {
|
|
96
|
-
this.log(models_1.LogLevel.Debug, `Skip
|
|
96
|
+
this.log(models_1.LogLevel.Debug, `Skip shutter command to Position ${pPosition} as this is the current one, commandLog: ${c.logMessage}`, services_1.LogDebugType.SkipUnchangedRolloPosition);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
this.log(models_1.LogLevel.Debug, c.logMessage);
|
|
@@ -38,7 +38,9 @@ class BlockAutomaticHandler {
|
|
|
38
38
|
}
|
|
39
39
|
this.automaticBlockedUntil = c.targetDate;
|
|
40
40
|
if (c.revertToAutomaticAtBlockLift) {
|
|
41
|
-
|
|
41
|
+
const revertCommand = new models_1.RestoreTargetAutomaticValueCommand(c, 'Restore to automatic state after block.');
|
|
42
|
+
revertCommand.overrideCommandSource = models_1.CommandSource.Automatic;
|
|
43
|
+
this.updateRestoreTimeout(revertCommand);
|
|
42
44
|
}
|
|
43
45
|
else {
|
|
44
46
|
this.removeRestoreTimeout();
|