hoffmation-base 3.2.4 → 3.2.5

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.
@@ -269,10 +269,11 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
269
269
  if (this.heatingRod === undefined) {
270
270
  return;
271
271
  }
272
- const shouldBeOff = batteryLevel < this.settings.batteryLevelHeatingRodThreshold &&
273
- !(settings_service_1.SettingsService.heatMode === enums_1.HeatingMode.Winter &&
274
- batteryLevel > this.settings.batteryLevelPreventStartThreshold &&
275
- this.heatStorageTempSensor.temperatureSensor.temperature < 60);
272
+ const shouldBeOff = this.settings.disableHeatingRod ||
273
+ (batteryLevel < this.settings.batteryLevelHeatingRodThreshold &&
274
+ !(settings_service_1.SettingsService.heatMode === enums_1.HeatingMode.Winter &&
275
+ batteryLevel > this.settings.batteryLevelPreventStartThreshold &&
276
+ this.heatStorageTempSensor.temperatureSensor.temperature < 60));
276
277
  if (this.heatingRod.actuatorOn !== shouldBeOff) {
277
278
  return;
278
279
  }
@@ -7,6 +7,10 @@ export interface iDachsDeviceSettings extends iActuatorSettings {
7
7
  * The refresh interval in ms to pull the data from the device.
8
8
  */
9
9
  refreshIntervalTime: number;
10
+ /**
11
+ * Whether the secondary water heating source should be disabled regardless of battery level.
12
+ */
13
+ disableHeatingRod: boolean;
10
14
  /**
11
15
  * Defines the battery level at which the dachs should be turned on,
12
16
  * to prevent a battery based island-system to be out of power.
@@ -19,6 +19,18 @@ export interface iShutterSettings extends iDeviceSettings {
19
19
  *
20
20
  */
21
21
  heatReductionPosition: number;
22
+ /**
23
+ * The minimum temperature in degree celsius, to trigger heat reduction, when the sun is shining on window.
24
+ * @type {number}
25
+ * @default 24
26
+ */
27
+ heatReductionDirectionThreshold: number;
28
+ /**
29
+ * The minimum temperature in degree celsius, to trigger heat reduction regardless of direction
30
+ * @type {number}
31
+ * @default 27
32
+ */
33
+ heatReductionThreshold: number;
22
34
  /**
23
35
  *
24
36
  */
@@ -155,6 +155,9 @@ class WeatherService {
155
155
  logger(enums_1.LogLevel.Trace, "RolloWeatherPosition: It's close to or after todays sunset");
156
156
  return result;
157
157
  }
158
+ else if (this.willOutsideBeWarmer(shutterSettings.heatReductionThreshold, logger)) {
159
+ result = shutterSettings.heatReductionPosition;
160
+ }
158
161
  else if (shutterSettings.direction !== undefined &&
159
162
  !utils_1.Utils.degreeInBetween(shutterSettings.direction - 50, shutterSettings.direction + 50, this.sunDirection)) {
160
163
  logger(enums_1.LogLevel.Trace, 'RolloWeatherPosition: Sun is facing a different direction');
@@ -163,7 +166,7 @@ class WeatherService {
163
166
  else if (this.getCurrentCloudiness() > 40) {
164
167
  logger(enums_1.LogLevel.Trace, 'RolloWeatherPosition: It´s cloudy now.');
165
168
  }
166
- else if (this.willOutsideBeWarmer(26, logger)) {
169
+ else if (this.willOutsideBeWarmer(shutterSettings.heatReductionDirectionThreshold, logger)) {
167
170
  result = shutterSettings.heatReductionPosition;
168
171
  }
169
172
  if (result !== normalPos) {
@@ -4,6 +4,8 @@ export declare class DachsDeviceSettings extends ActuatorSettings implements iDa
4
4
  /** @inheritDoc */
5
5
  refreshIntervalTime: number;
6
6
  /** @inheritDoc */
7
+ disableHeatingRod: boolean;
8
+ /** @inheritDoc */
7
9
  batteryLevelTurnOnThreshold: number;
8
10
  /** @inheritDoc */
9
11
  batteryLevelBeforeNightTurnOnThreshold: number;
@@ -9,6 +9,8 @@ class DachsDeviceSettings extends actuatorSettings_1.ActuatorSettings {
9
9
  /** @inheritDoc */
10
10
  this.refreshIntervalTime = 30000;
11
11
  /** @inheritDoc */
12
+ this.disableHeatingRod = false;
13
+ /** @inheritDoc */
12
14
  this.batteryLevelTurnOnThreshold = -1;
13
15
  /** @inheritDoc */
14
16
  this.batteryLevelBeforeNightTurnOnThreshold = -1;
@@ -28,21 +30,22 @@ class DachsDeviceSettings extends actuatorSettings_1.ActuatorSettings {
28
30
  this.winterMinimumPreNightHeatStorageTemp = 65;
29
31
  }
30
32
  fromPartialObject(data) {
31
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
32
- this.refreshIntervalTime = (_a = data.refreshIntervalTime) !== null && _a !== void 0 ? _a : this.refreshIntervalTime;
33
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
34
+ this.disableHeatingRod = (_a = data.disableHeatingRod) !== null && _a !== void 0 ? _a : this.disableHeatingRod;
35
+ this.refreshIntervalTime = (_b = data.refreshIntervalTime) !== null && _b !== void 0 ? _b : this.refreshIntervalTime;
33
36
  this.batteryLevelBeforeNightTurnOnThreshold =
34
- (_b = data.batteryLevelBeforeNightTurnOnThreshold) !== null && _b !== void 0 ? _b : this.batteryLevelBeforeNightTurnOnThreshold;
35
- this.batteryLevelTurnOnThreshold = (_c = data.batteryLevelTurnOnThreshold) !== null && _c !== void 0 ? _c : this.batteryLevelTurnOnThreshold;
36
- this.batteryLevelHeatingRodThreshold = (_d = data.batteryLevelHeatingRodThreshold) !== null && _d !== void 0 ? _d : this.batteryLevelHeatingRodThreshold;
37
+ (_c = data.batteryLevelBeforeNightTurnOnThreshold) !== null && _c !== void 0 ? _c : this.batteryLevelBeforeNightTurnOnThreshold;
38
+ this.batteryLevelTurnOnThreshold = (_d = data.batteryLevelTurnOnThreshold) !== null && _d !== void 0 ? _d : this.batteryLevelTurnOnThreshold;
39
+ this.batteryLevelHeatingRodThreshold = (_e = data.batteryLevelHeatingRodThreshold) !== null && _e !== void 0 ? _e : this.batteryLevelHeatingRodThreshold;
37
40
  this.batteryLevelPreventStartThreshold =
38
- (_e = data.batteryLevelPreventStartThreshold) !== null && _e !== void 0 ? _e : this.batteryLevelPreventStartThreshold;
41
+ (_f = data.batteryLevelPreventStartThreshold) !== null && _f !== void 0 ? _f : this.batteryLevelPreventStartThreshold;
39
42
  this.batteryLevelPreventStartAtNightThreshold =
40
- (_f = data.batteryLevelPreventStartAtNightThreshold) !== null && _f !== void 0 ? _f : this.batteryLevelPreventStartAtNightThreshold;
41
- this.batteryLevelAllowStartThreshold = (_g = data.batteryLevelAllowStartThreshold) !== null && _g !== void 0 ? _g : this.batteryLevelAllowStartThreshold;
42
- this.warmWaterDesiredMinTemp = (_h = data.warmWaterDesiredMinTemp) !== null && _h !== void 0 ? _h : this.warmWaterDesiredMinTemp;
43
- this.winterMinimumHeatStorageTemp = (_j = data.winterMinimumHeatStorageTemp) !== null && _j !== void 0 ? _j : this.winterMinimumHeatStorageTemp;
43
+ (_g = data.batteryLevelPreventStartAtNightThreshold) !== null && _g !== void 0 ? _g : this.batteryLevelPreventStartAtNightThreshold;
44
+ this.batteryLevelAllowStartThreshold = (_h = data.batteryLevelAllowStartThreshold) !== null && _h !== void 0 ? _h : this.batteryLevelAllowStartThreshold;
45
+ this.warmWaterDesiredMinTemp = (_j = data.warmWaterDesiredMinTemp) !== null && _j !== void 0 ? _j : this.warmWaterDesiredMinTemp;
46
+ this.winterMinimumHeatStorageTemp = (_k = data.winterMinimumHeatStorageTemp) !== null && _k !== void 0 ? _k : this.winterMinimumHeatStorageTemp;
44
47
  this.winterMinimumPreNightHeatStorageTemp =
45
- (_k = data.winterMinimumPreNightHeatStorageTemp) !== null && _k !== void 0 ? _k : this.winterMinimumPreNightHeatStorageTemp;
48
+ (_l = data.winterMinimumPreNightHeatStorageTemp) !== null && _l !== void 0 ? _l : this.winterMinimumPreNightHeatStorageTemp;
46
49
  super.fromPartialObject(data);
47
50
  }
48
51
  toJSON() {
@@ -21,6 +21,10 @@ export declare class ShutterSettings extends DeviceSettings implements iShutterS
21
21
  * @default 40
22
22
  */
23
23
  heatReductionPosition: number;
24
+ /** @inheritDoc */
25
+ heatReductionDirectionThreshold: number;
26
+ /** @inheritDoc */
27
+ heatReductionThreshold: number;
24
28
  /**
25
29
  * Some shutter give no position feedback on their own, so by knowing the durations in either direction,
26
30
  * we can programmatically trigger the callbacks.
@@ -26,6 +26,10 @@ class ShutterSettings extends deviceSettings_1.DeviceSettings {
26
26
  * @default 40
27
27
  */
28
28
  this.heatReductionPosition = 40;
29
+ /** @inheritDoc */
30
+ this.heatReductionDirectionThreshold = 24;
31
+ /** @inheritDoc */
32
+ this.heatReductionThreshold = 27;
29
33
  /**
30
34
  * Some shutter give no position feedback on their own, so by knowing the durations in either direction,
31
35
  * we can programmatically trigger the callbacks.
@@ -34,12 +38,14 @@ class ShutterSettings extends deviceSettings_1.DeviceSettings {
34
38
  this.triggerPositionUpdateByTime = false;
35
39
  }
36
40
  fromPartialObject(data) {
37
- var _a, _b, _c, _d, _e;
41
+ var _a, _b, _c, _d, _e, _f, _g;
38
42
  this.msTilTop = (_a = data.msTilTop) !== null && _a !== void 0 ? _a : this.msTilTop;
39
43
  this.msTilBot = (_b = data.msTilBot) !== null && _b !== void 0 ? _b : this.msTilBot;
40
44
  this.direction = (_c = data.direction) !== null && _c !== void 0 ? _c : this.direction;
41
45
  this.heatReductionPosition = (_d = data.heatReductionPosition) !== null && _d !== void 0 ? _d : this.heatReductionPosition;
42
- this.triggerPositionUpdateByTime = (_e = data.triggerPositionUpdateByTime) !== null && _e !== void 0 ? _e : this.triggerPositionUpdateByTime;
46
+ this.heatReductionThreshold = (_e = data.heatReductionThreshold) !== null && _e !== void 0 ? _e : this.heatReductionThreshold;
47
+ this.heatReductionDirectionThreshold = (_f = data.heatReductionDirectionThreshold) !== null && _f !== void 0 ? _f : this.heatReductionDirectionThreshold;
48
+ this.triggerPositionUpdateByTime = (_g = data.triggerPositionUpdateByTime) !== null && _g !== void 0 ? _g : this.triggerPositionUpdateByTime;
43
49
  super.fromPartialObject(data);
44
50
  }
45
51
  toJSON() {