hoffmation-base 1.0.35 → 1.0.38
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/server/devices/DeviceInfo.d.ts +1 -17
- package/lib/server/devices/DeviceInfo.js +4 -59
- package/lib/server/devices/IoBrokerBaseDevice.d.ts +7 -7
- package/lib/server/devices/IoBrokerBaseDevice.js +2 -2
- package/lib/server/devices/IoBrokerDeviceInfo.d.ts +20 -0
- package/lib/server/devices/IoBrokerDeviceInfo.js +70 -0
- package/lib/server/devices/baseDeviceInterfaces/iBaseDevice.d.ts +0 -1
- package/lib/server/devices/device-list.d.ts +1 -2
- package/lib/server/devices/device-list.js +1 -8
- package/lib/server/devices/devices.js +9 -9
- package/lib/server/devices/groups/heatGroup.js +1 -1
- package/lib/server/devices/groups/sonosGroup.js +1 -1
- package/lib/server/devices/hmIPDevices/hmIpAccessPoint.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpBewegung.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpDevice.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpGriff.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpHeizung.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpLampe.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpPraezenz.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpRoll.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpTaster.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpTherm.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpTuer.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpWippe.d.ts +2 -2
- package/lib/server/devices/jsObject/jsObjectEnergyManager.d.ts +2 -2
- package/lib/server/devices/wledDevice.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDevice.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDevice.js +1 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeHeater.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeMagnetContact.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeSwitch.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeAqaraMagnetContact.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeAqaraOpple3Switch.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeAquaraMotion.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeAquaraVibra.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeAquaraWater.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeBlitzShp.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeEuroHeater.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeHeimanSmoke.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIkeaSteckdose.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIlluActuator.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIlluDimmer.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIlluLampe.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIlluLedRGBCCT.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeIlluShutter.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeMotionSensor.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeSMaBiTMagnetContact.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeSonoffMotion.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeSonoffTemp.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeTuyaValve.d.ts +2 -2
- package/lib/server/devices/zigbee/zigbeeUbisysShutter.d.ts +2 -2
- package/lib/server/services/ac/ac-device.d.ts +10 -5
- package/lib/server/services/ac/ac-device.js +22 -2
- package/lib/server/services/ac/own-ac-devices.js +3 -1
- package/lib/server/services/ac/own-daikin-device.d.ts +2 -0
- package/lib/server/services/ac/own-daikin-device.js +2 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
import { deviceConfig } from '../../models';
|
|
2
1
|
export declare class DeviceInfo {
|
|
3
|
-
devID: string;
|
|
4
|
-
room: string;
|
|
5
|
-
deviceType: string;
|
|
6
|
-
deviceRoomIndex: number;
|
|
7
|
-
type: 'device' | 'channel' | 'state';
|
|
8
2
|
fullName: string;
|
|
9
|
-
|
|
10
|
-
channel?: number;
|
|
11
|
-
valueName?: string;
|
|
12
|
-
devConf: deviceConfig;
|
|
3
|
+
room: string;
|
|
13
4
|
allDevicesKey?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Extracts the relevant infos from the passed deviceConfig and combines them in a new Info object
|
|
16
|
-
* @param {deviceConfig} pDevConf The device Config based on the extracted devices.json from ioBroker
|
|
17
|
-
* @param {boolean} isJsStateChildObject Within JS Objects, creating devices is limited,
|
|
18
|
-
* so we name the first child state for the object creation (e.g. javascript.0.00-EnergyManager.CurrentProduction)
|
|
19
|
-
*/
|
|
20
|
-
constructor(pDevConf: deviceConfig, isJsStateChildObject?: boolean);
|
|
21
5
|
private _customName?;
|
|
22
6
|
get customName(): string;
|
|
23
7
|
set customName(val: string);
|
|
@@ -1,65 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.DeviceInfo = void 0;
|
|
7
|
-
const lodash_1 = __importDefault(require("lodash"));
|
|
8
4
|
class DeviceInfo {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* @param {boolean} isJsStateChildObject Within JS Objects, creating devices is limited,
|
|
13
|
-
* so we name the first child state for the object creation (e.g. javascript.0.00-EnergyManager.CurrentProduction)
|
|
14
|
-
*/
|
|
15
|
-
constructor(pDevConf, isJsStateChildObject = false) {
|
|
16
|
-
this.devConf = pDevConf;
|
|
17
|
-
this.type = pDevConf.type;
|
|
18
|
-
const idSplit = pDevConf._id.split('.');
|
|
19
|
-
this.fullID = pDevConf._id;
|
|
20
|
-
this.devID = idSplit[2];
|
|
21
|
-
this.fullName = pDevConf.common.name;
|
|
22
|
-
const nameSplit = pDevConf.common.name.split('-');
|
|
23
|
-
if (!isJsStateChildObject) {
|
|
24
|
-
/**
|
|
25
|
-
* 0: hm-rpc
|
|
26
|
-
* 1: rcpInstance
|
|
27
|
-
* 2: Device ID
|
|
28
|
-
* 3?: Channel
|
|
29
|
-
* 4?: ValueName
|
|
30
|
-
*/
|
|
31
|
-
if (idSplit.length > 3) {
|
|
32
|
-
this.channel = Number(idSplit[3]);
|
|
33
|
-
}
|
|
34
|
-
if (idSplit.length > 4) {
|
|
35
|
-
this.valueName = idSplit[4];
|
|
36
|
-
}
|
|
37
|
-
/** Name-Split
|
|
38
|
-
* 0: Indikator own "00"
|
|
39
|
-
* 1: "HmIP"
|
|
40
|
-
* 2: Raum
|
|
41
|
-
* 3: Was für ein Gerät
|
|
42
|
-
* 4: Index dieses Gerätes im Raum (ggf. + :Channel)
|
|
43
|
-
* 5?: Name des Wertes
|
|
44
|
-
*/
|
|
45
|
-
this.room = nameSplit[2];
|
|
46
|
-
this.deviceType = nameSplit[3];
|
|
47
|
-
this.deviceRoomIndex = Number(nameSplit[4].split(':')[0]);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
/** Name-Split
|
|
52
|
-
* 0: Indikator own "00"
|
|
53
|
-
* 1: "EnergyManager"
|
|
54
|
-
* 2: Raum
|
|
55
|
-
* 3: Was für ein Gerät
|
|
56
|
-
* 4: Index dieses Gerätes im Raum (ggf. + :Channel)
|
|
57
|
-
* 5?: Name des Wertes
|
|
58
|
-
*/
|
|
59
|
-
this.deviceType = nameSplit[1];
|
|
60
|
-
this.room = nameSplit.length >= 3 ? nameSplit[2] : '';
|
|
61
|
-
this.deviceRoomIndex = nameSplit.length >= 4 ? Number(nameSplit[3]) : 0;
|
|
62
|
-
}
|
|
5
|
+
constructor() {
|
|
6
|
+
this.fullName = '';
|
|
7
|
+
this.room = '';
|
|
63
8
|
}
|
|
64
9
|
get customName() {
|
|
65
10
|
if (this._customName !== undefined) {
|
|
@@ -71,7 +16,7 @@ class DeviceInfo {
|
|
|
71
16
|
this._customName = val;
|
|
72
17
|
}
|
|
73
18
|
toJSON() {
|
|
74
|
-
return
|
|
19
|
+
return this;
|
|
75
20
|
}
|
|
76
21
|
}
|
|
77
22
|
exports.DeviceInfo = DeviceInfo;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { IBaseDevice } from './baseDeviceInterfaces';
|
|
3
3
|
import { LogDebugType } from '../services';
|
|
4
|
-
import { DeviceInfo } from './DeviceInfo';
|
|
5
4
|
import { LogLevel, RoomBase, RoomDeviceAddingSettings } from '../../models';
|
|
6
5
|
import { IOBrokerConnection } from '../ioBroker';
|
|
7
6
|
import { DeviceType } from './deviceType';
|
|
7
|
+
import { IoBrokerDeviceInfo } from './IoBrokerDeviceInfo';
|
|
8
8
|
export declare abstract class IoBrokerBaseDevice implements IBaseDevice {
|
|
9
|
-
protected _info:
|
|
9
|
+
protected _info: IoBrokerDeviceInfo;
|
|
10
10
|
deviceType: DeviceType;
|
|
11
11
|
static roomAddingSettings: {
|
|
12
12
|
[id: string]: RoomDeviceAddingSettings;
|
|
13
13
|
};
|
|
14
14
|
room: RoomBase | undefined;
|
|
15
15
|
battery: number | undefined;
|
|
16
|
-
protected constructor(_info:
|
|
16
|
+
protected constructor(_info: IoBrokerDeviceInfo, deviceType: DeviceType);
|
|
17
17
|
get id(): string;
|
|
18
18
|
/**
|
|
19
19
|
* Getter info
|
|
20
|
-
* @return {
|
|
20
|
+
* @return {IoBrokerDeviceInfo}
|
|
21
21
|
*/
|
|
22
|
-
get info():
|
|
22
|
+
get info(): IoBrokerDeviceInfo;
|
|
23
23
|
/**
|
|
24
24
|
* Setter info
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {IoBrokerDeviceInfo} value
|
|
26
26
|
*/
|
|
27
|
-
set info(value:
|
|
27
|
+
set info(value: IoBrokerDeviceInfo);
|
|
28
28
|
/**
|
|
29
29
|
* Getter ioConn
|
|
30
30
|
* @return {IOBrokerConnection}
|
|
@@ -20,14 +20,14 @@ class IoBrokerBaseDevice {
|
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Getter info
|
|
23
|
-
* @return {
|
|
23
|
+
* @return {IoBrokerDeviceInfo}
|
|
24
24
|
*/
|
|
25
25
|
get info() {
|
|
26
26
|
return this._info;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Setter info
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {IoBrokerDeviceInfo} value
|
|
31
31
|
*/
|
|
32
32
|
set info(value) {
|
|
33
33
|
this._info = value;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { deviceConfig } from '../../models';
|
|
2
|
+
import { DeviceInfo } from './DeviceInfo';
|
|
3
|
+
export declare class IoBrokerDeviceInfo extends DeviceInfo {
|
|
4
|
+
devID: string;
|
|
5
|
+
deviceType: string;
|
|
6
|
+
deviceRoomIndex: number;
|
|
7
|
+
type: 'device' | 'channel' | 'state';
|
|
8
|
+
fullID: string;
|
|
9
|
+
channel?: number;
|
|
10
|
+
valueName?: string;
|
|
11
|
+
devConf: deviceConfig;
|
|
12
|
+
/**
|
|
13
|
+
* Extracts the relevant infos from the passed deviceConfig and combines them in a new Info object
|
|
14
|
+
* @param {deviceConfig} pDevConf The device Config based on the extracted devices.json from ioBroker
|
|
15
|
+
* @param {boolean} isJsStateChildObject Within JS Objects, creating devices is limited,
|
|
16
|
+
* so we name the first child state for the object creation (e.g. javascript.0.00-EnergyManager.CurrentProduction)
|
|
17
|
+
*/
|
|
18
|
+
constructor(pDevConf: deviceConfig, isJsStateChildObject?: boolean);
|
|
19
|
+
toJSON(): Partial<IoBrokerDeviceInfo>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IoBrokerDeviceInfo = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const DeviceInfo_1 = require("./DeviceInfo");
|
|
9
|
+
class IoBrokerDeviceInfo extends DeviceInfo_1.DeviceInfo {
|
|
10
|
+
/**
|
|
11
|
+
* Extracts the relevant infos from the passed deviceConfig and combines them in a new Info object
|
|
12
|
+
* @param {deviceConfig} pDevConf The device Config based on the extracted devices.json from ioBroker
|
|
13
|
+
* @param {boolean} isJsStateChildObject Within JS Objects, creating devices is limited,
|
|
14
|
+
* so we name the first child state for the object creation (e.g. javascript.0.00-EnergyManager.CurrentProduction)
|
|
15
|
+
*/
|
|
16
|
+
constructor(pDevConf, isJsStateChildObject = false) {
|
|
17
|
+
super();
|
|
18
|
+
this.devConf = pDevConf;
|
|
19
|
+
this.type = pDevConf.type;
|
|
20
|
+
const idSplit = pDevConf._id.split('.');
|
|
21
|
+
this.fullID = pDevConf._id;
|
|
22
|
+
this.devID = idSplit[2];
|
|
23
|
+
this.fullName = pDevConf.common.name;
|
|
24
|
+
const nameSplit = pDevConf.common.name.split('-');
|
|
25
|
+
if (!isJsStateChildObject) {
|
|
26
|
+
/**
|
|
27
|
+
* 0: hm-rpc
|
|
28
|
+
* 1: rcpInstance
|
|
29
|
+
* 2: Device ID
|
|
30
|
+
* 3?: Channel
|
|
31
|
+
* 4?: ValueName
|
|
32
|
+
*/
|
|
33
|
+
if (idSplit.length > 3) {
|
|
34
|
+
this.channel = Number(idSplit[3]);
|
|
35
|
+
}
|
|
36
|
+
if (idSplit.length > 4) {
|
|
37
|
+
this.valueName = idSplit[4];
|
|
38
|
+
}
|
|
39
|
+
/** Name-Split
|
|
40
|
+
* 0: Indikator own "00"
|
|
41
|
+
* 1: "HmIP"
|
|
42
|
+
* 2: Raum
|
|
43
|
+
* 3: Was für ein Gerät
|
|
44
|
+
* 4: Index dieses Gerätes im Raum (ggf. + :Channel)
|
|
45
|
+
* 5?: Name des Wertes
|
|
46
|
+
*/
|
|
47
|
+
this.room = nameSplit[2];
|
|
48
|
+
this.deviceType = nameSplit[3];
|
|
49
|
+
this.deviceRoomIndex = Number(nameSplit[4].split(':')[0]);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
/** Name-Split
|
|
54
|
+
* 0: Indikator own "00"
|
|
55
|
+
* 1: "EnergyManager"
|
|
56
|
+
* 2: Raum
|
|
57
|
+
* 3: Was für ein Gerät
|
|
58
|
+
* 4: Index dieses Gerätes im Raum (ggf. + :Channel)
|
|
59
|
+
* 5?: Name des Wertes
|
|
60
|
+
*/
|
|
61
|
+
this.deviceType = nameSplit[1];
|
|
62
|
+
this.room = nameSplit.length >= 3 ? nameSplit[2] : '';
|
|
63
|
+
this.deviceRoomIndex = nameSplit.length >= 4 ? Number(nameSplit[3]) : 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
toJSON() {
|
|
67
|
+
return lodash_1.default.omit(this, ['devConf']);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.IoBrokerDeviceInfo = IoBrokerDeviceInfo;
|
|
@@ -3,8 +3,7 @@ import { IBaseDevice } from './baseDeviceInterfaces';
|
|
|
3
3
|
export declare class DeviceList {
|
|
4
4
|
private _ids;
|
|
5
5
|
private readonly _isSonos;
|
|
6
|
-
|
|
7
|
-
constructor(_ids?: string[], _isSonos?: boolean, _isAc?: boolean);
|
|
6
|
+
constructor(_ids?: string[], _isSonos?: boolean);
|
|
8
7
|
get ids(): string[];
|
|
9
8
|
getDevices(): Array<IBaseDevice | OwnSonosDevice | AcDevice>;
|
|
10
9
|
}
|
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DeviceList = void 0;
|
|
4
4
|
const services_1 = require("../services");
|
|
5
5
|
class DeviceList {
|
|
6
|
-
constructor(_ids = [], _isSonos = false
|
|
6
|
+
constructor(_ids = [], _isSonos = false) {
|
|
7
7
|
this._ids = _ids;
|
|
8
8
|
this._isSonos = _isSonos;
|
|
9
|
-
this._isAc = _isAc;
|
|
10
9
|
// Empty
|
|
11
10
|
}
|
|
12
11
|
get ids() {
|
|
@@ -21,12 +20,6 @@ class DeviceList {
|
|
|
21
20
|
result.push(services_1.OwnSonosDevices.ownDevices[dID]);
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
else if (this._isAc) {
|
|
25
|
-
const acDevice = services_1.OwnAcDevices.ownDevices[dID];
|
|
26
|
-
if (acDevice !== undefined) {
|
|
27
|
-
result.push(services_1.OwnAcDevices.ownDevices[dID]);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
23
|
else {
|
|
31
24
|
const d = services_1.API.getDevice(dID);
|
|
32
25
|
if (d !== undefined) {
|
|
@@ -6,7 +6,7 @@ const hmIPDevices_1 = require("./hmIPDevices");
|
|
|
6
6
|
const zigbee_1 = require("./zigbee");
|
|
7
7
|
const deviceType_1 = require("./deviceType");
|
|
8
8
|
const services_1 = require("../services");
|
|
9
|
-
const
|
|
9
|
+
const IoBrokerDeviceInfo_1 = require("./IoBrokerDeviceInfo");
|
|
10
10
|
const jsObject_1 = require("./jsObject");
|
|
11
11
|
const wledDevice_1 = require("./wledDevice");
|
|
12
12
|
class Devices {
|
|
@@ -78,7 +78,7 @@ class Devices {
|
|
|
78
78
|
return result.join('\n');
|
|
79
79
|
}
|
|
80
80
|
static processZigbeeDevice(cDevConf) {
|
|
81
|
-
const zigbeeInfo = new
|
|
81
|
+
const zigbeeInfo = new IoBrokerDeviceInfo_1.IoBrokerDeviceInfo(cDevConf);
|
|
82
82
|
const fullName = `${Devices.IDENTIFIER_ZIGBEE}-${zigbeeInfo.devID}`;
|
|
83
83
|
zigbeeInfo.allDevicesKey = fullName;
|
|
84
84
|
if (typeof Devices.alLDevices[fullName] !== 'undefined') {
|
|
@@ -151,17 +151,17 @@ class Devices {
|
|
|
151
151
|
Devices.alLDevices[fullName] = d;
|
|
152
152
|
}
|
|
153
153
|
static processWledDevice(cDevConf) {
|
|
154
|
-
const
|
|
155
|
-
const fullName = `${Devices.IDENTIFIER_WLED}-${
|
|
156
|
-
|
|
154
|
+
const wledIoBrokerDeviceInfo = new IoBrokerDeviceInfo_1.IoBrokerDeviceInfo(cDevConf);
|
|
155
|
+
const fullName = `${Devices.IDENTIFIER_WLED}-${wledIoBrokerDeviceInfo.devID}`;
|
|
156
|
+
wledIoBrokerDeviceInfo.allDevicesKey = fullName;
|
|
157
157
|
if (typeof Devices.alLDevices[fullName] !== 'undefined') {
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
|
-
services_1.ServerLogService.writeLog(models_1.LogLevel.Trace, `${
|
|
161
|
-
Devices.alLDevices[fullName] = new wledDevice_1.WledDevice(
|
|
160
|
+
services_1.ServerLogService.writeLog(models_1.LogLevel.Trace, `${wledIoBrokerDeviceInfo.devID} with Type "${wledIoBrokerDeviceInfo.deviceType}" doesn't exists --> create it`);
|
|
161
|
+
Devices.alLDevices[fullName] = new wledDevice_1.WledDevice(wledIoBrokerDeviceInfo);
|
|
162
162
|
}
|
|
163
163
|
static processHMIPDevice(cDevConf) {
|
|
164
|
-
const hmIPInfo = new
|
|
164
|
+
const hmIPInfo = new IoBrokerDeviceInfo_1.IoBrokerDeviceInfo(cDevConf);
|
|
165
165
|
const fullName = `${Devices.IDENTIFIER_HOMEMATIC}-${hmIPInfo.devID}`;
|
|
166
166
|
hmIPInfo.allDevicesKey = fullName;
|
|
167
167
|
if (typeof Devices.alLDevices[fullName] !== 'undefined') {
|
|
@@ -214,7 +214,7 @@ class Devices {
|
|
|
214
214
|
Devices.alLDevices[fullName] = d;
|
|
215
215
|
}
|
|
216
216
|
static createEnergyManager(cDevConf) {
|
|
217
|
-
const devInfo = new
|
|
217
|
+
const devInfo = new IoBrokerDeviceInfo_1.IoBrokerDeviceInfo(cDevConf, true);
|
|
218
218
|
const fullName = `${Devices.IDENTIFIER_JS}-${devInfo.devID}`;
|
|
219
219
|
devInfo.allDevicesKey = fullName;
|
|
220
220
|
Devices.energymanager = new jsObject_1.JsObjectEnergyManager(devInfo);
|
|
@@ -14,7 +14,7 @@ class HeatGroup extends base_group_1.BaseGroup {
|
|
|
14
14
|
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.Heater, new device_list_1.DeviceList(heaterIds));
|
|
15
15
|
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.TemperaturSensor, new device_list_1.DeviceList(tempSensorIds));
|
|
16
16
|
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.HumiditySensor, new device_list_1.DeviceList(humiditySensorIds));
|
|
17
|
-
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.Ac, new device_list_1.DeviceList(acIds, false
|
|
17
|
+
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.Ac, new device_list_1.DeviceList(acIds, false));
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* The current measured temperature of the room in Celsius
|
|
@@ -10,7 +10,7 @@ class SonosGroup extends base_group_1.BaseGroup {
|
|
|
10
10
|
constructor(roomName, speakerIds) {
|
|
11
11
|
super(roomName, group_type_1.GroupType.Speaker);
|
|
12
12
|
this._playing = false;
|
|
13
|
-
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.Speaker, new device_list_1.DeviceList(speakerIds, true
|
|
13
|
+
this.deviceCluster.deviceMap.set(device_cluster_type_1.DeviceClusterType.Speaker, new device_list_1.DeviceList(speakerIds, true));
|
|
14
14
|
}
|
|
15
15
|
getOwnSonosDevices() {
|
|
16
16
|
return this.deviceCluster.getDevicesByType(device_cluster_type_1.DeviceClusterType.Speaker);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import {
|
|
3
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
4
4
|
export declare class HmIpAccessPoint extends HmIPDevice {
|
|
5
|
-
constructor(pInfo:
|
|
5
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
6
6
|
private _ip;
|
|
7
7
|
get ip(): string;
|
|
8
8
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
3
|
import { MotionSensorSettings } from '../../../models';
|
|
4
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
5
4
|
import { iIlluminationSensor, iMotionSensor } from '../baseDeviceInterfaces';
|
|
5
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
6
6
|
export declare class HmIpBewegung extends HmIPDevice implements iIlluminationSensor, iMotionSensor {
|
|
7
7
|
private static MOVEMENT_DETECTION;
|
|
8
8
|
private static CURRENT_ILLUMINATION;
|
|
@@ -12,7 +12,7 @@ export declare class HmIpBewegung extends HmIPDevice implements iIlluminationSen
|
|
|
12
12
|
private initialized;
|
|
13
13
|
private _fallBackTimeout;
|
|
14
14
|
private _lastMotionTime;
|
|
15
|
-
constructor(pInfo:
|
|
15
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
16
16
|
get timeSinceLastMotion(): number;
|
|
17
17
|
private _detectionsToday;
|
|
18
18
|
get detectionsToday(): number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
3
3
|
import { DeviceType } from '../deviceType';
|
|
4
|
-
import {
|
|
4
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
export declare class HmIPDevice extends IoBrokerBaseDevice {
|
|
6
6
|
lowBattery: boolean;
|
|
7
|
-
constructor(pInfo:
|
|
7
|
+
constructor(pInfo: IoBrokerDeviceInfo, pType: DeviceType);
|
|
8
8
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean, pOverride?: boolean): void;
|
|
9
9
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
4
3
|
import { FensterPosition } from '../models';
|
|
5
4
|
import { Fenster } from '../groups';
|
|
6
5
|
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
6
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
7
7
|
export declare class HmIpGriff extends HmIPDevice {
|
|
8
8
|
position: FensterPosition;
|
|
9
9
|
private _kippCallback;
|
|
@@ -13,7 +13,7 @@ export declare class HmIpGriff extends HmIPDevice {
|
|
|
13
13
|
private minutesOpen;
|
|
14
14
|
private _fenster;
|
|
15
15
|
private _helpingRoomTemp;
|
|
16
|
-
constructor(pInfo:
|
|
16
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
17
17
|
set Fenster(value: Fenster);
|
|
18
18
|
addOffenCallback(pCallback: (pValue: boolean) => void): void;
|
|
19
19
|
addKippCallback(pCallback: (pValue: boolean) => void): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
4
3
|
import { HeaterSettings, TemperatureSettings } from '../../../models';
|
|
5
4
|
import { iHeater, iHumiditySensor, iTemperatureSensor } from '../baseDeviceInterfaces';
|
|
5
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
6
6
|
export declare class HmIpHeizgruppe extends HmIPDevice implements iTemperatureSensor, iHumiditySensor, iHeater {
|
|
7
7
|
settings: HeaterSettings;
|
|
8
8
|
private _iAutomaticInterval;
|
|
@@ -12,7 +12,7 @@ export declare class HmIpHeizgruppe extends HmIPDevice implements iTemperatureSe
|
|
|
12
12
|
private _automaticPoints;
|
|
13
13
|
private _humidityCallbacks;
|
|
14
14
|
private _temperatureCallbacks;
|
|
15
|
-
constructor(pInfo:
|
|
15
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
16
16
|
protected _seasonTurnOff: boolean;
|
|
17
17
|
get seasonTurnOff(): boolean;
|
|
18
18
|
set seasonTurnOff(value: boolean);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
3
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
4
4
|
export declare class HmIpHeizung extends HmIPDevice {
|
|
5
5
|
private _temperatur;
|
|
6
6
|
private _level;
|
|
7
7
|
private _adaptionState;
|
|
8
|
-
constructor(pInfo:
|
|
8
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
9
9
|
private _desiredTemperatur;
|
|
10
10
|
get desiredTemperatur(): number;
|
|
11
11
|
get iLevel(): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
3
|
import { ActuatorSettings, TimeOfDay } from '../../../models';
|
|
4
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
5
4
|
import { iLamp } from '../baseDeviceInterfaces';
|
|
5
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
6
6
|
export declare class HmIpLampe extends HmIPDevice implements iLamp {
|
|
7
7
|
lightOn: boolean;
|
|
8
8
|
queuedLightValue: boolean | null;
|
|
@@ -10,7 +10,7 @@ export declare class HmIpLampe extends HmIPDevice implements iLamp {
|
|
|
10
10
|
private lightOnSwitchID;
|
|
11
11
|
private _turnOffTimeout;
|
|
12
12
|
private turnOffTime;
|
|
13
|
-
constructor(pInfo:
|
|
13
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
14
14
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
15
15
|
/** @inheritdoc */
|
|
16
16
|
setLight(pValue: boolean, timeout?: number, force?: boolean): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
4
3
|
import { iIlluminationSensor } from '../baseDeviceInterfaces';
|
|
4
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
export declare class HmIpPraezenz extends HmIPDevice implements iIlluminationSensor {
|
|
6
6
|
private static PRESENCE_DETECTION;
|
|
7
7
|
private static CURRENT_ILLUMINATION;
|
|
@@ -9,7 +9,7 @@ export declare class HmIpPraezenz extends HmIPDevice implements iIlluminationSen
|
|
|
9
9
|
presenceDetected: boolean;
|
|
10
10
|
private _presenceDetectedCallback;
|
|
11
11
|
private initialized;
|
|
12
|
-
constructor(pInfo:
|
|
12
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
13
13
|
private _detectionsToday;
|
|
14
14
|
get detectionsToday(): number;
|
|
15
15
|
set detectionsToday(pVal: number);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
4
3
|
import { Fenster } from '../groups';
|
|
5
4
|
import { iShutter } from '../baseDeviceInterfaces';
|
|
6
5
|
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
6
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
7
7
|
export declare class HmIpRoll extends HmIPDevice implements iShutter {
|
|
8
8
|
private _setLevelSwitchID;
|
|
9
9
|
private _firstCommandRecieved;
|
|
10
10
|
private _setLevel;
|
|
11
11
|
private _setLevelTime;
|
|
12
|
-
constructor(pInfo:
|
|
12
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
13
13
|
private _currentLevel;
|
|
14
14
|
get currentLevel(): number;
|
|
15
15
|
set currentLevel(value: number);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
3
|
import { iButtonSwitch } from '../baseDeviceInterfaces';
|
|
4
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
5
4
|
import { Button } from '../button';
|
|
5
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
6
6
|
export declare class HmIpTaster extends HmIPDevice implements iButtonSwitch {
|
|
7
7
|
private static readonly BUTTON_CAPABILLITIES;
|
|
8
8
|
buttonTopLeft: Button;
|
|
@@ -13,7 +13,7 @@ export declare class HmIpTaster extends HmIPDevice implements iButtonSwitch {
|
|
|
13
13
|
buttonBotRight: Button;
|
|
14
14
|
buttonBot: undefined;
|
|
15
15
|
buttonTop: undefined;
|
|
16
|
-
constructor(pInfo:
|
|
16
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
17
17
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
18
18
|
getButtonAssignment(): string;
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import {
|
|
3
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
4
4
|
export declare class HmIpTherm extends HmIPDevice {
|
|
5
|
-
constructor(pInfo:
|
|
5
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
6
6
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
7
7
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
3
|
import { MagnetPosition } from '../models';
|
|
4
|
-
import {
|
|
4
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
export declare class HmIpTuer extends HmIPDevice {
|
|
6
6
|
position: MagnetPosition;
|
|
7
7
|
private _closedCallback;
|
|
8
8
|
private _openCallback;
|
|
9
9
|
private _iOpenTimeout;
|
|
10
10
|
private minutesOpen;
|
|
11
|
-
constructor(pInfo:
|
|
11
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
12
12
|
addOpenCallback(pCallback: (pValue: boolean) => void): void;
|
|
13
13
|
addClosedCallback(pCallback: (pValue: boolean) => void): void;
|
|
14
14
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { HmIPDevice } from './hmIpDevice';
|
|
3
|
-
import { DeviceInfo } from '../DeviceInfo';
|
|
4
3
|
import { Button } from '../button';
|
|
5
4
|
import { iButtonSwitch } from '../baseDeviceInterfaces';
|
|
5
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
6
6
|
export declare class HmIpWippe extends HmIPDevice implements iButtonSwitch {
|
|
7
7
|
private static readonly BUTTON_CAPABILLITIES;
|
|
8
8
|
buttonTopLeft: undefined;
|
|
@@ -13,7 +13,7 @@ export declare class HmIpWippe extends HmIPDevice implements iButtonSwitch {
|
|
|
13
13
|
buttonBotRight: undefined;
|
|
14
14
|
buttonBot: Button;
|
|
15
15
|
buttonTop: Button;
|
|
16
|
-
constructor(pInfo:
|
|
16
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
17
17
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean): void;
|
|
18
18
|
getButtonAssignment(): string;
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { IoBrokerBaseDevice } from '../IoBrokerBaseDevice';
|
|
3
3
|
import { iEnergyManager, iExcessEnergyConsumer, PhaseState } from '../baseDeviceInterfaces';
|
|
4
|
-
import {
|
|
4
|
+
import { IoBrokerDeviceInfo } from '../IoBrokerDeviceInfo';
|
|
5
5
|
export declare class JsObjectEnergyManager extends IoBrokerBaseDevice implements iEnergyManager {
|
|
6
6
|
private _excessEnergyConsumer;
|
|
7
7
|
private _iCalculationInterval;
|
|
@@ -13,7 +13,7 @@ export declare class JsObjectEnergyManager extends IoBrokerBaseDevice implements
|
|
|
13
13
|
private _powerValuePhaseC;
|
|
14
14
|
private blockDeviceChangeTime;
|
|
15
15
|
private _lastDeviceChange;
|
|
16
|
-
constructor(info:
|
|
16
|
+
constructor(info: IoBrokerDeviceInfo);
|
|
17
17
|
private _currentProduction;
|
|
18
18
|
get currentProduction(): number;
|
|
19
19
|
get baseConsumption(): number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
2
|
import { IoBrokerBaseDevice } from './IoBrokerBaseDevice';
|
|
3
|
-
import { DeviceInfo } from './DeviceInfo';
|
|
4
3
|
import { TimeOfDay } from '../../models';
|
|
5
4
|
import { WledSettings } from '../../models/deviceSettings/wledSettings';
|
|
5
|
+
import { IoBrokerDeviceInfo } from './IoBrokerDeviceInfo';
|
|
6
6
|
export declare class WledDevice extends IoBrokerBaseDevice {
|
|
7
7
|
on: boolean;
|
|
8
8
|
brightness: number;
|
|
@@ -13,7 +13,7 @@ export declare class WledDevice extends IoBrokerBaseDevice {
|
|
|
13
13
|
private readonly _onID;
|
|
14
14
|
private readonly _presetID;
|
|
15
15
|
private readonly _brightnessID;
|
|
16
|
-
constructor(pInfo:
|
|
16
|
+
constructor(pInfo: IoBrokerDeviceInfo);
|
|
17
17
|
update(idSplit: string[], state: ioBroker.State, initial?: boolean, _pOverride?: boolean): void;
|
|
18
18
|
setLight(pValue: boolean, brightness?: number, preset?: number): void;
|
|
19
19
|
setTimeBased(time: TimeOfDay): void;
|