hoffmation-base 1.0.41 → 1.0.45
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/index.d.ts +2 -2
- package/lib/models/rooms/RoomBase.d.ts +2 -2
- package/lib/server/devices/DeviceCapability.d.ts +17 -0
- package/lib/server/devices/DeviceCapability.js +21 -0
- package/lib/server/devices/IoBrokerBaseDevice.d.ts +4 -2
- package/lib/server/devices/IoBrokerBaseDevice.js +1 -0
- package/lib/server/devices/baseDeviceInterfaces/iAcDevice.d.ts +14 -0
- package/lib/server/devices/baseDeviceInterfaces/iAcDevice.js +2 -0
- package/lib/server/devices/baseDeviceInterfaces/iActuator.d.ts +15 -0
- package/lib/server/devices/baseDeviceInterfaces/iActuator.js +2 -0
- package/lib/server/devices/baseDeviceInterfaces/iBaseDevice.d.ts +4 -2
- package/lib/server/devices/baseDeviceInterfaces/iButtonSwitch.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.d.ts +16 -0
- package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.js +2 -0
- package/lib/server/devices/baseDeviceInterfaces/iEnergyManager.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iHandleSensor.d.ts +9 -0
- package/lib/server/devices/baseDeviceInterfaces/iHandleSensor.js +2 -0
- package/lib/server/devices/baseDeviceInterfaces/iHeater.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iHumiditySensor.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +4 -4
- package/lib/server/devices/baseDeviceInterfaces/iMotionSensor.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iSpeaker.d.ts +8 -0
- package/lib/server/devices/baseDeviceInterfaces/iSpeaker.js +2 -0
- package/lib/server/devices/baseDeviceInterfaces/iTemperatureSensor.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iVibrationSensor.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/index.d.ts +4 -0
- package/lib/server/devices/baseDeviceInterfaces/index.js +4 -0
- package/lib/server/devices/device-cluster.d.ts +4 -5
- package/lib/server/devices/device-cluster.js +6 -0
- package/lib/server/devices/device-list.d.ts +3 -5
- package/lib/server/devices/device-list.js +4 -13
- package/lib/server/devices/deviceUpdater.js +2 -1
- package/lib/server/devices/devices.d.ts +2 -2
- package/lib/server/devices/groups/heatGroup.js +1 -1
- package/lib/server/devices/groups/index.d.ts +1 -1
- package/lib/server/devices/groups/index.js +1 -1
- package/lib/server/devices/groups/lampenGroup.d.ts +3 -3
- package/lib/server/devices/groups/lampenGroup.js +3 -3
- package/lib/server/devices/groups/{sonosGroup.d.ts → speakerGroup.d.ts} +3 -3
- package/lib/server/devices/groups/{sonosGroup.js → speakerGroup.js} +6 -8
- package/lib/server/devices/hmIPDevices/hmIpBewegung.js +3 -0
- package/lib/server/devices/hmIPDevices/hmIpGriff.d.ts +4 -3
- package/lib/server/devices/hmIPDevices/hmIpGriff.js +1 -1
- package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.js +4 -0
- package/lib/server/devices/hmIPDevices/hmIpLampe.js +2 -0
- package/lib/server/devices/hmIPDevices/hmIpPraezenz.js +3 -0
- package/lib/server/devices/hmIPDevices/hmIpRoll.js +2 -0
- package/lib/server/devices/hmIPDevices/hmIpTaster.js +2 -0
- package/lib/server/devices/hmIPDevices/hmIpWippe.js +2 -0
- package/lib/server/devices/jsObject/jsObjectEnergyManager.js +2 -0
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.d.ts +4 -3
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.js +2 -0
- package/lib/server/devices/zigbee/BaseDevices/index.d.ts +1 -0
- package/lib/server/devices/zigbee/BaseDevices/index.js +1 -0
- package/lib/server/devices/zigbee/BaseDevices/zigbeeHeater.js +2 -0
- package/lib/server/devices/zigbee/{zigbeeMotionSensor.d.ts → BaseDevices/zigbeeMotionSensor.d.ts} +5 -5
- package/lib/server/devices/zigbee/{zigbeeMotionSensor.js → BaseDevices/zigbeeMotionSensor.js} +6 -4
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.js +2 -0
- package/lib/server/devices/zigbee/index.d.ts +0 -1
- package/lib/server/devices/zigbee/index.js +0 -1
- package/lib/server/devices/zigbee/zigbeeAquaraMotion.d.ts +1 -1
- package/lib/server/devices/zigbee/zigbeeAquaraMotion.js +4 -2
- package/lib/server/devices/zigbee/zigbeeAquaraVibra.js +2 -0
- package/lib/server/devices/zigbee/zigbeeBlitzShp.js +2 -0
- package/lib/server/devices/zigbee/zigbeeIkeaSteckdose.d.ts +0 -3
- package/lib/server/devices/zigbee/zigbeeIkeaSteckdose.js +0 -9
- package/lib/server/devices/zigbee/zigbeeIlluDimmer.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIlluDimmer.js +3 -0
- package/lib/server/devices/zigbee/zigbeeIlluLampe.js +2 -0
- package/lib/server/devices/zigbee/zigbeeSonoffMotion.d.ts +1 -1
- package/lib/server/devices/zigbee/zigbeeSonoffMotion.js +2 -2
- package/lib/server/devices/zigbee/zigbeeSonoffTemp.js +3 -0
- package/lib/server/devices/zigbee/zigbeeUbisysShutter.d.ts +1 -1
- package/lib/server/services/Sonos/OwnSonosDevices.d.ts +1 -1
- package/lib/server/services/Sonos/OwnSonosDevices.js +1 -1
- package/lib/server/services/Sonos/index.d.ts +1 -0
- package/lib/server/services/Sonos/index.js +3 -0
- package/lib/server/services/Sonos/own-sonos-device.d.ts +26 -0
- package/lib/server/services/Sonos/own-sonos-device.js +108 -0
- package/lib/server/services/Sonos/sonos-service.d.ts +1 -20
- package/lib/server/services/Sonos/sonos-service.js +5 -94
- package/lib/server/services/ac/ac-device.d.ts +4 -2
- package/lib/server/services/ac/ac-device.js +2 -0
- package/lib/server/services/api/api-service.d.ts +22 -5
- package/lib/server/services/api/api-service.js +47 -5
- package/lib/server/services/calendar/muell-tonne.d.ts +3 -3
- package/lib/server/services/calendar/muell-tonne.js +6 -12
- package/lib/server/services/calendar/m/303/274ll-service.d.ts +3 -3
- package/lib/server/services/calendar/m/303/274ll-service.js +7 -7
- package/lib/server/services/news-service.d.ts +3 -3
- package/lib/server/services/news-service.js +4 -4
- package/lib/server/services/room-service/room-service.d.ts +3 -2
- package/lib/server/services/room-service/room-service.js +1 -0
- package/lib/server/services/weather/weather-service.d.ts +2 -2
- package/lib/server/services/weather/weather-service.js +14 -15
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
|
-
import { HmIPDevice } from './hmIpDevice';
|
|
3
2
|
import { FensterPosition } from '../models';
|
|
4
3
|
import { Fenster } from '../groups';
|
|
5
4
|
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
6
5
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
7
|
-
|
|
6
|
+
import { HmIPDevice } from './hmIpDevice';
|
|
7
|
+
import { iHandleSensor } from '../baseDeviceInterfaces';
|
|
8
|
+
export declare class HmIpGriff extends HmIPDevice implements iHandleSensor {
|
|
8
9
|
position: FensterPosition;
|
|
9
10
|
private _kippCallback;
|
|
10
11
|
private _closedCallback;
|
|
11
12
|
private _offenCallback;
|
|
12
13
|
private _iOpenTimeout;
|
|
13
|
-
|
|
14
|
+
minutesOpen: number;
|
|
14
15
|
private _fenster;
|
|
15
16
|
private _helpingRoomTemp;
|
|
16
17
|
constructor(pInfo: IoBrokerDeviceInfo);
|
|
@@ -4,12 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.HmIpGriff = void 0;
|
|
7
|
-
const hmIpDevice_1 = require("./hmIpDevice");
|
|
8
7
|
const deviceType_1 = require("../deviceType");
|
|
9
8
|
const services_1 = require("../../services");
|
|
10
9
|
const models_1 = require("../models");
|
|
11
10
|
const models_2 = require("../../../models");
|
|
12
11
|
const lodash_1 = __importDefault(require("lodash"));
|
|
12
|
+
const hmIpDevice_1 = require("./hmIpDevice");
|
|
13
13
|
class HmIpGriff extends hmIpDevice_1.HmIPDevice {
|
|
14
14
|
constructor(pInfo) {
|
|
15
15
|
super(pInfo, deviceType_1.DeviceType.HmIpGriff);
|
|
@@ -7,6 +7,7 @@ const services_1 = require("../../services");
|
|
|
7
7
|
const models_1 = require("../../../models");
|
|
8
8
|
const baseDeviceInterfaces_1 = require("../baseDeviceInterfaces");
|
|
9
9
|
const device_cluster_type_1 = require("../device-cluster-type");
|
|
10
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
10
11
|
class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
|
|
11
12
|
constructor(pInfo) {
|
|
12
13
|
super(pInfo, deviceType_1.DeviceType.HmIpHeizgruppe);
|
|
@@ -22,6 +23,9 @@ class HmIpHeizgruppe extends hmIpDevice_1.HmIPDevice {
|
|
|
22
23
|
this._humidity = baseDeviceInterfaces_1.UNDEFINED_HUMIDITY_VALUE;
|
|
23
24
|
this._desiredTemperature = 0;
|
|
24
25
|
this._roomTemperatur = baseDeviceInterfaces_1.UNDEFINED_TEMP_VALUE;
|
|
26
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.temperatureSensor);
|
|
27
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.humiditySensor);
|
|
28
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.heater);
|
|
25
29
|
this._setPointTemperatureID = `${this.info.fullID}.1.SET_POINT_TEMPERATURE`;
|
|
26
30
|
this._iAutomaticInterval = services_1.Utils.guardedInterval(this.checkAutomaticChange, 300000, this); // Alle 5 Minuten prüfen
|
|
27
31
|
services_1.TimeCallbackService.addCallback(new models_1.TimeCallback(`${this.info.fullID} Season Check`, models_1.TimeCallbackType.TimeOfDay, () => {
|
|
@@ -5,6 +5,7 @@ const hmIpDevice_1 = require("./hmIpDevice");
|
|
|
5
5
|
const deviceType_1 = require("../deviceType");
|
|
6
6
|
const services_1 = require("../../services");
|
|
7
7
|
const models_1 = require("../../../models");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class HmIpLampe extends hmIpDevice_1.HmIPDevice {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.HmIpLampe);
|
|
@@ -14,6 +15,7 @@ class HmIpLampe extends hmIpDevice_1.HmIPDevice {
|
|
|
14
15
|
this.lightOnSwitchID = '';
|
|
15
16
|
this._turnOffTimeout = undefined;
|
|
16
17
|
this.turnOffTime = 0;
|
|
18
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.lamp);
|
|
17
19
|
this.lightOnSwitchID = `${this.info.fullID}.2.STATE`;
|
|
18
20
|
}
|
|
19
21
|
update(idSplit, state, initial = false) {
|
|
@@ -5,6 +5,7 @@ const hmIpDevice_1 = require("./hmIpDevice");
|
|
|
5
5
|
const deviceType_1 = require("../deviceType");
|
|
6
6
|
const models_1 = require("../../../models");
|
|
7
7
|
const services_1 = require("../../services");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class HmIpPraezenz extends hmIpDevice_1.HmIPDevice {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
var _a;
|
|
@@ -16,6 +17,7 @@ class HmIpPraezenz extends hmIpDevice_1.HmIPDevice {
|
|
|
16
17
|
this.initialized = false;
|
|
17
18
|
this._detectionsToday = 0;
|
|
18
19
|
this._currentIllumination = -1;
|
|
20
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.illuminationSensor);
|
|
19
21
|
// this.presenceStateID = `${this.info.fullID}.1.${HmIpPraezenz.PRESENCE_DETECTION}`;
|
|
20
22
|
(_a = services_1.Utils.dbo) === null || _a === void 0 ? void 0 : _a.getCount(this).then((todayCount) => {
|
|
21
23
|
this.detectionsToday = todayCount.counter;
|
|
@@ -86,6 +88,7 @@ class HmIpPraezenz extends hmIpDevice_1.HmIPDevice {
|
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
exports.HmIpPraezenz = HmIpPraezenz;
|
|
91
|
+
// TODO: Add iPresenceSensor
|
|
89
92
|
HmIpPraezenz.PRESENCE_DETECTION = 'PRESENCE_DETECTION_STATE';
|
|
90
93
|
// private static ILLUMINATION_DURING_MOVEMENT: string = 'CURRENT_ILLUMINATION';
|
|
91
94
|
HmIpPraezenz.CURRENT_ILLUMINATION = 'ILLUMINATION';
|
|
@@ -10,6 +10,7 @@ const services_1 = require("../../services");
|
|
|
10
10
|
const models_1 = require("../models");
|
|
11
11
|
const models_2 = require("../../../models");
|
|
12
12
|
const lodash_1 = __importDefault(require("lodash"));
|
|
13
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
13
14
|
class HmIpRoll extends hmIpDevice_1.HmIPDevice {
|
|
14
15
|
constructor(pInfo) {
|
|
15
16
|
super(pInfo, deviceType_1.DeviceType.HmIpRoll);
|
|
@@ -17,6 +18,7 @@ class HmIpRoll extends hmIpDevice_1.HmIPDevice {
|
|
|
17
18
|
this._setLevel = -1;
|
|
18
19
|
this._setLevelTime = -1;
|
|
19
20
|
this._currentLevel = -1;
|
|
21
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.shutter);
|
|
20
22
|
this._setLevelSwitchID = `${this.info.fullID}.4.LEVEL`;
|
|
21
23
|
}
|
|
22
24
|
get currentLevel() {
|
|
@@ -5,6 +5,7 @@ const hmIpDevice_1 = require("./hmIpDevice");
|
|
|
5
5
|
const deviceType_1 = require("../deviceType");
|
|
6
6
|
const button_1 = require("../button");
|
|
7
7
|
const models_1 = require("../../../models");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class HmIpTaster extends hmIpDevice_1.HmIPDevice {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.HmIpTaster);
|
|
@@ -16,6 +17,7 @@ class HmIpTaster extends hmIpDevice_1.HmIPDevice {
|
|
|
16
17
|
this.buttonBotRight = new button_1.Button('BotRight', HmIpTaster.BUTTON_CAPABILLITIES);
|
|
17
18
|
this.buttonBot = undefined;
|
|
18
19
|
this.buttonTop = undefined;
|
|
20
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.buttonSwitch);
|
|
19
21
|
}
|
|
20
22
|
update(idSplit, state, initial = false) {
|
|
21
23
|
this.log(models_1.LogLevel.DeepTrace, `Taster Update: JSON: ${JSON.stringify(state)}ID: ${idSplit.join('.')}`);
|
|
@@ -5,11 +5,13 @@ const hmIpDevice_1 = require("./hmIpDevice");
|
|
|
5
5
|
const deviceType_1 = require("../deviceType");
|
|
6
6
|
const button_1 = require("../button");
|
|
7
7
|
const models_1 = require("../../../models");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class HmIpWippe extends hmIpDevice_1.HmIPDevice {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.HmIpWippe);
|
|
11
12
|
this.buttonBot = new button_1.Button('Bottom', HmIpWippe.BUTTON_CAPABILLITIES);
|
|
12
13
|
this.buttonTop = new button_1.Button('Top', HmIpWippe.BUTTON_CAPABILLITIES);
|
|
14
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.buttonSwitch);
|
|
13
15
|
}
|
|
14
16
|
update(idSplit, state, initial = false) {
|
|
15
17
|
this.log(models_1.LogLevel.DeepTrace, `Wippe Update: JSON: ${JSON.stringify(state)}ID: ${idSplit.join('.')}`);
|
|
@@ -6,6 +6,7 @@ const baseDeviceInterfaces_1 = require("../baseDeviceInterfaces");
|
|
|
6
6
|
const deviceType_1 = require("../deviceType");
|
|
7
7
|
const models_1 = require("../../../models");
|
|
8
8
|
const services_1 = require("../../services");
|
|
9
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
9
10
|
class JsObjectEnergyManager extends IoBrokerBaseDevice_1.IoBrokerBaseDevice {
|
|
10
11
|
constructor(info) {
|
|
11
12
|
super(info, deviceType_1.DeviceType.JsEnergyManager);
|
|
@@ -22,6 +23,7 @@ class JsObjectEnergyManager extends IoBrokerBaseDevice_1.IoBrokerBaseDevice {
|
|
|
22
23
|
this._phaseAState = new baseDeviceInterfaces_1.PhaseState(0, 0);
|
|
23
24
|
this._phaseBState = new baseDeviceInterfaces_1.PhaseState(0, 0);
|
|
24
25
|
this._phaseCState = new baseDeviceInterfaces_1.PhaseState(0, 0);
|
|
26
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.energyManager);
|
|
25
27
|
this.log(models_1.LogLevel.Info, `Creating Energy Manager Device`);
|
|
26
28
|
this._iCalculationInterval = services_1.Utils.guardedInterval(() => {
|
|
27
29
|
this.calculateExcessEnergy();
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { ActuatorSettings } from '../../../../models';
|
|
3
|
-
import { ZigbeeDevice } from './zigbeeDevice';
|
|
4
3
|
import { DeviceType } from '../../deviceType';
|
|
5
4
|
import { IoBrokerDeviceInfo } from '../../IoBrokerDeviceInfo';
|
|
6
|
-
|
|
5
|
+
import { iActuator } from '../../baseDeviceInterfaces';
|
|
6
|
+
import { ZigbeeDevice } from './zigbeeDevice';
|
|
7
|
+
export declare class ZigbeeActuator extends ZigbeeDevice implements iActuator {
|
|
7
8
|
settings: ActuatorSettings;
|
|
8
9
|
protected readonly actuatorOnSwitchID: string;
|
|
9
10
|
protected queuedValue: boolean | null;
|
|
10
|
-
|
|
11
|
+
actuatorOn: boolean;
|
|
11
12
|
private _turnOffTimeout;
|
|
12
13
|
private turnOffTime;
|
|
13
14
|
constructor(pInfo: IoBrokerDeviceInfo, type: DeviceType, actuatorOnSwitchID: string);
|
|
@@ -4,6 +4,7 @@ exports.ZigbeeActuator = void 0;
|
|
|
4
4
|
const services_1 = require("../../../services");
|
|
5
5
|
const models_1 = require("../../../../models");
|
|
6
6
|
const zigbeeDevice_1 = require("./zigbeeDevice");
|
|
7
|
+
const DeviceCapability_1 = require("../../DeviceCapability");
|
|
7
8
|
class ZigbeeActuator extends zigbeeDevice_1.ZigbeeDevice {
|
|
8
9
|
constructor(pInfo, type, actuatorOnSwitchID) {
|
|
9
10
|
super(pInfo, type);
|
|
@@ -12,6 +13,7 @@ class ZigbeeActuator extends zigbeeDevice_1.ZigbeeDevice {
|
|
|
12
13
|
this.actuatorOn = false;
|
|
13
14
|
this._turnOffTimeout = undefined;
|
|
14
15
|
this.turnOffTime = 0;
|
|
16
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.actuator);
|
|
15
17
|
this.actuatorOnSwitchID = actuatorOnSwitchID;
|
|
16
18
|
}
|
|
17
19
|
update(idSplit, state, initial = false, handledByChildObject = false) {
|
|
@@ -18,5 +18,6 @@ __exportStar(require("./ZigbeeActuator"), exports);
|
|
|
18
18
|
__exportStar(require("./zigbeeDevice"), exports);
|
|
19
19
|
__exportStar(require("./zigbeeHeater"), exports);
|
|
20
20
|
__exportStar(require("./zigbeeMagnetContact"), exports);
|
|
21
|
+
__exportStar(require("./zigbeeMotionSensor"), exports);
|
|
21
22
|
__exportStar(require("./zigbeeShutter"), exports);
|
|
22
23
|
__exportStar(require("./zigbeeSwitch"), exports);
|
|
@@ -5,6 +5,7 @@ const zigbeeDevice_1 = require("./zigbeeDevice");
|
|
|
5
5
|
const baseDeviceInterfaces_1 = require("../../baseDeviceInterfaces");
|
|
6
6
|
const models_1 = require("../../../../models");
|
|
7
7
|
const services_1 = require("../../../services");
|
|
8
|
+
const DeviceCapability_1 = require("../../DeviceCapability");
|
|
8
9
|
class ZigbeeHeater extends zigbeeDevice_1.ZigbeeDevice {
|
|
9
10
|
constructor(pInfo, pType) {
|
|
10
11
|
super(pInfo, pType);
|
|
@@ -18,6 +19,7 @@ class ZigbeeHeater extends zigbeeDevice_1.ZigbeeDevice {
|
|
|
18
19
|
this._seasonTurnOff = false;
|
|
19
20
|
this._humidity = 0;
|
|
20
21
|
this._roomTemperatur = 0;
|
|
22
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.heater);
|
|
21
23
|
this._iAutomaticInterval = services_1.Utils.guardedInterval(this.checkAutomaticChange, 300000, this); // Alle 5 Minuten prüfen
|
|
22
24
|
services_1.TimeCallbackService.addCallback(new models_1.TimeCallback(`${this.info.fullID} Season Check`, models_1.TimeCallbackType.TimeOfDay, () => {
|
|
23
25
|
this.checkSeasonTurnOff();
|
package/lib/server/devices/zigbee/{zigbeeMotionSensor.d.ts → BaseDevices/zigbeeMotionSensor.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="iobroker" />
|
|
3
|
-
import { DeviceType } from '
|
|
4
|
-
import { ZigbeeDevice } from './
|
|
5
|
-
import { MotionSensorSettings } from '
|
|
6
|
-
import { iMotionSensor } from '
|
|
7
|
-
import { IoBrokerDeviceInfo } from '
|
|
3
|
+
import { DeviceType } from '../../deviceType';
|
|
4
|
+
import { ZigbeeDevice } from './index';
|
|
5
|
+
import { MotionSensorSettings } from '../../../../models';
|
|
6
|
+
import { iMotionSensor } from '../../baseDeviceInterfaces';
|
|
7
|
+
import { IoBrokerDeviceInfo } from '../../IoBrokerDeviceInfo';
|
|
8
8
|
export declare class ZigbeeMotionSensor extends ZigbeeDevice implements iMotionSensor {
|
|
9
9
|
settings: MotionSensorSettings;
|
|
10
10
|
movementDetected: boolean;
|
package/lib/server/devices/zigbee/{zigbeeMotionSensor.js → BaseDevices/zigbeeMotionSensor.js}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ZigbeeMotionSensor = void 0;
|
|
4
|
-
const
|
|
5
|
-
const models_1 = require("
|
|
6
|
-
const services_1 = require("
|
|
7
|
-
|
|
4
|
+
const index_1 = require("./index");
|
|
5
|
+
const models_1 = require("../../../../models");
|
|
6
|
+
const services_1 = require("../../../services");
|
|
7
|
+
const DeviceCapability_1 = require("../../DeviceCapability");
|
|
8
|
+
class ZigbeeMotionSensor extends index_1.ZigbeeDevice {
|
|
8
9
|
constructor(pInfo, type) {
|
|
9
10
|
var _a;
|
|
10
11
|
super(pInfo, type);
|
|
@@ -15,6 +16,7 @@ class ZigbeeMotionSensor extends BaseDevices_1.ZigbeeDevice {
|
|
|
15
16
|
this._needsMovementResetFallback = true;
|
|
16
17
|
this._timeSinceLastMotion = 0;
|
|
17
18
|
this._detectionsToday = 0;
|
|
19
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.motionSensor);
|
|
18
20
|
(_a = services_1.Utils.dbo) === null || _a === void 0 ? void 0 : _a.getCount(this).then((todayCount) => {
|
|
19
21
|
this.detectionsToday = todayCount.counter;
|
|
20
22
|
this.log(models_1.LogLevel.Debug, `Preinitialized movement counter with ${this.detectionsToday}`);
|
|
@@ -9,6 +9,7 @@ const models_1 = require("../../../../models");
|
|
|
9
9
|
const zigbeeDevice_1 = require("./zigbeeDevice");
|
|
10
10
|
const models_2 = require("../../models");
|
|
11
11
|
const lodash_1 = __importDefault(require("lodash"));
|
|
12
|
+
const DeviceCapability_1 = require("../../DeviceCapability");
|
|
12
13
|
class ZigbeeShutter extends zigbeeDevice_1.ZigbeeDevice {
|
|
13
14
|
constructor(pInfo, pType) {
|
|
14
15
|
var _a;
|
|
@@ -20,6 +21,7 @@ class ZigbeeShutter extends zigbeeDevice_1.ZigbeeDevice {
|
|
|
20
21
|
this._setLevelTime = -1;
|
|
21
22
|
this._shutterCalibrationData = new models_1.ShutterCalibration(this.info.fullID, 0, 0, 0, 0);
|
|
22
23
|
this._currentLevel = -1;
|
|
24
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.shutter);
|
|
23
25
|
(_a = services_1.Utils.dbo) === null || _a === void 0 ? void 0 : _a.getShutterCalibration(this).then((calibrationData) => {
|
|
24
26
|
this._shutterCalibrationData = calibrationData;
|
|
25
27
|
this.log(models_1.LogLevel.DeepTrace, `ZigbeeShutter initialized with calibration data`);
|
|
@@ -13,7 +13,6 @@ export * from './zigbeeIlluDimmer';
|
|
|
13
13
|
export * from './zigbeeIlluLampe';
|
|
14
14
|
export * from './zigbeeIlluLedRGBCCT';
|
|
15
15
|
export * from './zigbeeIlluShutter';
|
|
16
|
-
export * from './zigbeeMotionSensor';
|
|
17
16
|
export * from './zigbeeSMaBiTMagnetContact';
|
|
18
17
|
export * from './zigbeeSonoffMotion';
|
|
19
18
|
export * from './zigbeeSonoffTemp';
|
|
@@ -29,7 +29,6 @@ __exportStar(require("./zigbeeIlluDimmer"), exports);
|
|
|
29
29
|
__exportStar(require("./zigbeeIlluLampe"), exports);
|
|
30
30
|
__exportStar(require("./zigbeeIlluLedRGBCCT"), exports);
|
|
31
31
|
__exportStar(require("./zigbeeIlluShutter"), exports);
|
|
32
|
-
__exportStar(require("./zigbeeMotionSensor"), exports);
|
|
33
32
|
__exportStar(require("./zigbeeSMaBiTMagnetContact"), exports);
|
|
34
33
|
__exportStar(require("./zigbeeSonoffMotion"), exports);
|
|
35
34
|
__exportStar(require("./zigbeeSonoffTemp"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { iIlluminationSensor } from '../baseDeviceInterfaces';
|
|
3
|
-
import { ZigbeeMotionSensor } from './
|
|
3
|
+
import { ZigbeeMotionSensor } from './BaseDevices';
|
|
4
4
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
export declare class ZigbeeAquaraMotion extends ZigbeeMotionSensor implements iIlluminationSensor {
|
|
6
6
|
private _illuminance;
|
|
@@ -3,14 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZigbeeAquaraMotion = void 0;
|
|
4
4
|
const deviceType_1 = require("../deviceType");
|
|
5
5
|
const models_1 = require("../../../models");
|
|
6
|
-
const
|
|
6
|
+
const BaseDevices_1 = require("./BaseDevices");
|
|
7
7
|
const services_1 = require("../../services");
|
|
8
|
-
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
9
|
+
class ZigbeeAquaraMotion extends BaseDevices_1.ZigbeeMotionSensor {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.ZigbeeAquaraMotion);
|
|
11
12
|
this._illuminance = 0;
|
|
12
13
|
this.occupancyTimeoutID = `occupancy_timeout`;
|
|
13
14
|
this._motionTimeout = 0;
|
|
15
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.illuminationSensor);
|
|
14
16
|
this.occupancyTimeoutID = `${this.info.fullID}.${this.occupancyTimeoutID}`;
|
|
15
17
|
}
|
|
16
18
|
// Time after the last trigger until a motion event gets triggered again
|
|
@@ -5,6 +5,7 @@ const deviceType_1 = require("../deviceType");
|
|
|
5
5
|
const services_1 = require("../../services");
|
|
6
6
|
const models_1 = require("../../../models");
|
|
7
7
|
const BaseDevices_1 = require("./BaseDevices");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class ZigbeeAquaraVibra extends BaseDevices_1.ZigbeeDevice {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.ZigbeeAquaraVibra);
|
|
@@ -23,6 +24,7 @@ class ZigbeeAquaraVibra extends BaseDevices_1.ZigbeeDevice {
|
|
|
23
24
|
// TODO Set Sensitivity
|
|
24
25
|
this._vibrationBlockedByGriff = false;
|
|
25
26
|
this._vibrationBlockedByMotion = false;
|
|
27
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.vibrationSensor);
|
|
26
28
|
this._alarmMessage = services_1.Res.vibrationAlarm(this.info.customName);
|
|
27
29
|
services_1.PollyService.preloadTTS(this._alarmMessage);
|
|
28
30
|
this._idSensitivity = `${this.info.fullID}.sensitivity`;
|
|
@@ -4,6 +4,7 @@ exports.ZigbeeBlitzShp = void 0;
|
|
|
4
4
|
const deviceType_1 = require("../deviceType");
|
|
5
5
|
const models_1 = require("../../../models");
|
|
6
6
|
const BaseDevices_1 = require("./BaseDevices");
|
|
7
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
7
8
|
class ZigbeeBlitzShp extends BaseDevices_1.ZigbeeDevice {
|
|
8
9
|
constructor(pInfo) {
|
|
9
10
|
super(pInfo, deviceType_1.DeviceType.ZigbeeBlitzShp);
|
|
@@ -16,6 +17,7 @@ class ZigbeeBlitzShp extends BaseDevices_1.ZigbeeDevice {
|
|
|
16
17
|
this._availableForExcessEnergy = true;
|
|
17
18
|
this.steckerOnSwitchID = '';
|
|
18
19
|
this._activatedByExcessEnergy = false;
|
|
20
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.excessEnergyConsumer);
|
|
19
21
|
this.steckerOnSwitchID = `${this.info.fullID}.state`;
|
|
20
22
|
}
|
|
21
23
|
get currentConsumption() {
|
|
@@ -3,8 +3,5 @@ import { ZigbeeActuator } from './BaseDevices';
|
|
|
3
3
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
4
4
|
export declare class ZigbeeIkeaSteckdose extends ZigbeeActuator {
|
|
5
5
|
constructor(pInfo: IoBrokerDeviceInfo);
|
|
6
|
-
get steckerOn(): boolean;
|
|
7
6
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
8
|
-
setStecker(pValue: boolean, timeout?: number, force?: boolean): void;
|
|
9
|
-
toggleStecker(force?: boolean): boolean;
|
|
10
7
|
}
|
|
@@ -8,18 +8,9 @@ class ZigbeeIkeaSteckdose extends BaseDevices_1.ZigbeeActuator {
|
|
|
8
8
|
constructor(pInfo) {
|
|
9
9
|
super(pInfo, deviceType_1.DeviceType.ZigbeeIkeaSteckdose, `${pInfo.fullID}.state`);
|
|
10
10
|
}
|
|
11
|
-
get steckerOn() {
|
|
12
|
-
return super.actuatorOn;
|
|
13
|
-
}
|
|
14
11
|
update(idSplit, state, initial = false) {
|
|
15
12
|
this.log(models_1.LogLevel.DeepTrace, `Stecker Update: ID: ${idSplit.join('.')} JSON: ${JSON.stringify(state)}`);
|
|
16
13
|
super.update(idSplit, state, initial, true);
|
|
17
14
|
}
|
|
18
|
-
setStecker(pValue, timeout = -1, force = false) {
|
|
19
|
-
super.setActuator(pValue, timeout, force);
|
|
20
|
-
}
|
|
21
|
-
toggleStecker(force = false) {
|
|
22
|
-
return super.toggleActuator(force);
|
|
23
|
-
}
|
|
24
15
|
}
|
|
25
16
|
exports.ZigbeeIkeaSteckdose = ZigbeeIkeaSteckdose;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { DimmerSettings, TimeOfDay } from '../../../models';
|
|
3
|
-
import { iLamp } from '../baseDeviceInterfaces';
|
|
4
3
|
import { ZigbeeDevice } from './BaseDevices';
|
|
5
4
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
6
|
-
|
|
5
|
+
import { iDimmableLamp } from '../baseDeviceInterfaces/iDimmableLamp';
|
|
6
|
+
export declare class ZigbeeIlluDimmer extends ZigbeeDevice implements iDimmableLamp {
|
|
7
7
|
lightOn: boolean;
|
|
8
8
|
queuedValue: boolean | null;
|
|
9
9
|
brightness: number;
|
|
@@ -5,6 +5,7 @@ const models_1 = require("../../../models");
|
|
|
5
5
|
const deviceType_1 = require("../deviceType");
|
|
6
6
|
const services_1 = require("../../services");
|
|
7
7
|
const BaseDevices_1 = require("./BaseDevices");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class ZigbeeIlluDimmer extends BaseDevices_1.ZigbeeDevice {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.ZigbeeIlluDimmer);
|
|
@@ -18,6 +19,8 @@ class ZigbeeIlluDimmer extends BaseDevices_1.ZigbeeDevice {
|
|
|
18
19
|
this.transitionID = 'transition_time';
|
|
19
20
|
this._turnOffTimeout = undefined;
|
|
20
21
|
this.turnOffTime = 0;
|
|
22
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.lamp);
|
|
23
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.dimmablelamp);
|
|
21
24
|
this.stateID = `${this.info.fullID}.state`;
|
|
22
25
|
this.brightnessID = `${this.info.fullID}.brightness`;
|
|
23
26
|
this.transitionID = `${this.info.fullID}.transition_time`;
|
|
@@ -5,9 +5,11 @@ const deviceType_1 = require("../deviceType");
|
|
|
5
5
|
const zigbeeIlluActuator_1 = require("./zigbeeIlluActuator");
|
|
6
6
|
const models_1 = require("../../../models");
|
|
7
7
|
const services_1 = require("../../services");
|
|
8
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
8
9
|
class ZigbeeIlluLampe extends zigbeeIlluActuator_1.ZigbeeIlluActuator {
|
|
9
10
|
constructor(pInfo) {
|
|
10
11
|
super(pInfo, deviceType_1.DeviceType.ZigbeeIlluLampe);
|
|
12
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.lamp);
|
|
11
13
|
}
|
|
12
14
|
get lightOn() {
|
|
13
15
|
return super.actuatorOn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
|
-
import { ZigbeeMotionSensor } from './
|
|
2
|
+
import { ZigbeeMotionSensor } from './BaseDevices';
|
|
3
3
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
4
4
|
export declare class ZigbeeSonoffMotion extends ZigbeeMotionSensor {
|
|
5
5
|
constructor(pInfo: IoBrokerDeviceInfo);
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ZigbeeSonoffMotion = void 0;
|
|
4
4
|
const deviceType_1 = require("../deviceType");
|
|
5
5
|
const models_1 = require("../../../models");
|
|
6
|
-
const
|
|
7
|
-
class ZigbeeSonoffMotion extends
|
|
6
|
+
const BaseDevices_1 = require("./BaseDevices");
|
|
7
|
+
class ZigbeeSonoffMotion extends BaseDevices_1.ZigbeeMotionSensor {
|
|
8
8
|
constructor(pInfo) {
|
|
9
9
|
super(pInfo, deviceType_1.DeviceType.ZigbeeSonoffMotion);
|
|
10
10
|
this._needsMovementResetFallback = false;
|
|
@@ -4,6 +4,7 @@ exports.ZigbeeSonoffTemp = void 0;
|
|
|
4
4
|
const BaseDevices_1 = require("./BaseDevices");
|
|
5
5
|
const baseDeviceInterfaces_1 = require("../baseDeviceInterfaces");
|
|
6
6
|
const deviceType_1 = require("../deviceType");
|
|
7
|
+
const DeviceCapability_1 = require("../DeviceCapability");
|
|
7
8
|
class ZigbeeSonoffTemp extends BaseDevices_1.ZigbeeDevice {
|
|
8
9
|
constructor(pInfo) {
|
|
9
10
|
super(pInfo, deviceType_1.DeviceType.ZigbeeSonoffTemp);
|
|
@@ -11,6 +12,8 @@ class ZigbeeSonoffTemp extends BaseDevices_1.ZigbeeDevice {
|
|
|
11
12
|
this._temperaturCallbacks = [];
|
|
12
13
|
this._humidity = baseDeviceInterfaces_1.UNDEFINED_TEMP_VALUE;
|
|
13
14
|
this._temperature = baseDeviceInterfaces_1.UNDEFINED_TEMP_VALUE;
|
|
15
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.temperatureSensor);
|
|
16
|
+
this.deviceCapabilities.push(DeviceCapability_1.DeviceCapability.humiditySensor);
|
|
14
17
|
}
|
|
15
18
|
get humidity() {
|
|
16
19
|
return this._humidity;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ZigbeeShutter } from './BaseDevices';
|
|
3
3
|
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
4
4
|
export declare class ZigbeeUbisysShutter extends ZigbeeShutter {
|
|
5
|
-
private _positionStateId;
|
|
5
|
+
private readonly _positionStateId;
|
|
6
6
|
constructor(pInfo: IoBrokerDeviceInfo);
|
|
7
7
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
8
8
|
protected moveToPosition(pPosition: number): void;
|
|
@@ -6,7 +6,7 @@ const models_1 = require("../../../models");
|
|
|
6
6
|
class OwnSonosDevices {
|
|
7
7
|
static addDevice(device) {
|
|
8
8
|
log_service_1.ServerLogService.writeLog(models_1.LogLevel.Info, `Device ${device.name} for room "${device.info.room}" addded`);
|
|
9
|
-
this.ownDevices[device.
|
|
9
|
+
this.ownDevices[device.discoveryName] = device;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
exports.OwnSonosDevices = OwnSonosDevices;
|
|
@@ -14,7 +14,10 @@ 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.OwnSonosDevice = void 0;
|
|
17
18
|
__exportStar(require("./mp3-server"), exports);
|
|
18
19
|
__exportStar(require("./OwnSonosDevices"), exports);
|
|
19
20
|
__exportStar(require("./polly-service"), exports);
|
|
20
21
|
__exportStar(require("./sonos-service"), exports);
|
|
22
|
+
var own_sonos_device_1 = require("./own-sonos-device");
|
|
23
|
+
Object.defineProperty(exports, "OwnSonosDevice", { enumerable: true, get: function () { return own_sonos_device_1.OwnSonosDevice; } });
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DeviceInfo, DeviceType, ISpeaker } from '../../devices';
|
|
2
|
+
import { LogLevel, RoomBase } from '../../../models';
|
|
3
|
+
import { SonosDevice } from '@svrooij/sonos/lib';
|
|
4
|
+
import { LogDebugType } from '../log-service';
|
|
5
|
+
import { DeviceCapability } from '../../devices/DeviceCapability';
|
|
6
|
+
export declare class OwnSonosDevice implements ISpeaker {
|
|
7
|
+
device: SonosDevice | undefined;
|
|
8
|
+
maxPlayOnAllVolume: number;
|
|
9
|
+
room: RoomBase | undefined;
|
|
10
|
+
readonly deviceType: DeviceType;
|
|
11
|
+
readonly discoveryName: string;
|
|
12
|
+
readonly deviceCapabilities: DeviceCapability[];
|
|
13
|
+
constructor(discoveryName: string, roomName: string, device: SonosDevice | undefined);
|
|
14
|
+
protected _info: DeviceInfo;
|
|
15
|
+
get info(): DeviceInfo;
|
|
16
|
+
set info(info: DeviceInfo);
|
|
17
|
+
get id(): string;
|
|
18
|
+
get name(): string;
|
|
19
|
+
playOnDevice(mp3Name: string, duration: number, volume?: number | undefined, onlyWhenPlaying?: boolean | undefined, resolveAfterRevert?: boolean | undefined): void;
|
|
20
|
+
playTestMessage(): void;
|
|
21
|
+
speakOnDevice(pMessage: string, volume?: number | undefined, onlyWhenPlaying?: boolean | undefined, resolveAfterRevert?: boolean | undefined): void;
|
|
22
|
+
stop(): void;
|
|
23
|
+
playUrl(url: string): void;
|
|
24
|
+
log(level: LogLevel, message: string, debugType?: LogDebugType): void;
|
|
25
|
+
toJSON(): Partial<OwnSonosDevice>;
|
|
26
|
+
}
|