hoffmation-base 2.9.13 → 2.9.15
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/collisionSolving.js +1 -1
- package/lib/models/deviceSettings/shutterSettings.js +3 -2
- package/lib/models/logLevel.js +1 -1
- package/lib/models/logSource.js +1 -1
- package/lib/models/timeCallback.js +2 -2
- package/lib/server/config/heatingMode.js +1 -1
- package/lib/server/devices/DeviceCapability.js +1 -1
- package/lib/server/devices/IoBrokerBaseDevice.js +1 -1
- package/lib/server/devices/blueIris/blueIrisCoordinator.js +1 -1
- package/lib/server/devices/button/buttonPosition.js +1 -1
- package/lib/server/devices/button/buttonPressType.js +1 -1
- package/lib/server/devices/device-cluster-type.js +1 -1
- package/lib/server/devices/device-cluster.js +2 -0
- package/lib/server/devices/deviceType.d.ts +2 -0
- package/lib/server/devices/deviceType.js +3 -1
- package/lib/server/devices/devices.js +1 -1
- package/lib/server/devices/espresense/espresenseCoordinator.js +1 -1
- package/lib/server/devices/groups/group-type.js +1 -1
- package/lib/server/devices/hmIPDevices/hmIpBewegung.js +1 -1
- package/lib/server/devices/hmIPDevices/hmIpPraezenz.js +1 -1
- package/lib/server/devices/hmIPDevices/hmIpTaster.js +1 -1
- package/lib/server/devices/hmIPDevices/hmIpWippe.js +1 -1
- package/lib/server/devices/models/MagnetPosition.js +1 -1
- package/lib/server/devices/models/WindowPosition.js +1 -1
- package/lib/server/devices/tv/tvDeviceType.js +1 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.js +1 -1
- package/lib/server/devices/zigbee/index.d.ts +2 -0
- package/lib/server/devices/zigbee/index.js +2 -0
- package/lib/server/devices/zigbee/zigbeeAqaraOpple3Switch.js +1 -1
- package/lib/server/devices/zigbee/zigbeeUbisysActuator.d.ts +13 -0
- package/lib/server/devices/zigbee/zigbeeUbisysActuator.js +38 -0
- package/lib/server/devices/zigbee/zigbeeUbisysLampe.d.ts +15 -0
- package/lib/server/devices/zigbee/zigbeeUbisysLampe.js +65 -0
- package/lib/server/ioBroker/ioBroker.main.js +1 -1
- package/lib/server/ioBroker/iobrokerConnectionLogging.js +2 -2
- package/lib/server/services/Sonos/OwnSonosDevices.js +1 -1
- package/lib/server/services/Sonos/mp3-server.js +1 -1
- package/lib/server/services/Sonos/polly-service.js +1 -1
- package/lib/server/services/Sonos/sonos-service.js +1 -1
- package/lib/server/services/Telegram/telegram-service.js +1 -1
- package/lib/server/services/ac/ac-mode.js +1 -1
- package/lib/server/services/ac/acDeviceType.js +1 -1
- package/lib/server/services/ac/daikin-service.js +1 -1
- package/lib/server/services/ac/own-ac-devices.js +1 -1
- package/lib/server/services/calendar/muell-tonne.js +1 -1
- package/lib/server/services/calendar/m/303/274ll-service.js +1 -1
- package/lib/server/services/log-service/log-filter-data.js +1 -1
- package/lib/server/services/log-service/log-service.js +1 -1
- package/lib/server/services/network/router.js +1 -1
- package/lib/server/services/news-service.js +1 -1
- package/lib/server/services/room-service/room-service.js +1 -1
- package/lib/server/services/tibber-service.js +1 -1
- package/lib/server/services/time-callback-service.js +1 -1
- package/lib/server/services/victron/victron-service.js +1 -1
- package/lib/server/services/weather/weather-service.js +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
|
@@ -6,4 +6,4 @@ var CollisionSolving;
|
|
|
6
6
|
CollisionSolving[CollisionSolving["doNothing"] = 0] = "doNothing";
|
|
7
7
|
CollisionSolving[CollisionSolving["overrideIfGreater"] = 1] = "overrideIfGreater";
|
|
8
8
|
CollisionSolving[CollisionSolving["override"] = 2] = "override";
|
|
9
|
-
})(CollisionSolving
|
|
9
|
+
})(CollisionSolving || (exports.CollisionSolving = CollisionSolving = {}));
|
|
@@ -26,11 +26,12 @@ class ShutterSettings extends deviceSettings_1.DeviceSettings {
|
|
|
26
26
|
this.triggerPositionUpdateByTime = false;
|
|
27
27
|
}
|
|
28
28
|
fromPartialObject(data) {
|
|
29
|
-
var _a, _b, _c, _d;
|
|
29
|
+
var _a, _b, _c, _d, _e;
|
|
30
30
|
this.msTilTop = (_a = data.msTilTop) !== null && _a !== void 0 ? _a : this.msTilTop;
|
|
31
31
|
this.msTilBot = (_b = data.msTilBot) !== null && _b !== void 0 ? _b : this.msTilBot;
|
|
32
32
|
this.direction = (_c = data.direction) !== null && _c !== void 0 ? _c : this.direction;
|
|
33
|
-
this.
|
|
33
|
+
this.heatReductionPosition = (_d = data.heatReductionPosition) !== null && _d !== void 0 ? _d : this.heatReductionPosition;
|
|
34
|
+
this.triggerPositionUpdateByTime = (_e = data.triggerPositionUpdateByTime) !== null && _e !== void 0 ? _e : this.triggerPositionUpdateByTime;
|
|
34
35
|
super.fromPartialObject(data);
|
|
35
36
|
}
|
|
36
37
|
toJSON() {
|
package/lib/models/logLevel.js
CHANGED
|
@@ -10,4 +10,4 @@ var LogLevel;
|
|
|
10
10
|
LogLevel[LogLevel["Debug"] = 4] = "Debug";
|
|
11
11
|
LogLevel[LogLevel["Trace"] = 5] = "Trace";
|
|
12
12
|
LogLevel[LogLevel["DeepTrace"] = 6] = "DeepTrace";
|
|
13
|
-
})(LogLevel
|
|
13
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
package/lib/models/logSource.js
CHANGED
|
@@ -8,14 +8,14 @@ var TimeCallbackType;
|
|
|
8
8
|
TimeCallbackType[TimeCallbackType["TimeOfDay"] = 1] = "TimeOfDay";
|
|
9
9
|
TimeCallbackType[TimeCallbackType["Sunrise"] = 2] = "Sunrise";
|
|
10
10
|
TimeCallbackType[TimeCallbackType["SunSet"] = 3] = "SunSet";
|
|
11
|
-
})(TimeCallbackType
|
|
11
|
+
})(TimeCallbackType || (exports.TimeCallbackType = TimeCallbackType = {}));
|
|
12
12
|
var TimeOfDay;
|
|
13
13
|
(function (TimeOfDay) {
|
|
14
14
|
TimeOfDay[TimeOfDay["BeforeSunrise"] = 1] = "BeforeSunrise";
|
|
15
15
|
TimeOfDay[TimeOfDay["Daylight"] = 2] = "Daylight";
|
|
16
16
|
TimeOfDay[TimeOfDay["AfterSunset"] = 3] = "AfterSunset";
|
|
17
17
|
TimeOfDay[TimeOfDay["Night"] = 4] = "Night";
|
|
18
|
-
})(TimeOfDay
|
|
18
|
+
})(TimeOfDay || (exports.TimeOfDay = TimeOfDay = {}));
|
|
19
19
|
class TimeCallback {
|
|
20
20
|
get calculationSunrise() {
|
|
21
21
|
var _a;
|
|
@@ -6,4 +6,4 @@ var HeatingMode;
|
|
|
6
6
|
HeatingMode[HeatingMode["None"] = 0] = "None";
|
|
7
7
|
HeatingMode[HeatingMode["Winter"] = 1] = "Winter";
|
|
8
8
|
HeatingMode[HeatingMode["Sommer"] = 2] = "Sommer";
|
|
9
|
-
})(HeatingMode
|
|
9
|
+
})(HeatingMode || (exports.HeatingMode = HeatingMode = {}));
|
|
@@ -28,4 +28,4 @@ var DeviceCapability;
|
|
|
28
28
|
DeviceCapability[DeviceCapability["scene"] = 103] = "scene";
|
|
29
29
|
DeviceCapability[DeviceCapability["blockAutomatic"] = 104] = "blockAutomatic";
|
|
30
30
|
DeviceCapability[DeviceCapability["camera"] = 105] = "camera";
|
|
31
|
-
})(DeviceCapability
|
|
31
|
+
})(DeviceCapability || (exports.DeviceCapability = DeviceCapability = {}));
|
|
@@ -11,4 +11,4 @@ var ButtonPosition;
|
|
|
11
11
|
ButtonPosition[ButtonPosition["botRight"] = 6] = "botRight";
|
|
12
12
|
ButtonPosition[ButtonPosition["top"] = 11] = "top";
|
|
13
13
|
ButtonPosition[ButtonPosition["bottom"] = 12] = "bottom";
|
|
14
|
-
})(ButtonPosition
|
|
14
|
+
})(ButtonPosition || (exports.ButtonPosition = ButtonPosition = {}));
|
|
@@ -7,4 +7,4 @@ var ButtonPressType;
|
|
|
7
7
|
ButtonPressType[ButtonPressType["long"] = 1] = "long";
|
|
8
8
|
ButtonPressType[ButtonPressType["double"] = 2] = "double";
|
|
9
9
|
ButtonPressType[ButtonPressType["triple"] = 3] = "triple";
|
|
10
|
-
})(ButtonPressType
|
|
10
|
+
})(ButtonPressType || (exports.ButtonPressType = ButtonPressType = {}));
|
|
@@ -24,4 +24,4 @@ var DeviceClusterType;
|
|
|
24
24
|
DeviceClusterType[DeviceClusterType["WLED"] = 19] = "WLED";
|
|
25
25
|
DeviceClusterType[DeviceClusterType["Tv"] = 20] = "Tv";
|
|
26
26
|
DeviceClusterType[DeviceClusterType["Camera"] = 21] = "Camera";
|
|
27
|
-
})(DeviceClusterType
|
|
27
|
+
})(DeviceClusterType || (exports.DeviceClusterType = DeviceClusterType = {}));
|
|
@@ -39,6 +39,7 @@ class DeviceCluster {
|
|
|
39
39
|
case deviceType_1.DeviceType.ZigbeeIlluDimmer:
|
|
40
40
|
case deviceType_1.DeviceType.ZigbeeOsramDimmer:
|
|
41
41
|
case deviceType_1.DeviceType.ZigbeeIlluLampe:
|
|
42
|
+
case deviceType_1.DeviceType.ZigbeeUbisysLampe:
|
|
42
43
|
clusterTypes.push(device_cluster_type_1.DeviceClusterType.Lamps);
|
|
43
44
|
break;
|
|
44
45
|
case deviceType_1.DeviceType.HmIpWippe:
|
|
@@ -97,6 +98,7 @@ class DeviceCluster {
|
|
|
97
98
|
clusterTypes.push(device_cluster_type_1.DeviceClusterType.WLED);
|
|
98
99
|
break;
|
|
99
100
|
case deviceType_1.DeviceType.ZigbeeIlluActuator: // Dependent on use case
|
|
101
|
+
case deviceType_1.DeviceType.ZigbeeUbisysActuator: // Dependent on use case
|
|
100
102
|
case deviceType_1.DeviceType.HmIpTherm: // Humidity and temperature not yet implemented
|
|
101
103
|
case deviceType_1.DeviceType.HmIpHeizung: // Setting/Controlling via HM-Ip Heizgruppe
|
|
102
104
|
case deviceType_1.DeviceType.unknown:
|
|
@@ -39,6 +39,8 @@ var DeviceType;
|
|
|
39
39
|
DeviceType[DeviceType["ZigbeeLinkindLedRgbCct"] = 221] = "ZigbeeLinkindLedRgbCct";
|
|
40
40
|
DeviceType[DeviceType["ZigbeeOsramDimmer"] = 222] = "ZigbeeOsramDimmer";
|
|
41
41
|
DeviceType[DeviceType["ZigbeeIkeaShutter"] = 223] = "ZigbeeIkeaShutter";
|
|
42
|
+
DeviceType[DeviceType["ZigbeeUbisysActuator"] = 224] = "ZigbeeUbisysActuator";
|
|
43
|
+
DeviceType[DeviceType["ZigbeeUbisysLampe"] = 224] = "ZigbeeUbisysLampe";
|
|
42
44
|
DeviceType[DeviceType["JsEnergyManager"] = 301] = "JsEnergyManager";
|
|
43
45
|
DeviceType[DeviceType["RoomScene"] = 401] = "RoomScene";
|
|
44
46
|
DeviceType[DeviceType["WledDevice"] = 1001] = "WledDevice";
|
|
@@ -49,4 +51,4 @@ var DeviceType;
|
|
|
49
51
|
DeviceType[DeviceType["SamsungTv"] = 5001] = "SamsungTv";
|
|
50
52
|
DeviceType[DeviceType["Camera"] = 6001] = "Camera";
|
|
51
53
|
DeviceType[DeviceType["Victron"] = 7001] = "Victron";
|
|
52
|
-
})(DeviceType
|
|
54
|
+
})(DeviceType || (exports.DeviceType = DeviceType = {}));
|
|
@@ -234,10 +234,10 @@ class Devices {
|
|
|
234
234
|
Devices.alLDevices[fullName] = Devices.energymanager;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
+
exports.Devices = Devices;
|
|
237
238
|
Devices.IDENTIFIER_HOMEMATIC = 'hm-rpc';
|
|
238
239
|
Devices.IDENTIFIER_JS = 'javascript';
|
|
239
240
|
Devices.IDENTIFIER_ZIGBEE = 'zigbee';
|
|
240
241
|
Devices.IDENTIFIER_WLED = 'wled';
|
|
241
242
|
Devices.alLDevices = {};
|
|
242
243
|
Devices.energymanager = undefined;
|
|
243
|
-
exports.Devices = Devices;
|
|
@@ -13,4 +13,4 @@ var GroupType;
|
|
|
13
13
|
GroupType[GroupType["Water"] = 7] = "Water";
|
|
14
14
|
GroupType[GroupType["Heating"] = 8] = "Heating";
|
|
15
15
|
GroupType[GroupType["Ac"] = 9] = "Ac";
|
|
16
|
-
})(GroupType
|
|
16
|
+
})(GroupType || (exports.GroupType = GroupType = {}));
|
|
@@ -117,7 +117,7 @@ class HmIpBewegung extends hmIpDevice_1.HmIPDevice {
|
|
|
117
117
|
}, 270000, this);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
+
exports.HmIpBewegung = HmIpBewegung;
|
|
120
121
|
HmIpBewegung.MOVEMENT_DETECTION = 'MOTION';
|
|
121
122
|
// private static ILLUMINATION_DURING_MOVEMENT: string = 'CURRENT_ILLUMINATION';
|
|
122
123
|
HmIpBewegung.CURRENT_ILLUMINATION = 'ILLUMINATION';
|
|
123
|
-
exports.HmIpBewegung = HmIpBewegung;
|
|
@@ -127,8 +127,8 @@ class HmIpPraezenz extends hmIpDevice_1.HmIPDevice {
|
|
|
127
127
|
this._lastBatteryPersist = now;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
+
exports.HmIpPraezenz = HmIpPraezenz;
|
|
130
131
|
// TODO: Add iPresenceSensor
|
|
131
132
|
HmIpPraezenz.PRESENCE_DETECTION = 'PRESENCE_DETECTION_STATE';
|
|
132
133
|
// private static ILLUMINATION_DURING_MOVEMENT: string = 'CURRENT_ILLUMINATION';
|
|
133
134
|
HmIpPraezenz.CURRENT_ILLUMINATION = 'ILLUMINATION';
|
|
134
|
-
exports.HmIpPraezenz = HmIpPraezenz;
|
|
@@ -162,10 +162,10 @@ class HmIpTaster extends hmIpDevice_1.HmIPDevice {
|
|
|
162
162
|
return result;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
+
exports.HmIpTaster = HmIpTaster;
|
|
165
166
|
HmIpTaster.BUTTON_CAPABILLITIES = {
|
|
166
167
|
shortPress: true,
|
|
167
168
|
longPress: true,
|
|
168
169
|
doublePress: false,
|
|
169
170
|
triplePress: false,
|
|
170
171
|
};
|
|
171
|
-
exports.HmIpTaster = HmIpTaster;
|
|
@@ -81,10 +81,10 @@ class HmIpWippe extends hmIpDevice_1.HmIPDevice {
|
|
|
81
81
|
return result;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
exports.HmIpWippe = HmIpWippe;
|
|
84
85
|
HmIpWippe.BUTTON_CAPABILLITIES = {
|
|
85
86
|
shortPress: true,
|
|
86
87
|
longPress: true,
|
|
87
88
|
doublePress: false,
|
|
88
89
|
triplePress: false,
|
|
89
90
|
};
|
|
90
|
-
exports.HmIpWippe = HmIpWippe;
|
|
@@ -5,4 +5,4 @@ var MagnetPosition;
|
|
|
5
5
|
(function (MagnetPosition) {
|
|
6
6
|
MagnetPosition[MagnetPosition["closed"] = 0] = "closed";
|
|
7
7
|
MagnetPosition[MagnetPosition["open"] = 1] = "open";
|
|
8
|
-
})(MagnetPosition
|
|
8
|
+
})(MagnetPosition || (exports.MagnetPosition = MagnetPosition = {}));
|
|
@@ -6,4 +6,4 @@ var WindowPosition;
|
|
|
6
6
|
WindowPosition[WindowPosition["geschlossen"] = 0] = "geschlossen";
|
|
7
7
|
WindowPosition[WindowPosition["kipp"] = 1] = "kipp";
|
|
8
8
|
WindowPosition[WindowPosition["offen"] = 2] = "offen";
|
|
9
|
-
})(WindowPosition
|
|
9
|
+
})(WindowPosition || (exports.WindowPosition = WindowPosition = {}));
|
|
@@ -5,4 +5,4 @@ var TvDeviceType;
|
|
|
5
5
|
(function (TvDeviceType) {
|
|
6
6
|
TvDeviceType[TvDeviceType["Unknown"] = 0] = "Unknown";
|
|
7
7
|
TvDeviceType[TvDeviceType["Samsung"] = 1] = "Samsung";
|
|
8
|
-
})(TvDeviceType
|
|
8
|
+
})(TvDeviceType || (exports.TvDeviceType = TvDeviceType = {}));
|
|
@@ -20,4 +20,6 @@ export * from './zigbeeSMaBiTMagnetContact';
|
|
|
20
20
|
export * from './zigbeeSonoffMotion';
|
|
21
21
|
export * from './zigbeeSonoffTemp';
|
|
22
22
|
export * from './zigbeeTuyaValve';
|
|
23
|
+
export * from './zigbeeUbisysActuator';
|
|
24
|
+
export * from './zigbeeUbisysLampe';
|
|
23
25
|
export * from './zigbeeUbisysShutter';
|
|
@@ -36,4 +36,6 @@ __exportStar(require("./zigbeeSMaBiTMagnetContact"), exports);
|
|
|
36
36
|
__exportStar(require("./zigbeeSonoffMotion"), exports);
|
|
37
37
|
__exportStar(require("./zigbeeSonoffTemp"), exports);
|
|
38
38
|
__exportStar(require("./zigbeeTuyaValve"), exports);
|
|
39
|
+
__exportStar(require("./zigbeeUbisysActuator"), exports);
|
|
40
|
+
__exportStar(require("./zigbeeUbisysLampe"), exports);
|
|
39
41
|
__exportStar(require("./zigbeeUbisysShutter"), exports);
|
|
@@ -102,10 +102,10 @@ class ZigbeeAqaraOpple3Switch extends BaseDevices_1.ZigbeeSwitch {
|
|
|
102
102
|
taste.updateState(pressType, val);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
exports.ZigbeeAqaraOpple3Switch = ZigbeeAqaraOpple3Switch;
|
|
105
106
|
ZigbeeAqaraOpple3Switch.BUTTON_CAPABILLITIES = {
|
|
106
107
|
shortPress: true,
|
|
107
108
|
longPress: true,
|
|
108
109
|
doublePress: true,
|
|
109
110
|
triplePress: true,
|
|
110
111
|
};
|
|
111
|
-
exports.ZigbeeAqaraOpple3Switch = ZigbeeAqaraOpple3Switch;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="iobroker" />
|
|
2
|
+
import { ZigbeeActuator } from './BaseDevices';
|
|
3
|
+
import { DeviceType } from '../deviceType';
|
|
4
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
|
+
export declare class ZigbeeUbisysActuator extends ZigbeeActuator {
|
|
6
|
+
private _loadPower;
|
|
7
|
+
constructor(pInfo: IoBrokerDeviceInfo, deviceType?: DeviceType);
|
|
8
|
+
get isActuatorOn(): boolean;
|
|
9
|
+
get loadPower(): number;
|
|
10
|
+
update(idSplit: string[], state: ioBroker.State, initial?: boolean, handledByChildObject?: boolean): void;
|
|
11
|
+
setActuator(pValue: boolean, timeout?: number, force?: boolean): void;
|
|
12
|
+
toggleActuator(force?: boolean): boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZigbeeUbisysActuator = void 0;
|
|
4
|
+
const BaseDevices_1 = require("./BaseDevices");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const deviceType_1 = require("../deviceType");
|
|
7
|
+
class ZigbeeUbisysActuator extends BaseDevices_1.ZigbeeActuator {
|
|
8
|
+
constructor(pInfo, deviceType = deviceType_1.DeviceType.ZigbeeUbisysActuator) {
|
|
9
|
+
super(pInfo, deviceType, `${pInfo.fullID}.state`);
|
|
10
|
+
this._loadPower = 0;
|
|
11
|
+
}
|
|
12
|
+
get isActuatorOn() {
|
|
13
|
+
return this.actuatorOn;
|
|
14
|
+
}
|
|
15
|
+
get loadPower() {
|
|
16
|
+
return this._loadPower;
|
|
17
|
+
}
|
|
18
|
+
update(idSplit, state, initial = false, handledByChildObject = false) {
|
|
19
|
+
if (!handledByChildObject) {
|
|
20
|
+
this.log(models_1.LogLevel.DeepTrace, `Aktuator Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
|
|
21
|
+
}
|
|
22
|
+
switch (idSplit[3]) {
|
|
23
|
+
case 'load_power':
|
|
24
|
+
const newLoadPower = state.val;
|
|
25
|
+
this.log(Math.abs(newLoadPower - this._loadPower) > 0.25 ? models_1.LogLevel.Trace : models_1.LogLevel.DeepTrace, `Outlet update, new current load power: ${state.val}`);
|
|
26
|
+
this._loadPower = newLoadPower;
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
super.update(idSplit, state, initial, true);
|
|
30
|
+
}
|
|
31
|
+
setActuator(pValue, timeout = -1, force = false) {
|
|
32
|
+
super.setActuator(pValue, timeout, force);
|
|
33
|
+
}
|
|
34
|
+
toggleActuator(force = false) {
|
|
35
|
+
return super.toggleActuator(force);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.ZigbeeUbisysActuator = ZigbeeUbisysActuator;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="iobroker" />
|
|
2
|
+
import { TimeOfDay } from '../../../models';
|
|
3
|
+
import { iLamp } from '../baseDeviceInterfaces';
|
|
4
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
|
+
import { ZigbeeUbisysActuator } from './zigbeeUbisysActuator';
|
|
6
|
+
export declare class ZigbeeUbisysLampe extends ZigbeeUbisysActuator implements iLamp {
|
|
7
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
8
|
+
get lightOn(): boolean;
|
|
9
|
+
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
10
|
+
/** @inheritdoc */
|
|
11
|
+
setLight(pValue: boolean, timeout?: number, force?: boolean): void;
|
|
12
|
+
toggleLight(time?: TimeOfDay, force?: boolean, calculateTime?: boolean): boolean;
|
|
13
|
+
setTimeBased(time: TimeOfDay, timeout?: number, force?: boolean): void;
|
|
14
|
+
persist(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZigbeeUbisysLampe = void 0;
|
|
4
|
+
const deviceType_1 = require("../deviceType");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
6
|
+
const services_1 = require("../../services");
|
|
7
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
|
+
const zigbeeUbisysActuator_1 = require("./zigbeeUbisysActuator");
|
|
9
|
+
class ZigbeeUbisysLampe extends zigbeeUbisysActuator_1.ZigbeeUbisysActuator {
|
|
10
|
+
constructor(pInfo) {
|
|
11
|
+
super(pInfo, deviceType_1.DeviceType.ZigbeeUbisysLampe);
|
|
12
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.lamp);
|
|
13
|
+
}
|
|
14
|
+
get lightOn() {
|
|
15
|
+
return super.isActuatorOn;
|
|
16
|
+
}
|
|
17
|
+
update(idSplit, state, initial = false) {
|
|
18
|
+
super.update(idSplit, state, initial, true);
|
|
19
|
+
switch (idSplit[3]) {
|
|
20
|
+
case 'state':
|
|
21
|
+
this.log(models_1.LogLevel.Trace, `Lampen Update für ${this.info.customName} auf ${state.val}`);
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** @inheritdoc */
|
|
26
|
+
setLight(pValue, timeout = -1, force = false) {
|
|
27
|
+
this.log(models_1.LogLevel.Debug, `Set Light Acutator to "${pValue}"`, services_1.LogDebugType.SetActuator);
|
|
28
|
+
if (this.settings.isStromStoss) {
|
|
29
|
+
timeout = 3000;
|
|
30
|
+
services_1.Utils.guardedTimeout(() => {
|
|
31
|
+
var _a;
|
|
32
|
+
if (this.room && ((_a = this.room.PraesenzGroup) === null || _a === void 0 ? void 0 : _a.anyPresent())) {
|
|
33
|
+
this.setLight(true, -1, true);
|
|
34
|
+
}
|
|
35
|
+
}, this.settings.stromStossResendTime * 1000, this);
|
|
36
|
+
}
|
|
37
|
+
super.setActuator(pValue, timeout, force);
|
|
38
|
+
}
|
|
39
|
+
toggleLight(time, force = false, calculateTime = false) {
|
|
40
|
+
var _a;
|
|
41
|
+
const newVal = this.queuedValue !== null ? !this.queuedValue : !this.lightOn;
|
|
42
|
+
const timeout = newVal && force ? 30 * 60 * 1000 : -1;
|
|
43
|
+
if (newVal && time === undefined && calculateTime && this.room !== undefined) {
|
|
44
|
+
time = services_1.TimeCallbackService.dayType((_a = this.room) === null || _a === void 0 ? void 0 : _a.settings.lampOffset);
|
|
45
|
+
}
|
|
46
|
+
if (newVal && time !== undefined) {
|
|
47
|
+
this.setTimeBased(time, timeout, force);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
this.setLight(newVal, timeout, force);
|
|
51
|
+
return newVal;
|
|
52
|
+
}
|
|
53
|
+
setTimeBased(time, timeout = -1, force = false) {
|
|
54
|
+
if ((time === models_1.TimeOfDay.Night && this.settings.nightOn) ||
|
|
55
|
+
(time === models_1.TimeOfDay.BeforeSunrise && this.settings.dawnOn) ||
|
|
56
|
+
(time === models_1.TimeOfDay.AfterSunset && this.settings.duskOn)) {
|
|
57
|
+
this.setLight(true, timeout, force);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
persist() {
|
|
61
|
+
var _a;
|
|
62
|
+
(_a = services_1.Utils.dbo) === null || _a === void 0 ? void 0 : _a.persistActuator(this);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.ZigbeeUbisysLampe = ZigbeeUbisysLampe;
|
|
@@ -100,6 +100,6 @@ class ioBrokerMain {
|
|
|
100
100
|
services_1.TimeCallbackService.performCheck();
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
exports.ioBrokerMain = ioBrokerMain;
|
|
103
104
|
ioBrokerMain.SplitKeys = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
|
104
105
|
ioBrokerMain.roomConstructors = {};
|
|
105
|
-
exports.ioBrokerMain = ioBrokerMain;
|
|
@@ -9,7 +9,7 @@ var iobrokerConnectionLogLevel;
|
|
|
9
9
|
iobrokerConnectionLogLevel[iobrokerConnectionLogLevel["Debug"] = 4] = "Debug";
|
|
10
10
|
iobrokerConnectionLogLevel[iobrokerConnectionLogLevel["Trace"] = 5] = "Trace";
|
|
11
11
|
iobrokerConnectionLogLevel[iobrokerConnectionLogLevel["DeepTrace"] = 6] = "DeepTrace";
|
|
12
|
-
})(iobrokerConnectionLogLevel
|
|
12
|
+
})(iobrokerConnectionLogLevel || (exports.iobrokerConnectionLogLevel = iobrokerConnectionLogLevel = {}));
|
|
13
13
|
class iobrokerConnectionLogging {
|
|
14
14
|
static writeLog(pLevel, pMessage) {
|
|
15
15
|
if (pLevel > iobrokerConnectionLogging.LogLevel) {
|
|
@@ -29,5 +29,5 @@ class iobrokerConnectionLogging {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
iobrokerConnectionLogging.LogLevel = 5;
|
|
33
32
|
exports.iobrokerConnectionLogging = iobrokerConnectionLogging;
|
|
33
|
+
iobrokerConnectionLogging.LogLevel = 5;
|
|
@@ -105,7 +105,7 @@ class SonosService {
|
|
|
105
105
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Debug, `Sonos ${d.Uuid} für ${d.Name} gefunden`);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
exports.SonosService = SonosService;
|
|
108
109
|
SonosService.all = [];
|
|
109
110
|
SonosService.devicesDict = {};
|
|
110
111
|
SonosService.ownDevices = {};
|
|
111
|
-
exports.SonosService = SonosService;
|
|
@@ -153,8 +153,8 @@ class TelegramService {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
exports.TelegramService = TelegramService;
|
|
156
157
|
TelegramService.active = false;
|
|
157
158
|
TelegramService.settings = undefined;
|
|
158
159
|
// private static restartTimeout: NodeJS.Timeout | undefined = undefined;
|
|
159
160
|
TelegramService.callbacks = {};
|
|
160
|
-
exports.TelegramService = TelegramService;
|
|
@@ -5,4 +5,4 @@ var AcDeviceType;
|
|
|
5
5
|
(function (AcDeviceType) {
|
|
6
6
|
AcDeviceType[AcDeviceType["Unknown"] = 0] = "Unknown";
|
|
7
7
|
AcDeviceType[AcDeviceType["Daikin"] = 1] = "Daikin";
|
|
8
|
-
})(AcDeviceType
|
|
8
|
+
})(AcDeviceType || (exports.AcDeviceType = AcDeviceType = {}));
|
|
@@ -106,10 +106,10 @@ class MuellService {
|
|
|
106
106
|
this.brauneTonne.check();
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
exports.MuellService = MuellService;
|
|
109
110
|
MuellService.alleTonnen = [];
|
|
110
111
|
MuellService.loadingPending = true;
|
|
111
112
|
MuellService.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
112
113
|
MuellService.lastCheck = new Date(0);
|
|
113
114
|
MuellService._active = false;
|
|
114
115
|
MuellService.defaultSpeaker = undefined;
|
|
115
|
-
exports.MuellService = MuellService;
|
|
@@ -12,7 +12,7 @@ var LogDebugType;
|
|
|
12
12
|
LogDebugType[LogDebugType["SkipUnchangedMovementState"] = 6] = "SkipUnchangedMovementState";
|
|
13
13
|
LogDebugType[LogDebugType["DaikinSuccessfullControlInfo"] = 7] = "DaikinSuccessfullControlInfo";
|
|
14
14
|
LogDebugType[LogDebugType["EuroHeaterValveLogging"] = 8] = "EuroHeaterValveLogging";
|
|
15
|
-
})(LogDebugType
|
|
15
|
+
})(LogDebugType || (exports.LogDebugType = LogDebugType = {}));
|
|
16
16
|
class LogFilterData {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.debugType = LogDebugType.None;
|
|
@@ -112,6 +112,7 @@ class ServerLogService {
|
|
|
112
112
|
return true;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
+
exports.ServerLogService = ServerLogService;
|
|
115
116
|
ServerLogService.telegramLevel = -1; // Controlled from within Config File
|
|
116
117
|
ServerLogService.storageLevel = 5; // Controlled from within Config File
|
|
117
118
|
ServerLogService.storage = new utils_1.ringStorage(10000);
|
|
@@ -119,4 +120,3 @@ ServerLogService.settings = {
|
|
|
119
120
|
logLevel: 4,
|
|
120
121
|
useTimestamp: false,
|
|
121
122
|
};
|
|
122
|
-
exports.ServerLogService = ServerLogService;
|
|
@@ -190,10 +190,10 @@ class RoomService {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
+
exports.RoomService = RoomService;
|
|
193
194
|
RoomService.Rooms = new Map();
|
|
194
195
|
RoomService.awayModeActive = false;
|
|
195
196
|
RoomService.nightAlarmActive = false;
|
|
196
197
|
RoomService.movementHistory = new utils_1.ringStorage(15);
|
|
197
198
|
RoomService._intrusionAlarmActive = false;
|
|
198
199
|
RoomService._intrusionAlarmLevel = 0;
|
|
199
|
-
exports.RoomService = RoomService;
|
|
@@ -181,6 +181,6 @@ Next Sunset: ${TimeCallbackService._nextSunSet.toLocaleString('de-DE')}`);
|
|
|
181
181
|
return (this.nextSunSet.getTime() - utils_1.Utils.nowMS()) / 1000 / 60;
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
+
exports.TimeCallbackService = TimeCallbackService;
|
|
184
185
|
TimeCallbackService._callbacks = new Map();
|
|
185
186
|
TimeCallbackService._lastCheck = new Date(0);
|
|
186
|
-
exports.TimeCallbackService = TimeCallbackService;
|
|
@@ -27,6 +27,6 @@ class VictronService {
|
|
|
27
27
|
this._victronDevice = new victron_device_1.VictronDevice(opts);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
+
exports.VictronService = VictronService;
|
|
30
31
|
VictronService._settings = undefined;
|
|
31
32
|
VictronService._victronDevice = undefined;
|
|
32
|
-
exports.VictronService = VictronService;
|