hoffmation-base 1.0.43 → 1.0.44
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/DeviceCapabilities.d.ts +14 -12
- package/lib/server/devices/DeviceCapabilities.js +14 -12
- package/lib/server/devices/IoBrokerBaseDevice.d.ts +2 -2
- 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 +2 -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 +2 -2
- 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 +2 -0
- package/lib/server/devices/baseDeviceInterfaces/index.js +2 -0
- package/lib/server/devices/device-cluster.d.ts +4 -4
- package/lib/server/devices/device-list.d.ts +2 -2
- package/lib/server/devices/deviceUpdater.js +2 -1
- package/lib/server/devices/devices.d.ts +2 -2
- package/lib/server/devices/groups/lampenGroup.d.ts +3 -3
- package/lib/server/devices/groups/lampenGroup.js +3 -3
- package/lib/server/devices/hmIPDevices/hmIpGriff.d.ts +4 -3
- package/lib/server/devices/hmIPDevices/hmIpGriff.js +1 -1
- 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/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 +1 -0
- package/lib/server/services/ac/ac-device.d.ts +2 -2
- package/lib/server/services/api/api-service.d.ts +21 -4
- package/lib/server/services/api/api-service.js +46 -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/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export declare enum DeviceCapabilities {
|
|
2
2
|
ac = 0,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
actuator = 1,
|
|
4
|
+
buttonSwitch = 2,
|
|
5
|
+
energyManager = 3,
|
|
6
|
+
excessEnergyConsumer = 4,
|
|
7
|
+
heater = 5,
|
|
8
|
+
humiditySensor = 6,
|
|
9
|
+
illuminationSensor = 7,
|
|
10
|
+
lamp = 8,
|
|
11
|
+
dimmablelamp = 9,
|
|
12
|
+
motionSensor = 10,
|
|
13
|
+
shutter = 11,
|
|
14
|
+
temperatureSensor = 12,
|
|
15
|
+
vibrationSensor = 13,
|
|
16
|
+
speaker = 14
|
|
15
17
|
}
|
|
@@ -4,16 +4,18 @@ exports.DeviceCapabilities = void 0;
|
|
|
4
4
|
var DeviceCapabilities;
|
|
5
5
|
(function (DeviceCapabilities) {
|
|
6
6
|
DeviceCapabilities[DeviceCapabilities["ac"] = 0] = "ac";
|
|
7
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
8
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
9
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
10
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
11
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
12
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
13
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
14
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
15
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
16
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
17
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
18
|
-
DeviceCapabilities[DeviceCapabilities["
|
|
7
|
+
DeviceCapabilities[DeviceCapabilities["actuator"] = 1] = "actuator";
|
|
8
|
+
DeviceCapabilities[DeviceCapabilities["buttonSwitch"] = 2] = "buttonSwitch";
|
|
9
|
+
DeviceCapabilities[DeviceCapabilities["energyManager"] = 3] = "energyManager";
|
|
10
|
+
DeviceCapabilities[DeviceCapabilities["excessEnergyConsumer"] = 4] = "excessEnergyConsumer";
|
|
11
|
+
DeviceCapabilities[DeviceCapabilities["heater"] = 5] = "heater";
|
|
12
|
+
DeviceCapabilities[DeviceCapabilities["humiditySensor"] = 6] = "humiditySensor";
|
|
13
|
+
DeviceCapabilities[DeviceCapabilities["illuminationSensor"] = 7] = "illuminationSensor";
|
|
14
|
+
DeviceCapabilities[DeviceCapabilities["lamp"] = 8] = "lamp";
|
|
15
|
+
DeviceCapabilities[DeviceCapabilities["dimmablelamp"] = 9] = "dimmablelamp";
|
|
16
|
+
DeviceCapabilities[DeviceCapabilities["motionSensor"] = 10] = "motionSensor";
|
|
17
|
+
DeviceCapabilities[DeviceCapabilities["shutter"] = 11] = "shutter";
|
|
18
|
+
DeviceCapabilities[DeviceCapabilities["temperatureSensor"] = 12] = "temperatureSensor";
|
|
19
|
+
DeviceCapabilities[DeviceCapabilities["vibrationSensor"] = 13] = "vibrationSensor";
|
|
20
|
+
DeviceCapabilities[DeviceCapabilities["speaker"] = 14] = "speaker";
|
|
19
21
|
})(DeviceCapabilities = exports.DeviceCapabilities || (exports.DeviceCapabilities = {}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="iobroker" />
|
|
2
|
-
import {
|
|
2
|
+
import { iBaseDevice } from './baseDeviceInterfaces';
|
|
3
3
|
import { LogDebugType } from '../services';
|
|
4
4
|
import { LogLevel, RoomBase, RoomDeviceAddingSettings } from '../../models';
|
|
5
5
|
import { IOBrokerConnection } from '../ioBroker';
|
|
6
6
|
import { DeviceType } from './deviceType';
|
|
7
7
|
import { IoBrokerDeviceInfo } from './IoBrokerDeviceInfo';
|
|
8
8
|
import { DeviceCapabilities } from './DeviceCapabilities';
|
|
9
|
-
export declare abstract class IoBrokerBaseDevice implements
|
|
9
|
+
export declare abstract class IoBrokerBaseDevice implements iBaseDevice {
|
|
10
10
|
protected _info: IoBrokerDeviceInfo;
|
|
11
11
|
deviceType: DeviceType;
|
|
12
12
|
static roomAddingSettings: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActuatorSettings } from '../../../models';
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iActuator extends iBaseDevice {
|
|
4
|
+
settings: ActuatorSettings;
|
|
5
|
+
actuatorOn: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Controls the power state of this actuator
|
|
8
|
+
* @param {boolean} pValue the new desired State
|
|
9
|
+
* @param {number} timeout if positive the time in ms, after which state should reset
|
|
10
|
+
* @param {boolean} force if true, this command isn't overwritten by automatic actions
|
|
11
|
+
* Accessible in API
|
|
12
|
+
*/
|
|
13
|
+
setActuator(pValue: boolean, timeout?: number, force?: boolean): void;
|
|
14
|
+
toggleActuator(force: boolean): boolean;
|
|
15
|
+
}
|
|
@@ -2,12 +2,12 @@ import { LogLevel, RoomBase } from '../../../models';
|
|
|
2
2
|
import { DeviceType } from '../deviceType';
|
|
3
3
|
import { DeviceInfo } from '../DeviceInfo';
|
|
4
4
|
import { DeviceCapabilities } from '../DeviceCapabilities';
|
|
5
|
-
export interface
|
|
5
|
+
export interface iBaseDevice {
|
|
6
6
|
room: RoomBase | undefined;
|
|
7
7
|
deviceType: DeviceType;
|
|
8
8
|
info: DeviceInfo;
|
|
9
9
|
readonly deviceCapabilities: DeviceCapabilities[];
|
|
10
10
|
readonly id: string;
|
|
11
11
|
log(level: LogLevel, message: string): void;
|
|
12
|
-
toJSON(): Partial<
|
|
12
|
+
toJSON(): Partial<iBaseDevice>;
|
|
13
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Button } from '../button';
|
|
2
|
-
import {
|
|
3
|
-
export interface iButtonSwitch extends
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iButtonSwitch extends iBaseDevice {
|
|
4
4
|
buttonTopLeft: Button | undefined;
|
|
5
5
|
buttonTopRight: Button | undefined;
|
|
6
6
|
buttonMidLeft: Button | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { iLamp } from './iLamp';
|
|
2
|
+
import { DimmerSettings, TimeOfDay } from '../../../models';
|
|
3
|
+
export interface iDimmableLamp extends iLamp {
|
|
4
|
+
settings: DimmerSettings;
|
|
5
|
+
toggleLight(time: TimeOfDay, force: boolean, calculateTime: boolean): void;
|
|
6
|
+
/**
|
|
7
|
+
* This function sets the light to a specific value
|
|
8
|
+
* @param pValue The desired value
|
|
9
|
+
* @param timeout A chosen Timeout after which the light should be reset
|
|
10
|
+
* @param force Wether it is a action based on a user action, to override certain rules
|
|
11
|
+
* @param brightness The desired brightness
|
|
12
|
+
* @param transitionTime The transition time during turnOn/turnOff
|
|
13
|
+
* Accessible in API
|
|
14
|
+
*/
|
|
15
|
+
setLight(pValue: boolean, timeout?: number, force?: boolean, brightness?: number, transitionTime?: number): void;
|
|
16
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { iExcessEnergyConsumer } from './iExcessEnergyConsumer';
|
|
2
|
-
import {
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
3
|
export declare class PhaseState {
|
|
4
4
|
private readonly _meterValue;
|
|
5
5
|
private readonly _production;
|
|
@@ -13,7 +13,7 @@ export declare class PhaseState {
|
|
|
13
13
|
get injectingWattage(): number;
|
|
14
14
|
get totalConsumptionWattage(): number;
|
|
15
15
|
}
|
|
16
|
-
export interface iEnergyManager extends
|
|
16
|
+
export interface iEnergyManager extends iBaseDevice {
|
|
17
17
|
baseConsumption: number;
|
|
18
18
|
currentProduction: number;
|
|
19
19
|
excessEnergy: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FensterPosition } from '../models';
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iHandleSensor extends iBaseDevice {
|
|
4
|
+
position: FensterPosition;
|
|
5
|
+
minutesOpen: number;
|
|
6
|
+
addOffenCallback(pCallback: (pValue: boolean) => void): void;
|
|
7
|
+
addKippCallback(pCallback: (pValue: boolean) => void): void;
|
|
8
|
+
addClosedCallback(pCallback: (pValue: boolean) => void): void;
|
|
9
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HeaterSettings, TemperatureSettings } from '../../../models';
|
|
2
|
-
import {
|
|
3
|
-
export interface iHeater extends
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iHeater extends iBaseDevice {
|
|
4
4
|
settings: HeaterSettings;
|
|
5
5
|
readonly desiredTemperature: number;
|
|
6
6
|
readonly humidity: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
2
2
|
export declare const UNDEFINED_HUMIDITY_VALUE = -1;
|
|
3
|
-
export interface iHumiditySensor extends
|
|
3
|
+
export interface iHumiditySensor extends iBaseDevice {
|
|
4
4
|
humidity: number;
|
|
5
5
|
addHumidityCallback(pCallback: (pValue: number) => void): void;
|
|
6
6
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ActuatorSettings,
|
|
2
|
-
import {
|
|
3
|
-
export interface iLamp extends
|
|
1
|
+
import { ActuatorSettings, TimeOfDay } from '../../../models';
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iLamp extends iBaseDevice {
|
|
4
4
|
settings: ActuatorSettings;
|
|
5
5
|
lightOn: boolean;
|
|
6
|
-
room: RoomBase | undefined;
|
|
7
6
|
setTimeBased(time: TimeOfDay, timeout: number, force: boolean): void;
|
|
8
7
|
toggleLight(time: TimeOfDay, force: boolean, calculateTime: boolean): void;
|
|
9
8
|
/**
|
|
@@ -11,6 +10,7 @@ export interface iLamp extends IBaseDevice {
|
|
|
11
10
|
* @param pValue The desired value
|
|
12
11
|
* @param timeout A chosen Timeout after which the light should be reset
|
|
13
12
|
* @param force Wether it is a action based on a user action, to override certain rules
|
|
13
|
+
* Accessible in API
|
|
14
14
|
*/
|
|
15
15
|
setLight(pValue: boolean, timeout: number, force: boolean): void;
|
|
16
16
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MotionSensorSettings } from '../../../models';
|
|
2
|
-
import {
|
|
3
|
-
export interface iMotionSensor extends
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iMotionSensor extends iBaseDevice {
|
|
4
4
|
settings: MotionSensorSettings;
|
|
5
5
|
movementDetected: boolean;
|
|
6
6
|
readonly timeSinceLastMotion: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fenster } from '../groups';
|
|
2
|
-
import {
|
|
3
|
-
export interface iShutter extends
|
|
2
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
3
|
+
export interface iShutter extends iBaseDevice {
|
|
4
4
|
currentLevel: number;
|
|
5
5
|
desiredFensterLevel: number;
|
|
6
6
|
fenster: Fenster | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ISpeaker extends
|
|
1
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
2
|
+
export interface ISpeaker extends iBaseDevice {
|
|
3
3
|
playOnDevice(mp3Name: string, duration: number, volume?: number, onlyWhenPlaying?: boolean, resolveAfterRevert?: boolean): void;
|
|
4
4
|
playTestMessage(): void;
|
|
5
5
|
playUrl(url: string): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
2
2
|
export declare const UNDEFINED_TEMP_VALUE = -99;
|
|
3
|
-
export interface iTemperatureSensor extends
|
|
3
|
+
export interface iTemperatureSensor extends iBaseDevice {
|
|
4
4
|
iTemperature: number;
|
|
5
5
|
sTemperature: string;
|
|
6
6
|
addTempChangeCallback(pCallback: (pValue: number) => void): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface iVibrationSensor extends
|
|
1
|
+
import { iBaseDevice } from './iBaseDevice';
|
|
2
|
+
export interface iVibrationSensor extends iBaseDevice {
|
|
3
3
|
vibrationBlockedByGriff: boolean;
|
|
4
4
|
vibrationBlockedByGriffTimeStamp: number;
|
|
5
5
|
vibrationBlockedByMotion: boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './iAcDevice';
|
|
2
|
+
export * from './iActuator';
|
|
2
3
|
export * from './iBaseDevice';
|
|
3
4
|
export * from './iButtonSwitch';
|
|
4
5
|
export * from './iEnergyManager';
|
|
5
6
|
export * from './iExcessEnergyConsumer';
|
|
7
|
+
export * from './iHandleSensor';
|
|
6
8
|
export * from './iHeater';
|
|
7
9
|
export * from './iHumiditySensor';
|
|
8
10
|
export * from './iIlluminationSensor';
|
|
@@ -15,10 +15,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./iAcDevice"), exports);
|
|
18
|
+
__exportStar(require("./iActuator"), exports);
|
|
18
19
|
__exportStar(require("./iBaseDevice"), exports);
|
|
19
20
|
__exportStar(require("./iButtonSwitch"), exports);
|
|
20
21
|
__exportStar(require("./iEnergyManager"), exports);
|
|
21
22
|
__exportStar(require("./iExcessEnergyConsumer"), exports);
|
|
23
|
+
__exportStar(require("./iHandleSensor"), exports);
|
|
22
24
|
__exportStar(require("./iHeater"), exports);
|
|
23
25
|
__exportStar(require("./iHumiditySensor"), exports);
|
|
24
26
|
__exportStar(require("./iIlluminationSensor"), exports);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { DeviceClusterType } from './device-cluster-type';
|
|
2
2
|
import { DeviceList } from './device-list';
|
|
3
3
|
import { IoBrokerBaseDevice } from './IoBrokerBaseDevice';
|
|
4
|
-
import {
|
|
4
|
+
import { iBaseDevice } from './baseDeviceInterfaces';
|
|
5
5
|
export declare class DeviceCluster {
|
|
6
6
|
deviceMap: Map<DeviceClusterType, DeviceList>;
|
|
7
7
|
constructor(deviceMap?: Map<DeviceClusterType, DeviceList>);
|
|
8
8
|
getIoBrokerDevicesByType(type: DeviceClusterType): IoBrokerBaseDevice[];
|
|
9
|
-
getDevicesByType(type: DeviceClusterType): Array<
|
|
10
|
-
addByDeviceType(device:
|
|
11
|
-
addToList(type: DeviceClusterType, device:
|
|
9
|
+
getDevicesByType(type: DeviceClusterType): Array<iBaseDevice>;
|
|
10
|
+
addByDeviceType(device: iBaseDevice): void;
|
|
11
|
+
addToList(type: DeviceClusterType, device: iBaseDevice): void;
|
|
12
12
|
toJSON(): Partial<DeviceCluster & {
|
|
13
13
|
deviceDict?: {
|
|
14
14
|
[p: string]: DeviceList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iBaseDevice } from './baseDeviceInterfaces';
|
|
2
2
|
export declare class DeviceList {
|
|
3
3
|
private _ids;
|
|
4
4
|
constructor(_ids?: string[]);
|
|
5
5
|
get ids(): string[];
|
|
6
|
-
getDevices(): Array<
|
|
6
|
+
getDevices(): Array<iBaseDevice>;
|
|
7
7
|
}
|
|
@@ -17,6 +17,7 @@ class DeviceUpdater {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
updateState(id, state, initial = false) {
|
|
20
|
+
var _a;
|
|
20
21
|
if (state === null) {
|
|
21
22
|
// Ignore null states
|
|
22
23
|
return;
|
|
@@ -32,7 +33,7 @@ class DeviceUpdater {
|
|
|
32
33
|
device.update(idSplit, state, initial, false);
|
|
33
34
|
}
|
|
34
35
|
catch (e) {
|
|
35
|
-
services_1.ServerLogService.writeLog(models_1.LogLevel.Alert, `deviceUpdater.updateState('${id}', '${state}'): Error occured updating Device: ${e} \n ${e.stack}`);
|
|
36
|
+
services_1.ServerLogService.writeLog(models_1.LogLevel.Alert, `deviceUpdater.updateState('${id}', '${state}'): Error occured updating Device: ${e} \n ${(_a = e === null || e === void 0 ? void 0 : e.stack) !== null && _a !== void 0 ? _a : ''}`);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { deviceConfig, iRoomImportEnforcer } from '../../models';
|
|
2
|
-
import {
|
|
2
|
+
import { iBaseDevice, iEnergyManager } from './baseDeviceInterfaces';
|
|
3
3
|
export declare class Devices {
|
|
4
4
|
static IDENTIFIER_HOMEMATIC: string;
|
|
5
5
|
static IDENTIFIER_JS: string;
|
|
6
6
|
static IDENTIFIER_ZIGBEE: string;
|
|
7
7
|
static IDENTIFIER_WLED: string;
|
|
8
8
|
static alLDevices: {
|
|
9
|
-
[id: string]:
|
|
9
|
+
[id: string]: iBaseDevice;
|
|
10
10
|
};
|
|
11
11
|
static energymanager?: iEnergyManager;
|
|
12
12
|
constructor(pDeviceData: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ZigbeeIlluLedRGBCCT } from '../zigbee';
|
|
2
2
|
import { BaseGroup } from './base-group';
|
|
3
|
-
import { iLamp } from '../baseDeviceInterfaces';
|
|
3
|
+
import { iActuator, iLamp } from '../baseDeviceInterfaces';
|
|
4
4
|
import { TimeOfDay } from '../../../models';
|
|
5
5
|
import { WledDevice } from '../wledDevice';
|
|
6
6
|
export declare class LampenGroup extends BaseGroup {
|
|
@@ -9,7 +9,7 @@ export declare class LampenGroup extends BaseGroup {
|
|
|
9
9
|
getLampen(): iLamp[];
|
|
10
10
|
getLED(): ZigbeeIlluLedRGBCCT[];
|
|
11
11
|
getWled(): WledDevice[];
|
|
12
|
-
getStecker():
|
|
12
|
+
getStecker(): iActuator[];
|
|
13
13
|
handleSunriseOff(): void;
|
|
14
14
|
switchAll(target: boolean, force?: boolean): void;
|
|
15
15
|
switchTimeConditional(time: TimeOfDay): void;
|
|
@@ -28,7 +28,7 @@ class LampenGroup extends base_group_1.BaseGroup {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
for (i = 0; i < this.getStecker().length; i++) {
|
|
31
|
-
if (this.getStecker()[i].
|
|
31
|
+
if (this.getStecker()[i].actuatorOn) {
|
|
32
32
|
return true;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -49,7 +49,7 @@ class LampenGroup extends base_group_1.BaseGroup {
|
|
|
49
49
|
return this.deviceCluster.getIoBrokerDevicesByType(device_cluster_type_1.DeviceClusterType.WLED);
|
|
50
50
|
}
|
|
51
51
|
getStecker() {
|
|
52
|
-
return this.deviceCluster.
|
|
52
|
+
return this.deviceCluster.getDevicesByType(device_cluster_type_1.DeviceClusterType.Outlets);
|
|
53
53
|
}
|
|
54
54
|
handleSunriseOff() {
|
|
55
55
|
if (!this.anyLightsOn()) {
|
|
@@ -120,7 +120,7 @@ class LampenGroup extends base_group_1.BaseGroup {
|
|
|
120
120
|
(time === models_1.TimeOfDay.BeforeSunrise && s.settings.dawnOn) ||
|
|
121
121
|
(time === models_1.TimeOfDay.AfterSunset && s.settings.duskOn)) {
|
|
122
122
|
const timeout = pValue && force ? 30 * 60 * 1000 : -1;
|
|
123
|
-
s.
|
|
123
|
+
s.setActuator(pValue, timeout, force);
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
126
|
}
|
|
@@ -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);
|
|
@@ -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 DeviceCapabilities_1 = require("../../DeviceCapabilities");
|
|
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(DeviceCapabilities_1.DeviceCapabilities.actuator);
|
|
15
17
|
this.actuatorOnSwitchID = actuatorOnSwitchID;
|
|
16
18
|
}
|
|
17
19
|
update(idSplit, state, initial = false, handledByChildObject = false) {
|
|
@@ -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;
|
|
@@ -20,6 +20,7 @@ class ZigbeeIlluDimmer extends BaseDevices_1.ZigbeeDevice {
|
|
|
20
20
|
this._turnOffTimeout = undefined;
|
|
21
21
|
this.turnOffTime = 0;
|
|
22
22
|
this.deviceCapabilities.push(DeviceCapabilities_1.DeviceCapabilities.lamp);
|
|
23
|
+
this.deviceCapabilities.push(DeviceCapabilities_1.DeviceCapabilities.dimmablelamp);
|
|
23
24
|
this.stateID = `${this.info.fullID}.state`;
|
|
24
25
|
this.brightnessID = `${this.info.fullID}.brightness`;
|
|
25
26
|
this.transitionID = `${this.info.fullID}.transition_time`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DeviceInfo, DeviceType, iAcDevice,
|
|
1
|
+
import { DeviceInfo, DeviceType, iAcDevice, iBaseDevice, iExcessEnergyConsumer } from '../../devices';
|
|
2
2
|
import { ExcessEnergyConsumerSettings, LogLevel, RoomBase } from '../../../models';
|
|
3
3
|
import { LogDebugType } from '../log-service';
|
|
4
4
|
import { AcMode } from './ac-mode';
|
|
5
5
|
import { AcSettings } from '../../../models/deviceSettings/acSettings';
|
|
6
6
|
import { AcDeviceType } from './acDeviceType';
|
|
7
7
|
import { DeviceCapabilities } from '../../devices/DeviceCapabilities';
|
|
8
|
-
export declare abstract class AcDevice implements iExcessEnergyConsumer,
|
|
8
|
+
export declare abstract class AcDevice implements iExcessEnergyConsumer, iBaseDevice, iAcDevice {
|
|
9
9
|
ip: string;
|
|
10
10
|
acDeviceType: AcDeviceType;
|
|
11
11
|
currentConsumption: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { iBaseDevice } from '../../devices';
|
|
2
2
|
import { RoomBase } from '../../../models';
|
|
3
3
|
import { LogObject } from '../log-service';
|
|
4
4
|
import { AcDevice } from '../ac';
|
|
@@ -10,9 +10,9 @@ export declare class API {
|
|
|
10
10
|
*/
|
|
11
11
|
static getAc(id: string): AcDevice | undefined;
|
|
12
12
|
static getDevices(): {
|
|
13
|
-
[id: string]:
|
|
13
|
+
[id: string]: iBaseDevice;
|
|
14
14
|
};
|
|
15
|
-
static getDevice(id: string):
|
|
15
|
+
static getDevice(id: string): iBaseDevice;
|
|
16
16
|
static getRooms(): Map<string, RoomBase>;
|
|
17
17
|
static getRoom(id: string): RoomBase | undefined;
|
|
18
18
|
static getLog(): LogObject[];
|
|
@@ -33,5 +33,22 @@ export declare class API {
|
|
|
33
33
|
* @param {boolean} state The desired new state
|
|
34
34
|
* @returns {Error | null} In case it failed the Error containing the reason
|
|
35
35
|
*/
|
|
36
|
-
static
|
|
36
|
+
static setLamp(deviceId: string, state: boolean): Error | null;
|
|
37
|
+
/**
|
|
38
|
+
* Changes the status of a given actuator
|
|
39
|
+
* @param {string} deviceId The device Id of the actuator
|
|
40
|
+
* @param {boolean} state The desired new state
|
|
41
|
+
* @returns {Error | null} In case it failed the Error containing the reason
|
|
42
|
+
*/
|
|
43
|
+
static setActuator(deviceId: string, state: boolean): Error | null;
|
|
44
|
+
/**
|
|
45
|
+
* Changes the status of a given actuator
|
|
46
|
+
* @param {string} deviceId The device Id of the actuator
|
|
47
|
+
* @param {boolean} state The desired new state
|
|
48
|
+
* @param timeout A chosen Timeout after which the light should be reset
|
|
49
|
+
* @param brightness The desired brightness
|
|
50
|
+
* @param transitionTime The transition time during turnOn/turnOff
|
|
51
|
+
* @returns {Error | null} In case it failed the Error containing the reason
|
|
52
|
+
*/
|
|
53
|
+
static setDimmer(deviceId: string, state: boolean, timeout?: number, brightness?: number, transitionTime?: number): Error | null;
|
|
37
54
|
}
|