hoffmation-base 3.0.0-alpha.31 → 3.0.0-alpha.33

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.
Files changed (30) hide show
  1. package/lib/models/action/index.d.ts +6 -0
  2. package/lib/models/action/index.js +20 -0
  3. package/lib/models/rooms/RoomSettings/RoomSettingsController.js +1 -1
  4. package/lib/models/timeCallback.js +12 -5
  5. package/lib/server/devices/baseDeviceInterfaces/iHumiditySensor.d.ts +1 -1
  6. package/lib/server/devices/baseDeviceInterfaces/iMotionSensor.d.ts +1 -2
  7. package/lib/server/devices/baseDeviceInterfaces/iTemperatureSensor.d.ts +1 -1
  8. package/lib/server/devices/blueIris/cameraDevice.d.ts +1 -2
  9. package/lib/server/devices/blueIris/cameraDevice.js +1 -2
  10. package/lib/server/devices/dachs/dachsTemperatureSensor.d.ts +1 -2
  11. package/lib/server/devices/dachs/dachsTemperatureSensor.js +3 -3
  12. package/lib/server/devices/groups/Window.d.ts +1 -2
  13. package/lib/server/devices/groups/presenceGroup.d.ts +1 -2
  14. package/lib/server/devices/groups/presenceGroup.js +3 -5
  15. package/lib/server/devices/hmIPDevices/hmIpBewegung.d.ts +1 -2
  16. package/lib/server/devices/hmIPDevices/hmIpBewegung.js +1 -2
  17. package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.d.ts +1 -3
  18. package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.js +4 -6
  19. package/lib/server/devices/hmIPDevices/hmIpPraezenz.d.ts +1 -2
  20. package/lib/server/devices/hmIPDevices/hmIpPraezenz.js +1 -2
  21. package/lib/server/devices/hmIPDevices/hmIpRoll.js +1 -2
  22. package/lib/server/devices/index.d.ts +5 -3
  23. package/lib/server/devices/index.js +7 -4
  24. package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.d.ts +1 -2
  25. package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.js +1 -2
  26. package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.js +1 -2
  27. package/lib/server/devices/zigbee/zigbeeSonoffTemp.d.ts +1 -2
  28. package/lib/server/devices/zigbee/zigbeeSonoffTemp.js +4 -6
  29. package/lib/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +1 -1
@@ -1 +1,7 @@
1
1
  export { BaseAction } from './baseAction';
2
+ export * from './humiditySensorChangeAction';
3
+ export * from './motionSensorAction';
4
+ export * from './presenceGroupLastLeftAction';
5
+ export * from './presenceGroupFirstEnterAction';
6
+ export * from './shutterPositionChangedAction';
7
+ export * from './temperatureSensorChangeAction';
@@ -1,5 +1,25 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.BaseAction = void 0;
4
18
  var baseAction_1 = require("./baseAction");
5
19
  Object.defineProperty(exports, "BaseAction", { enumerable: true, get: function () { return baseAction_1.BaseAction; } });
20
+ __exportStar(require("./humiditySensorChangeAction"), exports);
21
+ __exportStar(require("./motionSensorAction"), exports);
22
+ __exportStar(require("./presenceGroupLastLeftAction"), exports);
23
+ __exportStar(require("./presenceGroupFirstEnterAction"), exports);
24
+ __exportStar(require("./shutterPositionChangedAction"), exports);
25
+ __exportStar(require("./temperatureSensorChangeAction"), exports);
@@ -16,7 +16,7 @@ class RoomSettingsController {
16
16
  this.lampOffset = new server_1.SunTimeOffsets(this.sonnenAufgangLampenDelay, this.sonnenUntergangLampenDelay);
17
17
  this._settingsContainer.onChangeCb = this.onSettingChange.bind(this);
18
18
  this._settingsContainer.initializeFromDb(room);
19
- server_1.WeatherService.addWeatherUpdateCb(`RolloWeatherUpdate${this.roomName}`, () => {
19
+ server_1.WeatherService.addWeatherUpdateCb(`ShutterWeatherUpdate${this.roomName}`, () => {
20
20
  var _a;
21
21
  if (this.sonnenUntergangRolloAdditionalOffsetPerCloudiness > 0) {
22
22
  (_a = this.room) === null || _a === void 0 ? void 0 : _a.recalcTimeCallbacks();
@@ -96,15 +96,22 @@ class TimeCallback {
96
96
  }
97
97
  break;
98
98
  }
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
- this.perform(now);
102
- return;
103
- }
104
99
  if (((_a = this.nextToDo) === null || _a === void 0 ? void 0 : _a.getTime()) == nextCalculatedTime.getTime()) {
105
100
  // No change
106
101
  return;
107
102
  }
103
+ if (this.nextToDo && this.nextToDo > this.lastDone) {
104
+ if (nextCalculatedTime < now) {
105
+ server_1.ServerLogService.writeLog(logLevel_1.LogLevel.Info, `Time Callback recalc results in the past, while previous target wasn't yet done --> fire immediately.`);
106
+ this.perform(now);
107
+ return;
108
+ }
109
+ else if (nextCalculatedTime.getDay() !== this.nextToDo.getDay() && this.type === TimeCallbackType.SunSet) {
110
+ // Recalculation between Sunset and delayed sunset action can result in the next day beeing calculated --> fire immediately
111
+ server_1.ServerLogService.writeLog(logLevel_1.LogLevel.Info, `Time Callback recalc results in the next day, while previous action wasn't yet fired --> fire immediately.`);
112
+ this.perform(now);
113
+ }
114
+ }
108
115
  this.nextToDo = nextCalculatedTime;
109
116
  server_1.ServerLogService.writeLog(logLevel_1.LogLevel.Debug, `Next Time event for "${this.name}" at ${this.nextToDo.toLocaleString('de-DE')}`);
110
117
  }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { iRoomDevice } from './iRoomDevice';
3
- import { HumiditySensorChangeAction } from '../../../models/action/humiditySensorChangeAction';
3
+ import { HumiditySensorChangeAction } from '../../../models';
4
4
  export declare const UNDEFINED_HUMIDITY_VALUE = -1;
5
5
  /**
6
6
  * This interface represents a humidity sensor device.
@@ -1,6 +1,5 @@
1
- import { MotionSensorSettings } from '../../../models';
1
+ import { MotionSensorAction, MotionSensorSettings } from '../../../models';
2
2
  import { iRoomDevice } from './iRoomDevice';
3
- import { MotionSensorAction } from '../../../models/action/motionSensorAction';
4
3
  /**
5
4
  * This interface represents a motion sensor device.
6
5
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { iRoomDevice } from './iRoomDevice';
3
- import { TemperatureSensorChangeAction } from '../../../models/action/temperatureSensorChangeAction';
3
+ import { TemperatureSensorChangeAction } from '../../../models';
4
4
  export declare const UNDEFINED_TEMP_VALUE = -99;
5
5
  /**
6
6
  * This interface represents a temperature sensor device.
@@ -1,10 +1,9 @@
1
1
  import { iBaseDevice, iCameraDevice, iRoomDevice } from '../baseDeviceInterfaces';
2
- import { CameraSettings, LogLevel, RoomBase } from '../../../models';
2
+ import { CameraSettings, LogLevel, MotionSensorAction, RoomBase } from '../../../models';
3
3
  import { LogDebugType } from '../../services';
4
4
  import { DeviceInfo } from '../DeviceInfo';
5
5
  import { DeviceCapability } from '../DeviceCapability';
6
6
  import { DeviceType } from '../deviceType';
7
- import { MotionSensorAction } from '../../../models/action/motionSensorAction';
8
7
  export declare class CameraDevice implements iCameraDevice {
9
8
  /**
10
9
  * The name of the camera in BlueIris
@@ -13,7 +13,6 @@ const DeviceInfo_1 = require("../DeviceInfo");
13
13
  const DeviceCapability_1 = require("../DeviceCapability");
14
14
  const deviceType_1 = require("../deviceType");
15
15
  const ioBroker_1 = require("../../ioBroker");
16
- const motionSensorAction_1 = require("../../../models/action/motionSensorAction");
17
16
  class CameraDevice {
18
17
  constructor(mqttName, roomName, blueIrisName) {
19
18
  var _a;
@@ -238,7 +237,7 @@ class CameraDevice {
238
237
  this.log(models_1.LogLevel.Trace, `This is movement no. ${this.detectionsToday}`);
239
238
  }
240
239
  for (const c of this._movementDetectedCallback) {
241
- c(new motionSensorAction_1.MotionSensorAction(this));
240
+ c(new models_1.MotionSensorAction(this));
242
241
  }
243
242
  }
244
243
  resetPersonDetectFallbackTimer() {
@@ -4,8 +4,7 @@ import { LogDebugType, OwnSonosDevice } from '../../services';
4
4
  import { DeviceCapability } from '../DeviceCapability';
5
5
  import { DeviceType } from '../deviceType';
6
6
  import { DeviceInfo } from '../DeviceInfo';
7
- import { DeviceSettings, LogLevel, RoomBase } from '../../../models';
8
- import { TemperatureSensorChangeAction } from '../../../models/action/temperatureSensorChangeAction';
7
+ import { DeviceSettings, LogLevel, RoomBase, TemperatureSensorChangeAction } from '../../../models';
9
8
  export declare class DachsTemperatureSensor implements iTemperatureSensor {
10
9
  /** @inheritDoc */
11
10
  settings: DeviceSettings | undefined;
@@ -11,7 +11,7 @@ const deviceType_1 = require("../deviceType");
11
11
  const DeviceInfo_1 = require("../DeviceInfo");
12
12
  const devices_1 = require("../devices");
13
13
  const lodash_1 = __importDefault(require("lodash"));
14
- const temperatureSensorChangeAction_1 = require("../../../models/action/temperatureSensorChangeAction");
14
+ const models_1 = require("../../../models");
15
15
  class DachsTemperatureSensor {
16
16
  constructor(roomName, shortKey, longKey) {
17
17
  /** @inheritDoc */
@@ -77,7 +77,7 @@ class DachsTemperatureSensor {
77
77
  set temperature(val) {
78
78
  this._temperature = val;
79
79
  for (const cb of this._temperaturCallbacks) {
80
- cb(new temperatureSensorChangeAction_1.TemperatureSensorChangeAction(this, val));
80
+ cb(new models_1.TemperatureSensorChangeAction(this, val));
81
81
  }
82
82
  }
83
83
  update(newTemp) {
@@ -87,7 +87,7 @@ class DachsTemperatureSensor {
87
87
  addTempChangeCallback(pCallback) {
88
88
  this._temperaturCallbacks.push(pCallback);
89
89
  if (this._temperature > baseDeviceInterfaces_1.UNDEFINED_TEMP_VALUE) {
90
- pCallback(new temperatureSensorChangeAction_1.TemperatureSensorChangeAction(this, this._temperature));
90
+ pCallback(new models_1.TemperatureSensorChangeAction(this, this._temperature));
91
91
  }
92
92
  }
93
93
  /** @inheritDoc */
@@ -1,10 +1,9 @@
1
1
  import { HmIpGriff } from '../hmIPDevices';
2
2
  import { WindowPosition } from '../models';
3
- import { WindowRestoreDesiredPositionCommand, WindowSetDesiredPositionCommand } from '../../../models';
3
+ import { ShutterPositionChangedAction, WindowRestoreDesiredPositionCommand, WindowSetDesiredPositionCommand } from '../../../models';
4
4
  import { iShutter, iVibrationSensor } from '../baseDeviceInterfaces';
5
5
  import { BaseGroup } from './base-group';
6
6
  import { ZigbeeMagnetContact } from '../zigbee';
7
- import { ShutterPositionChangedAction } from '../../../models/action/shutterPositionChangedAction';
8
7
  export declare class Window extends BaseGroup {
9
8
  readonly handleIds: string[];
10
9
  readonly vibrationIds: string[];
@@ -1,7 +1,6 @@
1
+ import { PresenceGroupFirstEnterAction, PresenceGroupLastLeftAction } from '../../../models';
1
2
  import { BaseGroup } from './base-group';
2
3
  import { iMotionSensor } from '../baseDeviceInterfaces';
3
- import { PresenceGroupFirstEnterAction } from '../../../models/action/presenceGroupFirstEnterAction';
4
- import { PresenceGroupLastLeftAction } from '../../../models/action/presenceGroupLastLeftAction';
5
4
  export declare class PresenceGroup extends BaseGroup {
6
5
  private _lastMovement;
7
6
  private _lastLeftTimeout;
@@ -7,8 +7,6 @@ const base_group_1 = require("./base-group");
7
7
  const device_cluster_type_1 = require("../device-cluster-type");
8
8
  const group_type_1 = require("./group-type");
9
9
  const device_list_1 = require("../device-list");
10
- const presenceGroupFirstEnterAction_1 = require("../../../models/action/presenceGroupFirstEnterAction");
11
- const presenceGroupLastLeftAction_1 = require("../../../models/action/presenceGroupLastLeftAction");
12
10
  class PresenceGroup extends base_group_1.BaseGroup {
13
11
  constructor(roomName, motionSensorIds) {
14
12
  super(roomName, group_type_1.GroupType.Presence);
@@ -86,7 +84,7 @@ class PresenceGroup extends base_group_1.BaseGroup {
86
84
  let timeAfterReset = services_1.Utils.nowMS() - this._lastMovement.getTime() - this.getRoom().settings.movementResetTimer * 1000;
87
85
  if (timeAfterReset > 0) {
88
86
  this.log(models_1.LogLevel.Debug, `Movement reset. Active Motions: ${this.presentAmount()}\tTime after Last Movement including Reset: ${timeAfterReset}`);
89
- this.executeLastLeftCbs(new presenceGroupLastLeftAction_1.PresenceGroupLastLeftAction(action));
87
+ this.executeLastLeftCbs(new models_1.PresenceGroupLastLeftAction(action));
90
88
  return;
91
89
  }
92
90
  this.log(models_1.LogLevel.Debug, `Movement reset in ${this.roomName} delayed.`);
@@ -97,7 +95,7 @@ class PresenceGroup extends base_group_1.BaseGroup {
97
95
  const presentAmount = this.presentAmount();
98
96
  this.log(models_1.LogLevel.Debug, `Delayed Movement reset. Active Motions: ${this.presentAmount()}\tTime after Last Movement including Reset: ${timeAfterReset}, action: ${action.reasonTrace}`);
99
97
  if (presentAmount <= 0 && timeAfterReset > 0) {
100
- this.executeLastLeftCbs(new presenceGroupLastLeftAction_1.PresenceGroupLastLeftAction(action));
98
+ this.executeLastLeftCbs(new models_1.PresenceGroupLastLeftAction(action));
101
99
  }
102
100
  }, Math.abs(timeAfterReset) + 500, this);
103
101
  }
@@ -118,7 +116,7 @@ class PresenceGroup extends base_group_1.BaseGroup {
118
116
  return;
119
117
  }
120
118
  for (const cb of this._firstEnterCbs) {
121
- cb(new presenceGroupFirstEnterAction_1.PresenceGroupFirstEnterAction(action));
119
+ cb(new models_1.PresenceGroupFirstEnterAction(action));
122
120
  }
123
121
  }
124
122
  executeLastLeftCbs(action) {
@@ -1,8 +1,7 @@
1
1
  import { HmIPDevice } from './hmIpDevice';
2
- import { MotionSensorSettings } from '../../../models';
2
+ import { MotionSensorAction, MotionSensorSettings } from '../../../models';
3
3
  import { iIlluminationSensor, iMotionSensor } from '../baseDeviceInterfaces';
4
4
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
5
- import { MotionSensorAction } from '../../../models/action/motionSensorAction';
6
5
  export declare class HmIpBewegung extends HmIPDevice implements iIlluminationSensor, iMotionSensor {
7
6
  private static MOVEMENT_DETECTION;
8
7
  private static CURRENT_ILLUMINATION;
@@ -6,7 +6,6 @@ const deviceType_1 = require("../deviceType");
6
6
  const models_1 = require("../../../models");
7
7
  const services_1 = require("../../services");
8
8
  const DeviceCapability_1 = require("../DeviceCapability");
9
- const motionSensorAction_1 = require("../../../models/action/motionSensorAction");
10
9
  class HmIpBewegung extends hmIpDevice_1.HmIPDevice {
11
10
  constructor(pInfo) {
12
11
  var _a;
@@ -100,7 +99,7 @@ class HmIpBewegung extends hmIpDevice_1.HmIPDevice {
100
99
  this.log(models_1.LogLevel.Trace, `Dies ist die ${this.detectionsToday} Bewegung `);
101
100
  }
102
101
  for (const c of this._movementDetectedCallback) {
103
- c(new motionSensorAction_1.MotionSensorAction(this));
102
+ c(new models_1.MotionSensorAction(this));
104
103
  }
105
104
  }
106
105
  resetFallbackTimeout() {
@@ -1,11 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { HmIPDevice } from './hmIpDevice';
3
3
  import { iDisposable } from '../../services';
4
- import { HeaterSettings } from '../../../models';
4
+ import { HeaterSettings, HumiditySensorChangeAction, TemperatureSensorChangeAction } from '../../../models';
5
5
  import { iHeater, iHumiditySensor, iTemperatureSensor } from '../baseDeviceInterfaces';
6
6
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
7
- import { HumiditySensorChangeAction } from '../../../models/action/humiditySensorChangeAction';
8
- import { TemperatureSensorChangeAction } from '../../../models/action/temperatureSensorChangeAction';
9
7
  export declare class HmIpHeizgruppe extends HmIPDevice implements iTemperatureSensor, iHumiditySensor, iHeater, iDisposable {
10
8
  /** @inheritDoc */
11
9
  readonly persistHeaterInterval: NodeJS.Timeout;
@@ -8,8 +8,6 @@ const models_1 = require("../../../models");
8
8
  const baseDeviceInterfaces_1 = require("../baseDeviceInterfaces");
9
9
  const device_cluster_type_1 = require("../device-cluster-type");
10
10
  const DeviceCapability_1 = require("../DeviceCapability");
11
- const humiditySensorChangeAction_1 = require("../../../models/action/humiditySensorChangeAction");
12
- const temperatureSensorChangeAction_1 = require("../../../models/action/temperatureSensorChangeAction");
13
11
  class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
14
12
  constructor(pInfo) {
15
13
  super(pInfo, deviceType_1.DeviceType.HmIpHeizgruppe);
@@ -69,7 +67,7 @@ class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
69
67
  set temperature(val) {
70
68
  this._temperature = val;
71
69
  for (const cb of this._temperatureCallbacks) {
72
- cb(new temperatureSensorChangeAction_1.TemperatureSensorChangeAction(this, val));
70
+ cb(new models_1.TemperatureSensorChangeAction(this, val));
73
71
  }
74
72
  }
75
73
  /** @inheritDoc */
@@ -79,7 +77,7 @@ class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
79
77
  set humidity(val) {
80
78
  this._humidity = val;
81
79
  for (const cb of this._humidityCallbacks) {
82
- cb(new humiditySensorChangeAction_1.HumiditySensorChangeAction(this, val));
80
+ cb(new models_1.HumiditySensorChangeAction(this, val));
83
81
  }
84
82
  }
85
83
  /** @inheritDoc */
@@ -117,7 +115,7 @@ class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
117
115
  addHumidityCallback(pCallback) {
118
116
  this._humidityCallbacks.push(pCallback);
119
117
  if (this._humidity > 0) {
120
- pCallback(new humiditySensorChangeAction_1.HumiditySensorChangeAction(this, this._humidity));
118
+ pCallback(new models_1.HumiditySensorChangeAction(this, this._humidity));
121
119
  }
122
120
  }
123
121
  getBelongingHeizungen() {
@@ -157,7 +155,7 @@ class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
157
155
  addTempChangeCallback(pCallback) {
158
156
  this._temperatureCallbacks.push(pCallback);
159
157
  if (this._temperature > baseDeviceInterfaces_1.UNDEFINED_TEMP_VALUE) {
160
- pCallback(new temperatureSensorChangeAction_1.TemperatureSensorChangeAction(this, this._temperature));
158
+ pCallback(new models_1.TemperatureSensorChangeAction(this, this._temperature));
161
159
  }
162
160
  }
163
161
  /** @inheritDoc */
@@ -1,8 +1,7 @@
1
1
  import { HmIPDevice } from './hmIpDevice';
2
- import { MotionSensorSettings } from '../../../models';
2
+ import { MotionSensorAction, MotionSensorSettings } from '../../../models';
3
3
  import { iBatteryDevice, iIlluminationSensor, iMotionSensor } from '../baseDeviceInterfaces';
4
4
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
5
- import { MotionSensorAction } from '../../../models/action/motionSensorAction';
6
5
  export declare class HmIpPraezenz extends HmIPDevice implements iIlluminationSensor, iBatteryDevice, iMotionSensor {
7
6
  private static PRESENCE_DETECTION;
8
7
  private static CURRENT_ILLUMINATION;
@@ -6,7 +6,6 @@ const deviceType_1 = require("../deviceType");
6
6
  const models_1 = require("../../../models");
7
7
  const services_1 = require("../../services");
8
8
  const DeviceCapability_1 = require("../DeviceCapability");
9
- const motionSensorAction_1 = require("../../../models/action/motionSensorAction");
10
9
  class HmIpPraezenz extends hmIpDevice_1.HmIPDevice {
11
10
  constructor(pInfo) {
12
11
  var _a;
@@ -113,7 +112,7 @@ class HmIpPraezenz extends hmIpDevice_1.HmIPDevice {
113
112
  this.log(models_1.LogLevel.Trace, `Dies ist die ${this.detectionsToday} Bewegung `);
114
113
  }
115
114
  for (const c of this._movementDetectedCallback) {
116
- c(new motionSensorAction_1.MotionSensorAction(this));
115
+ c(new models_1.MotionSensorAction(this));
117
116
  }
118
117
  }
119
118
  persistMotionSensor() {
@@ -11,7 +11,6 @@ const models_1 = require("../models");
11
11
  const models_2 = require("../../../models");
12
12
  const lodash_1 = __importDefault(require("lodash"));
13
13
  const DeviceCapability_1 = require("../DeviceCapability");
14
- const shutterPositionChangedAction_1 = require("../../../models/action/shutterPositionChangedAction");
15
14
  class HmIpRoll extends hmIpDevice_1.HmIPDevice {
16
15
  constructor(pInfo) {
17
16
  var _a;
@@ -45,7 +44,7 @@ class HmIpRoll extends hmIpDevice_1.HmIPDevice {
45
44
  if (value !== this._currentLevel && this._window) {
46
45
  services_1.Utils.guardedNewThread(() => {
47
46
  var _a;
48
- (_a = this._window) === null || _a === void 0 ? void 0 : _a.rolloPositionChange(new shutterPositionChangedAction_1.ShutterPositionChangedAction(this, value));
47
+ (_a = this._window) === null || _a === void 0 ? void 0 : _a.rolloPositionChange(new models_2.ShutterPositionChangedAction(this, value));
49
48
  }, this);
50
49
  this.persist();
51
50
  }
@@ -10,19 +10,21 @@ export * from './scene/index';
10
10
  export * from './sharedFunctions/index';
11
11
  export * from './shelly/index';
12
12
  export * from './tuya/index';
13
+ export * from './tv/index';
13
14
  export * from './zigbee/index';
14
15
  export * from './device-cluster';
15
16
  export * from './device-cluster-type';
16
17
  export * from './device-list';
18
+ export { DeviceCapability } from './DeviceCapability';
17
19
  export * from './DeviceInfo';
18
20
  export * from './devices';
19
21
  export * from './deviceType';
20
22
  export * from './deviceUpdater';
21
23
  export * from './Griffe';
22
24
  export * from './Heizgruppen';
23
- export * from './mqtt';
24
25
  export * from './iDeviceUpdater';
26
+ export * from './mqtt';
25
27
  export * from './IoBrokerBaseDevice';
26
- export * from './tv';
27
- export * from './wledDevice';
28
+ export * from './IoBrokerDeviceInfo';
28
29
  export { NameAmountValuePair } from './nameAmountValuePair';
30
+ export * from './wledDevice';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.NameAmountValuePair = void 0;
17
+ exports.NameAmountValuePair = exports.DeviceCapability = void 0;
18
18
  __exportStar(require("./baseDeviceInterfaces/index"), exports);
19
19
  __exportStar(require("./blueIris/index"), exports);
20
20
  __exportStar(require("./button/index"), exports);
@@ -27,20 +27,23 @@ __exportStar(require("./scene/index"), exports);
27
27
  __exportStar(require("./sharedFunctions/index"), exports);
28
28
  __exportStar(require("./shelly/index"), exports);
29
29
  __exportStar(require("./tuya/index"), exports);
30
+ __exportStar(require("./tv/index"), exports);
30
31
  __exportStar(require("./zigbee/index"), exports);
31
32
  __exportStar(require("./device-cluster"), exports);
32
33
  __exportStar(require("./device-cluster-type"), exports);
33
34
  __exportStar(require("./device-list"), exports);
35
+ var DeviceCapability_1 = require("./DeviceCapability");
36
+ Object.defineProperty(exports, "DeviceCapability", { enumerable: true, get: function () { return DeviceCapability_1.DeviceCapability; } });
34
37
  __exportStar(require("./DeviceInfo"), exports);
35
38
  __exportStar(require("./devices"), exports);
36
39
  __exportStar(require("./deviceType"), exports);
37
40
  __exportStar(require("./deviceUpdater"), exports);
38
41
  __exportStar(require("./Griffe"), exports);
39
42
  __exportStar(require("./Heizgruppen"), exports);
40
- __exportStar(require("./mqtt"), exports);
41
43
  __exportStar(require("./iDeviceUpdater"), exports);
44
+ __exportStar(require("./mqtt"), exports);
42
45
  __exportStar(require("./IoBrokerBaseDevice"), exports);
43
- __exportStar(require("./tv"), exports);
44
- __exportStar(require("./wledDevice"), exports);
46
+ __exportStar(require("./IoBrokerDeviceInfo"), exports);
45
47
  var nameAmountValuePair_1 = require("./nameAmountValuePair");
46
48
  Object.defineProperty(exports, "NameAmountValuePair", { enumerable: true, get: function () { return nameAmountValuePair_1.NameAmountValuePair; } });
49
+ __exportStar(require("./wledDevice"), exports);
@@ -1,10 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { DeviceType } from '../../deviceType';
3
3
  import { ZigbeeDevice } from './index';
4
- import { MotionSensorSettings } from '../../../../models';
4
+ import { MotionSensorAction, MotionSensorSettings } from '../../../../models';
5
5
  import { iBatteryDevice, iMotionSensor } from '../../baseDeviceInterfaces';
6
6
  import { IoBrokerDeviceInfo } from '../../IoBrokerDeviceInfo';
7
- import { MotionSensorAction } from '../../../../models/action/motionSensorAction';
8
7
  export declare class ZigbeeMotionSensor extends ZigbeeDevice implements iMotionSensor, iBatteryDevice {
9
8
  /** @inheritDoc */
10
9
  settings: MotionSensorSettings;
@@ -5,7 +5,6 @@ const index_1 = require("./index");
5
5
  const models_1 = require("../../../../models");
6
6
  const services_1 = require("../../../services");
7
7
  const DeviceCapability_1 = require("../../DeviceCapability");
8
- const motionSensorAction_1 = require("../../../../models/action/motionSensorAction");
9
8
  class ZigbeeMotionSensor extends index_1.ZigbeeDevice {
10
9
  constructor(pInfo, type) {
11
10
  var _a;
@@ -103,7 +102,7 @@ class ZigbeeMotionSensor extends index_1.ZigbeeDevice {
103
102
  this.log(models_1.LogLevel.Trace, `This is movement no. ${this.detectionsToday}`);
104
103
  }
105
104
  for (const c of this._movementDetectedCallback) {
106
- c(new motionSensorAction_1.MotionSensorAction(this));
105
+ c(new models_1.MotionSensorAction(this));
107
106
  }
108
107
  }
109
108
  /** @inheritDoc */
@@ -10,7 +10,6 @@ const zigbeeDevice_1 = require("./zigbeeDevice");
10
10
  const models_2 = require("../../models");
11
11
  const lodash_1 = __importDefault(require("lodash"));
12
12
  const DeviceCapability_1 = require("../../DeviceCapability");
13
- const shutterPositionChangedAction_1 = require("../../../../models/action/shutterPositionChangedAction");
14
13
  class ZigbeeShutter extends zigbeeDevice_1.ZigbeeDevice {
15
14
  constructor(pInfo, pType) {
16
15
  var _a, _b;
@@ -53,7 +52,7 @@ class ZigbeeShutter extends zigbeeDevice_1.ZigbeeDevice {
53
52
  if (value !== this._currentLevel && this._window) {
54
53
  services_1.Utils.guardedNewThread(() => {
55
54
  var _a;
56
- (_a = this._window) === null || _a === void 0 ? void 0 : _a.rolloPositionChange(new shutterPositionChangedAction_1.ShutterPositionChangedAction(this, value));
55
+ (_a = this._window) === null || _a === void 0 ? void 0 : _a.rolloPositionChange(new models_1.ShutterPositionChangedAction(this, value));
57
56
  }, this);
58
57
  this.persist();
59
58
  }
@@ -2,8 +2,7 @@
2
2
  import { ZigbeeDevice } from './BaseDevices';
3
3
  import { iBatteryDevice, iHumiditySensor, iTemperatureSensor } from '../baseDeviceInterfaces';
4
4
  import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
5
- import { HumiditySensorChangeAction } from '../../../models/action/humiditySensorChangeAction';
6
- import { TemperatureSensorChangeAction } from '../../../models/action/temperatureSensorChangeAction';
5
+ import { HumiditySensorChangeAction, TemperatureSensorChangeAction } from '../../../models';
7
6
  export declare class ZigbeeSonoffTemp extends ZigbeeDevice implements iTemperatureSensor, iHumiditySensor, iBatteryDevice {
8
7
  private _battery;
9
8
  private _lastBatteryPersist;
@@ -7,8 +7,6 @@ const deviceType_1 = require("../deviceType");
7
7
  const DeviceCapability_1 = require("../DeviceCapability");
8
8
  const models_1 = require("../../../models");
9
9
  const services_1 = require("../../services");
10
- const humiditySensorChangeAction_1 = require("../../../models/action/humiditySensorChangeAction");
11
- const temperatureSensorChangeAction_1 = require("../../../models/action/temperatureSensorChangeAction");
12
10
  class ZigbeeSonoffTemp extends BaseDevices_1.ZigbeeDevice {
13
11
  /** @inheritDoc */
14
12
  get lastBatteryPersist() {
@@ -54,7 +52,7 @@ class ZigbeeSonoffTemp extends BaseDevices_1.ZigbeeDevice {
54
52
  set humidity(val) {
55
53
  this._humidity = val;
56
54
  for (const cb of this._humidityCallbacks) {
57
- cb(new humiditySensorChangeAction_1.HumiditySensorChangeAction(this, val));
55
+ cb(new models_1.HumiditySensorChangeAction(this, val));
58
56
  }
59
57
  }
60
58
  /** @inheritDoc */
@@ -68,7 +66,7 @@ class ZigbeeSonoffTemp extends BaseDevices_1.ZigbeeDevice {
68
66
  set temperature(val) {
69
67
  this._temperature = val;
70
68
  for (const cb of this._temperaturCallbacks) {
71
- cb(new temperatureSensorChangeAction_1.TemperatureSensorChangeAction(this, val));
69
+ cb(new models_1.TemperatureSensorChangeAction(this, val));
72
70
  }
73
71
  }
74
72
  /** @inheritDoc */
@@ -94,14 +92,14 @@ class ZigbeeSonoffTemp extends BaseDevices_1.ZigbeeDevice {
94
92
  addHumidityCallback(pCallback) {
95
93
  this._humidityCallbacks.push(pCallback);
96
94
  if (this._humidity > 0) {
97
- pCallback(new humiditySensorChangeAction_1.HumiditySensorChangeAction(this, this._humidity));
95
+ pCallback(new models_1.HumiditySensorChangeAction(this, this._humidity));
98
96
  }
99
97
  }
100
98
  /** @inheritDoc */
101
99
  addTempChangeCallback(pCallback) {
102
100
  this._temperaturCallbacks.push(pCallback);
103
101
  if (this._temperature > baseDeviceInterfaces_1.UNDEFINED_TEMP_VALUE) {
104
- pCallback(new temperatureSensorChangeAction_1.TemperatureSensorChangeAction(this, this._temperature));
102
+ pCallback(new models_1.TemperatureSensorChangeAction(this, this._temperature));
105
103
  }
106
104
  }
107
105
  /** @inheritDoc */