hoffmation-base 3.2.11-alpha.1 → 3.2.12

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.
@@ -225,7 +225,11 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
225
225
  const heatStorageTemp = this._tempHeatStorage;
226
226
  let desiredWwPumpState = false;
227
227
  let reason = '';
228
- if (((_a = this.warmWaterDachsAlternativeActuator) === null || _a === void 0 ? void 0 : _a.actuatorOn) === true) {
228
+ if (this.settings.disableDachsOwnWW) {
229
+ desiredWwPumpState = false;
230
+ reason = 'Dachs own WW is disabled';
231
+ }
232
+ else if (((_a = this.warmWaterDachsAlternativeActuator) === null || _a === void 0 ? void 0 : _a.actuatorOn) === true) {
229
233
  desiredWwPumpState = false;
230
234
  reason = 'Alternative heating source is on';
231
235
  }
@@ -346,7 +350,11 @@ class Dachs extends RoomBaseDevice_1.RoomBaseDevice {
346
350
  }
347
351
  let desiredState = false;
348
352
  let reason = 'Dachs is allowed to run --> Block alternative heating source';
349
- if (shouldDachsBeStarted || this._dachsOn) {
353
+ if (this.settings.disableDachsOwnWW) {
354
+ reason = 'Dachs own WW is disabled';
355
+ desiredState = true;
356
+ }
357
+ else if (shouldDachsBeStarted || this._dachsOn) {
350
358
  reason = 'Dachs is running or should be started';
351
359
  desiredState = false;
352
360
  }
@@ -45,7 +45,7 @@ class OwnUnifiCamera extends index_1.CameraDevice {
45
45
  for (const smartDetectType of detectedTypes) {
46
46
  switch (smartDetectType) {
47
47
  case 'licensePlate':
48
- this.log(enums_1.LogLevel.Debug, `Detected "licensePlate": ${JSON.stringify(payloadAsEventAdd.metadata.licensePlate)}`);
48
+ this.log(enums_1.LogLevel.Debug, `Detected "licensePlate" Data: ${JSON.stringify(payloadAsEventAdd)}`);
49
49
  break;
50
50
  case 'person':
51
51
  this.onNewPersonDetectedValue(true, enums_1.CommandSource.Automatic);
@@ -79,7 +79,9 @@ class UnifiProtect {
79
79
  }
80
80
  const ownCamera = UnifiProtect.ownCameras.get(ownName);
81
81
  if (ownCamera !== undefined) {
82
- ownCamera.update(packet, baseEvent);
82
+ utils_1.Utils.guardedFunction(() => {
83
+ ownCamera.update(packet, baseEvent);
84
+ }, this);
83
85
  break;
84
86
  }
85
87
  break;
@@ -4,4 +4,5 @@ export declare class ZigbeeAqaraPresence extends ZigbeeMotionSensor {
4
4
  protected _needsMovementResetFallback: boolean;
5
5
  protected readonly _occupancyStateId: string;
6
6
  constructor(pInfo: IoBrokerDeviceInfo);
7
+ update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
7
8
  }
@@ -9,5 +9,8 @@ class ZigbeeAqaraPresence extends BaseDevices_1.ZigbeeMotionSensor {
9
9
  this._needsMovementResetFallback = false;
10
10
  this._occupancyStateId = 'presence';
11
11
  }
12
+ update(idSplit, state, initial = false) {
13
+ super.update(idSplit, state, initial, true);
14
+ }
12
15
  }
13
16
  exports.ZigbeeAqaraPresence = ZigbeeAqaraPresence;
@@ -37,7 +37,7 @@ class ZigbeeAquaraMotion extends BaseDevices_1.ZigbeeMotionSensor {
37
37
  }
38
38
  /** @inheritDoc */
39
39
  update(idSplit, state, initial = false) {
40
- this.log(enums_1.LogLevel.DeepTrace, `Motion update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
40
+ // this.log(LogLevel.DeepTrace, `Motion update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
41
41
  super.update(idSplit, state, initial, true);
42
42
  switch (idSplit[3]) {
43
43
  case 'illuminance':
@@ -11,6 +11,10 @@ export interface iDachsDeviceSettings extends iActuatorSettings {
11
11
  * Whether the secondary water heating source should be disabled regardless of battery level.
12
12
  */
13
13
  disableHeatingRod: boolean;
14
+ /**
15
+ * Option to disable Warm-Water production from dachs completely.
16
+ */
17
+ disableDachsOwnWW: boolean;
14
18
  /**
15
19
  * Defines the battery level at which the dachs should be turned on,
16
20
  * to prevent a battery based island-system to be out of power.
@@ -6,6 +6,8 @@ export declare class DachsDeviceSettings extends ActuatorSettings implements iDa
6
6
  /** @inheritDoc */
7
7
  disableHeatingRod: boolean;
8
8
  /** @inheritDoc */
9
+ disableDachsOwnWW: boolean;
10
+ /** @inheritDoc */
9
11
  batteryLevelTurnOnThreshold: number;
10
12
  /** @inheritDoc */
11
13
  batteryLevelBeforeNightTurnOnThreshold: number;
@@ -11,6 +11,8 @@ class DachsDeviceSettings extends actuatorSettings_1.ActuatorSettings {
11
11
  /** @inheritDoc */
12
12
  this.disableHeatingRod = false;
13
13
  /** @inheritDoc */
14
+ this.disableDachsOwnWW = false;
15
+ /** @inheritDoc */
14
16
  this.batteryLevelTurnOnThreshold = -1;
15
17
  /** @inheritDoc */
16
18
  this.batteryLevelBeforeNightTurnOnThreshold = -1;
@@ -30,22 +32,23 @@ class DachsDeviceSettings extends actuatorSettings_1.ActuatorSettings {
30
32
  this.winterMinimumPreNightHeatStorageTemp = 65;
31
33
  }
32
34
  fromPartialObject(data) {
33
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
35
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
34
36
  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;
37
+ this.disableDachsOwnWW = (_b = data.disableDachsOwnWW) !== null && _b !== void 0 ? _b : this.disableDachsOwnWW;
38
+ this.refreshIntervalTime = (_c = data.refreshIntervalTime) !== null && _c !== void 0 ? _c : this.refreshIntervalTime;
36
39
  this.batteryLevelBeforeNightTurnOnThreshold =
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;
40
+ (_d = data.batteryLevelBeforeNightTurnOnThreshold) !== null && _d !== void 0 ? _d : this.batteryLevelBeforeNightTurnOnThreshold;
41
+ this.batteryLevelTurnOnThreshold = (_e = data.batteryLevelTurnOnThreshold) !== null && _e !== void 0 ? _e : this.batteryLevelTurnOnThreshold;
42
+ this.batteryLevelHeatingRodThreshold = (_f = data.batteryLevelHeatingRodThreshold) !== null && _f !== void 0 ? _f : this.batteryLevelHeatingRodThreshold;
40
43
  this.batteryLevelPreventStartThreshold =
41
- (_f = data.batteryLevelPreventStartThreshold) !== null && _f !== void 0 ? _f : this.batteryLevelPreventStartThreshold;
44
+ (_g = data.batteryLevelPreventStartThreshold) !== null && _g !== void 0 ? _g : this.batteryLevelPreventStartThreshold;
42
45
  this.batteryLevelPreventStartAtNightThreshold =
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;
46
+ (_h = data.batteryLevelPreventStartAtNightThreshold) !== null && _h !== void 0 ? _h : this.batteryLevelPreventStartAtNightThreshold;
47
+ this.batteryLevelAllowStartThreshold = (_j = data.batteryLevelAllowStartThreshold) !== null && _j !== void 0 ? _j : this.batteryLevelAllowStartThreshold;
48
+ this.warmWaterDesiredMinTemp = (_k = data.warmWaterDesiredMinTemp) !== null && _k !== void 0 ? _k : this.warmWaterDesiredMinTemp;
49
+ this.winterMinimumHeatStorageTemp = (_l = data.winterMinimumHeatStorageTemp) !== null && _l !== void 0 ? _l : this.winterMinimumHeatStorageTemp;
47
50
  this.winterMinimumPreNightHeatStorageTemp =
48
- (_l = data.winterMinimumPreNightHeatStorageTemp) !== null && _l !== void 0 ? _l : this.winterMinimumPreNightHeatStorageTemp;
51
+ (_m = data.winterMinimumPreNightHeatStorageTemp) !== null && _m !== void 0 ? _m : this.winterMinimumPreNightHeatStorageTemp;
49
52
  super.fromPartialObject(data);
50
53
  }
51
54
  toJSON() {