hoffmation-base 2.19.2 → 2.19.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.
- package/lib/models/deviceSettings/cameraSettings.d.ts +1 -0
- package/lib/models/deviceSettings/cameraSettings.js +4 -2
- package/lib/server/devices/blueIris/cameraDevice.d.ts +6 -0
- package/lib/server/devices/blueIris/cameraDevice.js +38 -0
- package/lib/server/devices/dachs/dachs.d.ts +1 -0
- package/lib/server/devices/dachs/dachs.js +3 -0
- package/lib/server/devices/groups/lightGroup.d.ts +1 -0
- package/lib/server/devices/groups/lightGroup.js +17 -29
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { MotionSensorSettings } from './motionSensorSettings';
|
|
|
2
2
|
export declare class CameraSettings extends MotionSensorSettings {
|
|
3
3
|
alertPersonOnTelegram: boolean;
|
|
4
4
|
movementDetectionOnPersonOnly: boolean;
|
|
5
|
+
movementDetectionOnDogsToo: boolean;
|
|
5
6
|
hasAudio: boolean;
|
|
6
7
|
fromPartialObject(data: Partial<CameraSettings>): void;
|
|
7
8
|
protected toJSON(): Partial<MotionSensorSettings>;
|
|
@@ -8,13 +8,15 @@ class CameraSettings extends motionSensorSettings_1.MotionSensorSettings {
|
|
|
8
8
|
super(...arguments);
|
|
9
9
|
this.alertPersonOnTelegram = false;
|
|
10
10
|
this.movementDetectionOnPersonOnly = false;
|
|
11
|
+
this.movementDetectionOnDogsToo = false;
|
|
11
12
|
this.hasAudio = false;
|
|
12
13
|
}
|
|
13
14
|
fromPartialObject(data) {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
+
var _a, _b, _c, _d;
|
|
15
16
|
this.alertPersonOnTelegram = (_a = data.alertPersonOnTelegram) !== null && _a !== void 0 ? _a : this.alertPersonOnTelegram;
|
|
16
17
|
this.movementDetectionOnPersonOnly = (_b = data.movementDetectionOnPersonOnly) !== null && _b !== void 0 ? _b : this.movementDetectionOnPersonOnly;
|
|
17
|
-
this.
|
|
18
|
+
this.movementDetectionOnDogsToo = (_c = data.movementDetectionOnDogsToo) !== null && _c !== void 0 ? _c : this.movementDetectionOnDogsToo;
|
|
19
|
+
this.hasAudio = (_d = data.hasAudio) !== null && _d !== void 0 ? _d : this.hasAudio;
|
|
18
20
|
super.fromPartialObject(data);
|
|
19
21
|
}
|
|
20
22
|
toJSON() {
|
|
@@ -8,7 +8,9 @@ export declare class CameraDevice implements iCameraDevice {
|
|
|
8
8
|
readonly blueIrisName: string;
|
|
9
9
|
private _personDetectFallbackTimeout;
|
|
10
10
|
private _movementDetectFallbackTimeout;
|
|
11
|
+
private _dogDetectFallbackTimeout;
|
|
11
12
|
private _personDetectedStateId;
|
|
13
|
+
private _dogDetectedStateId;
|
|
12
14
|
private _movementDetectedStateId;
|
|
13
15
|
get lastImage(): string;
|
|
14
16
|
settings: CameraSettings;
|
|
@@ -20,12 +22,15 @@ export declare class CameraDevice implements iCameraDevice {
|
|
|
20
22
|
private _movementDetectedCallback;
|
|
21
23
|
private _lastImage;
|
|
22
24
|
private _personDetected;
|
|
25
|
+
private _dogDetected;
|
|
23
26
|
private _alarmGriffBlockCount;
|
|
24
27
|
private _alarmBlockedByGriffTimeStamp;
|
|
25
28
|
readonly mpegStreamLink: string;
|
|
26
29
|
readonly h264IosStreamLink: string;
|
|
27
30
|
readonly rtspStreamLink: string;
|
|
28
31
|
readonly currentImageLink: string;
|
|
32
|
+
get dogDetected(): boolean;
|
|
33
|
+
get personDetected(): boolean;
|
|
29
34
|
get alarmBlockedByGriffTimeStamp(): number;
|
|
30
35
|
get alarmBlockedByGriff(): boolean;
|
|
31
36
|
constructor(mqttName: string, roomName: string, blueIrisName: string);
|
|
@@ -59,5 +64,6 @@ export declare class CameraDevice implements iCameraDevice {
|
|
|
59
64
|
persistDeviceInfo(): void;
|
|
60
65
|
loadDeviceSettings(): void;
|
|
61
66
|
private resetPersonDetectFallbackTimer;
|
|
67
|
+
private resetDogDetectFallbackTimer;
|
|
62
68
|
private resetMovementFallbackTimer;
|
|
63
69
|
}
|
|
@@ -17,6 +17,12 @@ class CameraDevice {
|
|
|
17
17
|
get lastImage() {
|
|
18
18
|
return this._lastImage;
|
|
19
19
|
}
|
|
20
|
+
get dogDetected() {
|
|
21
|
+
return this._dogDetected;
|
|
22
|
+
}
|
|
23
|
+
get personDetected() {
|
|
24
|
+
return this._personDetected;
|
|
25
|
+
}
|
|
20
26
|
get alarmBlockedByGriffTimeStamp() {
|
|
21
27
|
return this._alarmBlockedByGriffTimeStamp;
|
|
22
28
|
}
|
|
@@ -27,7 +33,9 @@ class CameraDevice {
|
|
|
27
33
|
var _a;
|
|
28
34
|
this._personDetectFallbackTimeout = null;
|
|
29
35
|
this._movementDetectFallbackTimeout = null;
|
|
36
|
+
this._dogDetectFallbackTimeout = null;
|
|
30
37
|
this._personDetectedStateId = undefined;
|
|
38
|
+
this._dogDetectedStateId = undefined;
|
|
31
39
|
this._movementDetectedStateId = undefined;
|
|
32
40
|
this.settings = new models_1.CameraSettings();
|
|
33
41
|
this.deviceCapabilities = [DeviceCapability_1.DeviceCapability.camera, DeviceCapability_1.DeviceCapability.motionSensor];
|
|
@@ -37,6 +45,7 @@ class CameraDevice {
|
|
|
37
45
|
this._movementDetectedCallback = [];
|
|
38
46
|
this._lastImage = '';
|
|
39
47
|
this._personDetected = false;
|
|
48
|
+
this._dogDetected = false;
|
|
40
49
|
this._alarmGriffBlockCount = 0;
|
|
41
50
|
this._alarmBlockedByGriffTimeStamp = 0;
|
|
42
51
|
this.mpegStreamLink = '';
|
|
@@ -158,6 +167,18 @@ class CameraDevice {
|
|
|
158
167
|
this.updateMovement(newValue);
|
|
159
168
|
}
|
|
160
169
|
break;
|
|
170
|
+
case 'DogDetected':
|
|
171
|
+
this._dogDetectedStateId = idSplit.join('.');
|
|
172
|
+
const newDogDetectionVal = state.val === 1;
|
|
173
|
+
if (newDogDetectionVal) {
|
|
174
|
+
this.log(models_1.LogLevel.Info, `Dog Detected`);
|
|
175
|
+
this.resetDogDetectFallbackTimer();
|
|
176
|
+
}
|
|
177
|
+
this._dogDetected = newDogDetectionVal;
|
|
178
|
+
if (this.settings.movementDetectionOnDogsToo) {
|
|
179
|
+
this.updateMovement(newDogDetectionVal);
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
161
182
|
case 'MotionSnapshot':
|
|
162
183
|
this._lastImage = state.val;
|
|
163
184
|
services_1.Utils.guardedTimeout(() => {
|
|
@@ -234,6 +255,23 @@ class CameraDevice {
|
|
|
234
255
|
}
|
|
235
256
|
}, 120000, this);
|
|
236
257
|
}
|
|
258
|
+
resetDogDetectFallbackTimer() {
|
|
259
|
+
if (this._dogDetectFallbackTimeout !== null) {
|
|
260
|
+
clearTimeout(this._dogDetectFallbackTimeout);
|
|
261
|
+
this._dogDetectFallbackTimeout = null;
|
|
262
|
+
}
|
|
263
|
+
this._dogDetectFallbackTimeout = services_1.Utils.guardedTimeout(() => {
|
|
264
|
+
var _a;
|
|
265
|
+
this._dogDetectFallbackTimeout = null;
|
|
266
|
+
this._dogDetected = false;
|
|
267
|
+
if (this.settings.movementDetectionOnDogsToo) {
|
|
268
|
+
this.updateMovement(false);
|
|
269
|
+
}
|
|
270
|
+
if (this._dogDetectedStateId !== undefined) {
|
|
271
|
+
(_a = ioBroker_1.ioBrokerMain.iOConnection) === null || _a === void 0 ? void 0 : _a.setState(this._dogDetectedStateId, { val: 0, ack: true });
|
|
272
|
+
}
|
|
273
|
+
}, 120000, this);
|
|
274
|
+
}
|
|
237
275
|
resetMovementFallbackTimer() {
|
|
238
276
|
if (this._movementDetectFallbackTimeout !== null) {
|
|
239
277
|
clearTimeout(this._movementDetectFallbackTimeout);
|
|
@@ -22,6 +22,7 @@ export declare class Dachs implements iBaseDevice, iActuator {
|
|
|
22
22
|
get customName(): string;
|
|
23
23
|
get actuatorOn(): boolean;
|
|
24
24
|
get tempWarmWater(): number;
|
|
25
|
+
get tempHeatStorage(): number;
|
|
25
26
|
constructor(options: iDachsSettings);
|
|
26
27
|
protected _info: DeviceInfo;
|
|
27
28
|
get info(): DeviceInfo;
|
|
@@ -22,6 +22,9 @@ class Dachs {
|
|
|
22
22
|
get tempWarmWater() {
|
|
23
23
|
return this._tempWarmWater;
|
|
24
24
|
}
|
|
25
|
+
get tempHeatStorage() {
|
|
26
|
+
return this._tempHeatStorage;
|
|
27
|
+
}
|
|
25
28
|
constructor(options) {
|
|
26
29
|
this.settings = new dachsSettings_1.DachsDeviceSettings();
|
|
27
30
|
this.deviceType = devices_1.DeviceType.Dachs;
|
|
@@ -13,6 +13,7 @@ export declare class LightGroup extends BaseGroup {
|
|
|
13
13
|
getLED(): iLedRgbCct[];
|
|
14
14
|
getWled(): WledDevice[];
|
|
15
15
|
getOutlets(): iActuator[];
|
|
16
|
+
getAllAsActuator(): iActuator[];
|
|
16
17
|
handleSunriseOff(): void;
|
|
17
18
|
switchAll(target: boolean, force?: boolean): void;
|
|
18
19
|
switchTimeConditional(time: TimeOfDay): void;
|
|
@@ -52,6 +52,14 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
52
52
|
getOutlets() {
|
|
53
53
|
return this.deviceCluster.getDevicesByType(device_cluster_type_1.DeviceClusterType.Outlets);
|
|
54
54
|
}
|
|
55
|
+
getAllAsActuator() {
|
|
56
|
+
const result = [];
|
|
57
|
+
result.push(...this.getLights());
|
|
58
|
+
result.push(...this.getOutlets());
|
|
59
|
+
result.push(...this.getLED());
|
|
60
|
+
result.push(...this.getWled());
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
55
63
|
handleSunriseOff() {
|
|
56
64
|
if (!this.anyLightsOn()) {
|
|
57
65
|
return;
|
|
@@ -60,17 +68,12 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
60
68
|
this.switchAll(false);
|
|
61
69
|
}
|
|
62
70
|
switchAll(target, force = false) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
this.getLED().forEach((s) => {
|
|
70
|
-
s.setLight(target);
|
|
71
|
-
});
|
|
72
|
-
this.getWled().forEach((wled) => {
|
|
73
|
-
wled.setLight(target);
|
|
71
|
+
this.getAllAsActuator().forEach((a) => {
|
|
72
|
+
if (a.settings.includeInAmbientLight && !force && !target && this._ambientLightOn) {
|
|
73
|
+
a.log(models_1.LogLevel.Info, `Ambient light mode is active --> Skip non force light off command in ${this.roomName}`);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
a.setActuator(target, undefined, force);
|
|
74
77
|
});
|
|
75
78
|
}
|
|
76
79
|
switchTimeConditional(time) {
|
|
@@ -193,24 +196,9 @@ class LightGroup extends base_group_1.BaseGroup {
|
|
|
193
196
|
ambientLightStartCallback() {
|
|
194
197
|
this._ambientLightOn = true;
|
|
195
198
|
this.log(models_1.LogLevel.Info, `Draußen wird es dunkel --> Aktiviere Ambientenbeleuchtung`);
|
|
196
|
-
this.
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
this.getOutlets().forEach((o) => {
|
|
202
|
-
if (o.settings.includeInAmbientLight) {
|
|
203
|
-
o.setActuator(true);
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
this.getLED().forEach((s) => {
|
|
207
|
-
if (s.settings.includeInAmbientLight) {
|
|
208
|
-
s.setLight(true, -1, false);
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
this.getWled().forEach((wled) => {
|
|
212
|
-
if (wled.settings.includeInAmbientLight) {
|
|
213
|
-
wled.setLight(true);
|
|
199
|
+
this.getAllAsActuator().forEach((a) => {
|
|
200
|
+
if (a.settings.includeInAmbientLight) {
|
|
201
|
+
a.setActuator(true);
|
|
214
202
|
}
|
|
215
203
|
});
|
|
216
204
|
services_1.Utils.guardedTimeout(() => {
|