hoffmation-base 3.0.0-alpha.30 → 3.0.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/models/action/baseAction.d.ts +4 -0
- package/lib/models/action/baseAction.js +10 -0
- package/lib/models/action/humiditySensorChangeAction.d.ts +16 -0
- package/lib/models/action/humiditySensorChangeAction.js +15 -0
- package/lib/models/action/index.d.ts +1 -0
- package/lib/models/action/index.js +5 -0
- package/lib/models/action/motionSensorAction.d.ts +16 -0
- package/lib/models/action/motionSensorAction.js +15 -0
- package/lib/models/action/presenceGroupFirstEnterAction.d.ts +7 -0
- package/lib/models/action/presenceGroupFirstEnterAction.js +13 -0
- package/lib/models/action/presenceGroupLastLeftAction.d.ts +7 -0
- package/lib/models/action/presenceGroupLastLeftAction.js +13 -0
- package/lib/models/action/shutterPositionChangedAction.d.ts +13 -0
- package/lib/models/action/shutterPositionChangedAction.js +15 -0
- package/lib/models/action/temperatureSensorChangeAction.d.ts +16 -0
- package/lib/models/action/temperatureSensorChangeAction.js +15 -0
- package/lib/models/command/ShutterSetLevelCommand.d.ts +1 -1
- package/lib/models/command/ShutterSetLevelCommand.js +1 -1
- package/lib/models/command/WindowRestoreDesiredPositionCommand.d.ts +1 -1
- package/lib/models/command/WindowRestoreDesiredPositionCommand.js +1 -1
- package/lib/models/command/WindowSetDesiredPositionCommand.d.ts +1 -1
- package/lib/models/command/WindowSetDesiredPositionCommand.js +1 -1
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.d.ts +1 -1
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.js +1 -1
- package/lib/models/command/actuatorSetStateCommand.d.ts +1 -1
- package/lib/models/command/actuatorSetStateCommand.js +1 -1
- package/lib/models/command/actuatorToggleCommand.d.ts +1 -1
- package/lib/models/command/actuatorToggleCommand.js +1 -1
- package/lib/models/command/actuatorWriteStateToDeviceCommand.d.ts +1 -1
- package/lib/models/command/actuatorWriteStateToDeviceCommand.js +1 -1
- package/lib/models/command/baseCommand.d.ts +1 -1
- package/lib/models/command/baseCommand.js +2 -2
- package/lib/models/command/blockAutomaticCommand.d.ts +1 -1
- package/lib/models/command/blockAutomaticCommand.js +1 -1
- package/lib/models/command/blockAutomaticLiftBlockCommand.d.ts +1 -1
- package/lib/models/command/blockAutomaticLiftBlockCommand.js +1 -1
- package/lib/models/command/blockAutomaticUntilCommand.d.ts +1 -1
- package/lib/models/command/blockAutomaticUntilCommand.js +1 -1
- package/lib/models/command/commandType.d.ts +6 -0
- package/lib/models/command/commandType.js +6 -0
- package/lib/models/command/dimmerSetLightCommand.d.ts +1 -1
- package/lib/models/command/dimmerSetLightCommand.js +1 -1
- package/lib/models/command/floorSetAllShuttersCommand.d.ts +1 -1
- package/lib/models/command/floorSetAllShuttersCommand.js +1 -1
- package/lib/models/command/lampSetLightCommand.d.ts +1 -1
- package/lib/models/command/lampSetLightCommand.js +1 -1
- package/lib/models/command/lampSetTimeBasedCommand.d.ts +1 -1
- package/lib/models/command/lampSetTimeBasedCommand.js +1 -1
- package/lib/models/command/lampToggleLightCommand.d.ts +1 -1
- package/lib/models/command/lampToggleLightCommand.js +1 -1
- package/lib/models/command/ledSetLightCommand.d.ts +1 -1
- package/lib/models/command/ledSetLightCommand.js +1 -1
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.d.ts +1 -1
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.js +1 -1
- package/lib/models/command/restoreTargetAutomaticValueCommand.d.ts +1 -1
- package/lib/models/command/restoreTargetAutomaticValueCommand.js +1 -1
- package/lib/models/command/roomRestoreLightCommand.d.ts +1 -1
- package/lib/models/command/roomRestoreLightCommand.js +1 -1
- package/lib/models/command/roomRestoreShutterPositionCommand.d.ts +1 -1
- package/lib/models/command/roomRestoreShutterPositionCommand.js +1 -1
- package/lib/models/command/roomSetLightTimeBasedCommand.d.ts +1 -1
- package/lib/models/command/roomSetLightTimeBasedCommand.js +1 -1
- package/lib/models/command/shutterSunriseUpCommand.d.ts +1 -1
- package/lib/models/command/shutterSunriseUpCommand.js +1 -1
- package/lib/models/command/shutterSunsetDownCommand.d.ts +1 -1
- package/lib/models/command/shutterSunsetDownCommand.js +1 -1
- package/lib/models/command/wledSetLightCommand.d.ts +1 -1
- package/lib/models/command/wledSetLightCommand.js +1 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.js +1 -0
- package/lib/server/devices/baseDeviceInterfaces/iHumiditySensor.d.ts +2 -1
- package/lib/server/devices/baseDeviceInterfaces/iMotionSensor.d.ts +2 -1
- package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +1 -1
- package/lib/server/devices/baseDeviceInterfaces/iTemperatureSensor.d.ts +2 -1
- package/lib/server/devices/blueIris/cameraDevice.d.ts +2 -1
- package/lib/server/devices/blueIris/cameraDevice.js +2 -1
- package/lib/server/devices/dachs/dachsTemperatureSensor.d.ts +2 -1
- package/lib/server/devices/dachs/dachsTemperatureSensor.js +3 -2
- package/lib/server/devices/groups/Window.d.ts +2 -1
- package/lib/server/devices/groups/Window.js +4 -4
- package/lib/server/devices/groups/presenceGroup.d.ts +5 -2
- package/lib/server/devices/groups/presenceGroup.js +36 -39
- package/lib/server/devices/hmIPDevices/hmIpBewegung.d.ts +2 -1
- package/lib/server/devices/hmIPDevices/hmIpBewegung.js +2 -1
- package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.d.ts +4 -2
- package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.js +6 -4
- package/lib/server/devices/hmIPDevices/hmIpPraezenz.d.ts +8 -7
- package/lib/server/devices/hmIPDevices/hmIpPraezenz.js +10 -9
- package/lib/server/devices/hmIPDevices/hmIpRoll.js +2 -1
- package/lib/server/devices/sharedFunctions/lampUtils.d.ts +10 -2
- package/lib/server/devices/sharedFunctions/lampUtils.js +29 -5
- package/lib/server/devices/wledDevice.js +7 -0
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +7 -0
- package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.d.ts +3 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.js +2 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.d.ts +1 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.js +2 -1
- package/lib/server/devices/zigbee/zigbeeSonoffTemp.d.ts +4 -2
- package/lib/server/devices/zigbee/zigbeeSonoffTemp.js +6 -4
- package/lib/server/services/ac/ac-device.js +3 -3
- package/lib/server/services/govee/own-govee-device.js +7 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseAction = void 0;
|
|
4
|
+
const command_1 = require("../command");
|
|
5
|
+
class BaseAction extends command_1.BaseCommand {
|
|
6
|
+
constructor(source, reason) {
|
|
7
|
+
super(source !== null && source !== void 0 ? source : command_1.CommandSource.Automatic, reason);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.BaseAction = BaseAction;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAction } from './baseAction';
|
|
2
|
+
import { CommandType } from '../command';
|
|
3
|
+
import { iHumiditySensor } from '../../server';
|
|
4
|
+
export declare class HumiditySensorChangeAction extends BaseAction {
|
|
5
|
+
/** @inheritDoc */
|
|
6
|
+
type: CommandType;
|
|
7
|
+
/**
|
|
8
|
+
* The new humidity in percent
|
|
9
|
+
*/
|
|
10
|
+
readonly newHumidity: number;
|
|
11
|
+
/**
|
|
12
|
+
* The sensor that triggered the action
|
|
13
|
+
*/
|
|
14
|
+
readonly sensor: iHumiditySensor;
|
|
15
|
+
constructor(sensor: iHumiditySensor, newHumidity: number);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HumiditySensorChangeAction = void 0;
|
|
4
|
+
const baseAction_1 = require("./baseAction");
|
|
5
|
+
const command_1 = require("../command");
|
|
6
|
+
class HumiditySensorChangeAction extends baseAction_1.BaseAction {
|
|
7
|
+
constructor(sensor, newHumidity) {
|
|
8
|
+
super(undefined, `${sensor.customName} detected ${newHumidity} humidity`);
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
this.type = command_1.CommandType.HumiditySensorChangeAction;
|
|
11
|
+
this.newHumidity = newHumidity;
|
|
12
|
+
this.sensor = sensor;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.HumiditySensorChangeAction = HumiditySensorChangeAction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseAction } from './baseAction';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseAction = void 0;
|
|
4
|
+
var baseAction_1 = require("./baseAction");
|
|
5
|
+
Object.defineProperty(exports, "BaseAction", { enumerable: true, get: function () { return baseAction_1.BaseAction; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CommandType } from '../command';
|
|
2
|
+
import { BaseAction } from './baseAction';
|
|
3
|
+
import { iMotionSensor } from '../../server';
|
|
4
|
+
export declare class MotionSensorAction extends BaseAction {
|
|
5
|
+
/** @inheritDoc */
|
|
6
|
+
type: CommandType;
|
|
7
|
+
/**
|
|
8
|
+
* Whether motion was detected or cleared. (True = detected, False = cleared)
|
|
9
|
+
*/
|
|
10
|
+
readonly motionDetected: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The motion sensor that triggered the action
|
|
13
|
+
*/
|
|
14
|
+
readonly sensor: iMotionSensor;
|
|
15
|
+
constructor(sensor: iMotionSensor);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotionSensorAction = void 0;
|
|
4
|
+
const command_1 = require("../command");
|
|
5
|
+
const baseAction_1 = require("./baseAction");
|
|
6
|
+
class MotionSensorAction extends baseAction_1.BaseAction {
|
|
7
|
+
constructor(sensor) {
|
|
8
|
+
super(undefined, `${sensor.customName} ${sensor.movementDetected ? 'detected' : 'cleared'} motion`);
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
this.type = command_1.CommandType.MotionSensorAction;
|
|
11
|
+
this.motionDetected = sensor.movementDetected;
|
|
12
|
+
this.sensor = sensor;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.MotionSensorAction = MotionSensorAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresenceGroupFirstEnterAction = void 0;
|
|
4
|
+
const baseAction_1 = require("./baseAction");
|
|
5
|
+
const command_1 = require("../command");
|
|
6
|
+
class PresenceGroupFirstEnterAction extends baseAction_1.BaseAction {
|
|
7
|
+
constructor(source, reason) {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
this.type = command_1.CommandType.PresenceGroupFirstEnterAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.PresenceGroupFirstEnterAction = PresenceGroupFirstEnterAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PresenceGroupLastLeftAction = void 0;
|
|
4
|
+
const baseAction_1 = require("./baseAction");
|
|
5
|
+
const command_1 = require("../command");
|
|
6
|
+
class PresenceGroupLastLeftAction extends baseAction_1.BaseAction {
|
|
7
|
+
constructor(source, reason) {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
this.type = command_1.CommandType.PresenceGroupLastLeftAction;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.PresenceGroupLastLeftAction = PresenceGroupLastLeftAction;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseAction } from './baseAction';
|
|
2
|
+
import { CommandType } from '../command';
|
|
3
|
+
import { iShutter } from '../../server';
|
|
4
|
+
export declare class ShutterPositionChangedAction extends BaseAction {
|
|
5
|
+
readonly newPosition: number;
|
|
6
|
+
/** @inheritDoc */
|
|
7
|
+
type: CommandType;
|
|
8
|
+
/**
|
|
9
|
+
* The shutter that triggered the action
|
|
10
|
+
*/
|
|
11
|
+
readonly shutter: iShutter;
|
|
12
|
+
constructor(shutter: iShutter, newPosition: number);
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShutterPositionChangedAction = void 0;
|
|
4
|
+
const baseAction_1 = require("./baseAction");
|
|
5
|
+
const command_1 = require("../command");
|
|
6
|
+
class ShutterPositionChangedAction extends baseAction_1.BaseAction {
|
|
7
|
+
constructor(shutter, newPosition) {
|
|
8
|
+
super(undefined, `${shutter.customName} changed position to ${newPosition}`);
|
|
9
|
+
this.newPosition = newPosition;
|
|
10
|
+
/** @inheritDoc */
|
|
11
|
+
this.type = command_1.CommandType.ShutterPositionChangedAction;
|
|
12
|
+
this.shutter = shutter;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ShutterPositionChangedAction = ShutterPositionChangedAction;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAction } from './baseAction';
|
|
2
|
+
import { CommandType } from '../command';
|
|
3
|
+
import { iTemperatureSensor } from '../../server';
|
|
4
|
+
export declare class TemperatureSensorChangeAction extends BaseAction {
|
|
5
|
+
/** @inheritDoc */
|
|
6
|
+
type: CommandType;
|
|
7
|
+
/**
|
|
8
|
+
* The new temperature in Degree Celsius
|
|
9
|
+
*/
|
|
10
|
+
readonly newTemperature: number;
|
|
11
|
+
/**
|
|
12
|
+
* The sensor that triggered the action
|
|
13
|
+
*/
|
|
14
|
+
readonly sensor: iTemperatureSensor;
|
|
15
|
+
constructor(sensor: iTemperatureSensor, newTemperature: number);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TemperatureSensorChangeAction = void 0;
|
|
4
|
+
const baseAction_1 = require("./baseAction");
|
|
5
|
+
const command_1 = require("../command");
|
|
6
|
+
class TemperatureSensorChangeAction extends baseAction_1.BaseAction {
|
|
7
|
+
constructor(sensor, newTemperature) {
|
|
8
|
+
super(undefined, `${sensor.customName} detected ${newTemperature} °C`);
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
this.type = command_1.CommandType.TemperatureSensorChangeAction;
|
|
11
|
+
this.newTemperature = newTemperature;
|
|
12
|
+
this.sensor = sensor;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.TemperatureSensorChangeAction = TemperatureSensorChangeAction;
|
|
@@ -5,7 +5,7 @@ export declare class ShutterSetLevelCommand extends BaseCommand {
|
|
|
5
5
|
readonly level: number;
|
|
6
6
|
readonly skipOpenWarning: boolean;
|
|
7
7
|
/** @inheritDoc */
|
|
8
|
-
|
|
8
|
+
type: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Command to set the level of a shutter
|
|
11
11
|
* @param source - The source of the command
|
|
@@ -16,7 +16,7 @@ class ShutterSetLevelCommand extends baseCommand_1.BaseCommand {
|
|
|
16
16
|
this.level = level;
|
|
17
17
|
this.skipOpenWarning = skipOpenWarning;
|
|
18
18
|
/** @inheritDoc */
|
|
19
|
-
this.
|
|
19
|
+
this.type = commandType_1.CommandType.ShutterSetLevelCommand;
|
|
20
20
|
}
|
|
21
21
|
get logMessage() {
|
|
22
22
|
return `Shutter setLevel to ${this.level} for reason: ${this.reasonTrace}`;
|
|
@@ -3,7 +3,7 @@ import { CommandSource } from './commandSource';
|
|
|
3
3
|
import { CommandType } from './commandType';
|
|
4
4
|
export declare class WindowRestoreDesiredPositionCommand extends BaseCommand {
|
|
5
5
|
/** @inheritDoc */
|
|
6
|
-
|
|
6
|
+
type: CommandType;
|
|
7
7
|
/**
|
|
8
8
|
* Command to restore the desired position of the shutter of a window
|
|
9
9
|
* @param source - The source of the command
|
|
@@ -12,7 +12,7 @@ class WindowRestoreDesiredPositionCommand extends baseCommand_1.BaseCommand {
|
|
|
12
12
|
constructor(source, reason = '') {
|
|
13
13
|
super(source, reason);
|
|
14
14
|
/** @inheritDoc */
|
|
15
|
-
this.
|
|
15
|
+
this.type = commandType_1.CommandType.WindowRestoreDesiredPositionCommand;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.WindowRestoreDesiredPositionCommand = WindowRestoreDesiredPositionCommand;
|
|
@@ -4,7 +4,7 @@ import { CommandType } from './commandType';
|
|
|
4
4
|
export declare class WindowSetDesiredPositionCommand extends BaseCommand {
|
|
5
5
|
readonly position: number;
|
|
6
6
|
/** @inheritDoc */
|
|
7
|
-
|
|
7
|
+
type: CommandType;
|
|
8
8
|
/**
|
|
9
9
|
* Command to set the desired position of the shutter of a window
|
|
10
10
|
* @param source - The source of the command
|
|
@@ -14,7 +14,7 @@ class WindowSetDesiredPositionCommand extends baseCommand_1.BaseCommand {
|
|
|
14
14
|
super(source, reason);
|
|
15
15
|
this.position = position;
|
|
16
16
|
/** @inheritDoc */
|
|
17
|
-
this.
|
|
17
|
+
this.type = commandType_1.CommandType.WindowSetDesiredPositionCommand;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.WindowSetDesiredPositionCommand = WindowSetDesiredPositionCommand;
|
|
@@ -3,7 +3,7 @@ import { CommandSource } from './commandSource';
|
|
|
3
3
|
import { CommandType } from './commandType';
|
|
4
4
|
export declare class WindowSetRolloByWeatherStatusCommand extends BaseCommand {
|
|
5
5
|
/** @inheritDoc */
|
|
6
|
-
|
|
6
|
+
type: CommandType;
|
|
7
7
|
/**
|
|
8
8
|
* Command to set the desired position of the shutter of a window based on the weather status
|
|
9
9
|
* @param source - The source of the command
|
|
@@ -12,7 +12,7 @@ class WindowSetRolloByWeatherStatusCommand extends baseCommand_1.BaseCommand {
|
|
|
12
12
|
constructor(source, reason = '') {
|
|
13
13
|
super(source, reason);
|
|
14
14
|
/** @inheritDoc */
|
|
15
|
-
this.
|
|
15
|
+
this.type = commandType_1.CommandType.WindowSetRolloByWeatherStatusCommand;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.WindowSetRolloByWeatherStatusCommand = WindowSetRolloByWeatherStatusCommand;
|
|
@@ -7,7 +7,7 @@ import { BlockAutomaticCommand } from './blockAutomaticCommand';
|
|
|
7
7
|
export declare class ActuatorSetStateCommand extends BaseCommand {
|
|
8
8
|
readonly on: boolean;
|
|
9
9
|
/** @inheritDoc */
|
|
10
|
-
|
|
10
|
+
type: CommandType;
|
|
11
11
|
/**
|
|
12
12
|
* The command to disable automatic actions for a specific duration.
|
|
13
13
|
* Null = no automatic actions will be disabled.
|
|
@@ -16,7 +16,7 @@ class ActuatorSetStateCommand extends baseCommand_1.BaseCommand {
|
|
|
16
16
|
super(source, reason);
|
|
17
17
|
this.on = on;
|
|
18
18
|
/** @inheritDoc */
|
|
19
|
-
this.
|
|
19
|
+
this.type = commandType_1.CommandType.ActuatorSetStateCommand;
|
|
20
20
|
this.disableAutomaticCommand = disableAutomatic;
|
|
21
21
|
}
|
|
22
22
|
get logMessage() {
|
|
@@ -3,7 +3,7 @@ import { BaseCommand } from './baseCommand';
|
|
|
3
3
|
import { CommandSource } from './commandSource';
|
|
4
4
|
export declare class ActuatorToggleCommand extends BaseCommand {
|
|
5
5
|
/** @inheritDoc */
|
|
6
|
-
|
|
6
|
+
type: CommandType;
|
|
7
7
|
/**
|
|
8
8
|
* Command to toggle the state of an actuator
|
|
9
9
|
* @param source - The source of the command
|
|
@@ -12,7 +12,7 @@ class ActuatorToggleCommand extends baseCommand_1.BaseCommand {
|
|
|
12
12
|
constructor(source, reason = '') {
|
|
13
13
|
super(source, reason);
|
|
14
14
|
/** @inheritDoc */
|
|
15
|
-
this.
|
|
15
|
+
this.type = commandType_1.CommandType.ActuatorToggleCommand;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
exports.ActuatorToggleCommand = ActuatorToggleCommand;
|
|
@@ -4,7 +4,7 @@ import { CommandSource } from './commandSource';
|
|
|
4
4
|
export declare class ActuatorWriteStateToDeviceCommand extends BaseCommand {
|
|
5
5
|
readonly stateValue: boolean;
|
|
6
6
|
/** @inheritDoc */
|
|
7
|
-
|
|
7
|
+
type: CommandType;
|
|
8
8
|
/**
|
|
9
9
|
* Command to write the state of an actuator to the device
|
|
10
10
|
* @param source - The source of the command
|
|
@@ -15,7 +15,7 @@ class ActuatorWriteStateToDeviceCommand extends baseCommand_1.BaseCommand {
|
|
|
15
15
|
super(source, reason);
|
|
16
16
|
this.stateValue = stateValue;
|
|
17
17
|
/** @inheritDoc */
|
|
18
|
-
this.
|
|
18
|
+
this.type = commandType_1.CommandType.ActuatorWriteStateToDeviceCommand;
|
|
19
19
|
}
|
|
20
20
|
get logMessage() {
|
|
21
21
|
if (this.source instanceof actuatorSetStateCommand_1.ActuatorSetStateCommand) {
|
|
@@ -12,7 +12,7 @@ export declare abstract class BaseCommand {
|
|
|
12
12
|
*
|
|
13
13
|
* For checking if any command in the stack is of a specific type, use the {@link containsType} method.
|
|
14
14
|
*/
|
|
15
|
-
abstract
|
|
15
|
+
abstract type: CommandType;
|
|
16
16
|
/**
|
|
17
17
|
* If set, this will be used in regards to checking if this is a force/manual/automatic action.
|
|
18
18
|
* @type {CommandSource | undefined} The source of the command
|
|
@@ -52,14 +52,14 @@ class BaseCommand {
|
|
|
52
52
|
return this.source === commandSource_1.CommandSource.Initial;
|
|
53
53
|
}
|
|
54
54
|
get reasonTrace() {
|
|
55
|
-
const ownPart = this.reason !== '' ? `${this.
|
|
55
|
+
const ownPart = this.reason !== '' ? `${this.type}("${this.reason}")` : `${this.type}`;
|
|
56
56
|
if (typeof this.source === 'object') {
|
|
57
57
|
return `${this.source.reasonTrace} -> ${ownPart}`;
|
|
58
58
|
}
|
|
59
59
|
return `CommandType("${commandSource_1.CommandSource[this.source]}") stack => ${ownPart}`;
|
|
60
60
|
}
|
|
61
61
|
containsType(type) {
|
|
62
|
-
if (this.
|
|
62
|
+
if (this.type === type) {
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
65
65
|
if (this.source instanceof BaseCommand) {
|
|
@@ -5,7 +5,7 @@ import { BaseCommand } from './baseCommand';
|
|
|
5
5
|
import { DeviceSettings } from '../deviceSettings';
|
|
6
6
|
export declare class BlockAutomaticCommand extends BaseCommand {
|
|
7
7
|
/** @inheritDoc */
|
|
8
|
-
|
|
8
|
+
type: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Whether the device should revert to automatic afterward.
|
|
11
11
|
*/
|
|
@@ -18,7 +18,7 @@ class BlockAutomaticCommand extends baseCommand_1.BaseCommand {
|
|
|
18
18
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
19
19
|
super(source, reason);
|
|
20
20
|
/** @inheritDoc */
|
|
21
|
-
this.
|
|
21
|
+
this.type = commandType_1.CommandType.BlockAutomaticCommand;
|
|
22
22
|
this.durationMS =
|
|
23
23
|
(_c = durationMS !== null && durationMS !== void 0 ? durationMS : (_b = (_a = server_1.SettingsService.settings) === null || _a === void 0 ? void 0 : _a.blockAutomaticHandlerDefaults) === null || _b === void 0 ? void 0 : _b.blockAutomaticDurationMS) !== null && _c !== void 0 ? _c : 30 * 60 * 1000;
|
|
24
24
|
this.revertToAutomaticAtBlockLift =
|
|
@@ -3,7 +3,7 @@ import { CommandSource } from './commandSource';
|
|
|
3
3
|
import { BaseCommand } from './baseCommand';
|
|
4
4
|
export declare class BlockAutomaticLiftBlockCommand extends BaseCommand {
|
|
5
5
|
/** @inheritDoc */
|
|
6
|
-
|
|
6
|
+
type: CommandType;
|
|
7
7
|
/**
|
|
8
8
|
* Whether the device should revert to desired automatic value.
|
|
9
9
|
*/
|
|
@@ -15,7 +15,7 @@ class BlockAutomaticLiftBlockCommand extends baseCommand_1.BaseCommand {
|
|
|
15
15
|
var _a, _b, _c;
|
|
16
16
|
super(source, reason);
|
|
17
17
|
/** @inheritDoc */
|
|
18
|
-
this.
|
|
18
|
+
this.type = commandType_1.CommandType.BlockAutomaticLiftBlockCommand;
|
|
19
19
|
this.revertToAutomatic =
|
|
20
20
|
(_c = revertToAutomatic !== null && revertToAutomatic !== void 0 ? revertToAutomatic : (_b = (_a = server_1.SettingsService.settings) === null || _a === void 0 ? void 0 : _a.blockAutomaticHandlerDefaults) === null || _b === void 0 ? void 0 : _b.revertToAutomaticAtBlockLift) !== null && _c !== void 0 ? _c : true;
|
|
21
21
|
}
|
|
@@ -5,7 +5,7 @@ import { BaseCommand } from './baseCommand';
|
|
|
5
5
|
export declare class BlockAutomaticUntilCommand extends BaseCommand {
|
|
6
6
|
targetDate: Date;
|
|
7
7
|
/** @inheritDoc */
|
|
8
|
-
|
|
8
|
+
type: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* The action to take if a block is already active.
|
|
11
11
|
*/
|
|
@@ -19,7 +19,7 @@ class BlockAutomaticUntilCommand extends baseCommand_1.BaseCommand {
|
|
|
19
19
|
super(source, reason);
|
|
20
20
|
this.targetDate = targetDate;
|
|
21
21
|
/** @inheritDoc */
|
|
22
|
-
this.
|
|
22
|
+
this.type = commandType_1.CommandType.BlockAutomaticUntilCommand;
|
|
23
23
|
this.onCollideAction =
|
|
24
24
|
(_c = onCollideAction !== null && onCollideAction !== void 0 ? onCollideAction : (_b = (_a = server_1.SettingsService.settings) === null || _a === void 0 ? void 0 : _a.blockAutomaticHandlerDefaults) === null || _b === void 0 ? void 0 : _b.defaultCollisionSolving) !== null && _c !== void 0 ? _c : collisionSolving_1.CollisionSolving.overrideIfGreater;
|
|
25
25
|
this.revertToAutomaticAtBlockLift =
|
|
@@ -8,17 +8,23 @@ export declare enum CommandType {
|
|
|
8
8
|
ActuatorWriteStateToDeviceCommand = "ActuatorWriteStateToDeviceCommand",
|
|
9
9
|
DimmerSetLightCommand = "DimmerSetLightCommand",
|
|
10
10
|
FloorSetAllShuttersCommand = "FloorSetAllShuttersCommand",
|
|
11
|
+
HumiditySensorChangeAction = "HumiditySensorChangeAction",
|
|
11
12
|
LampSetLightCommand = "LampSetLightCommand",
|
|
12
13
|
LampSetTimeBasedCommand = "LampSetTimeBasedCommand",
|
|
13
14
|
LampToggleLightCommand = "LampToggleLightCommand",
|
|
14
15
|
LedSetLightCommand = "LedSetLightCommand",
|
|
15
16
|
LightGroupSwitchTimeConditional = "LightGroupSwitchTimeConditional",
|
|
17
|
+
MotionSensorAction = "MotionSensorAction",
|
|
18
|
+
PresenceGroupFirstEnterAction = "PresenceGroupFirstEnterAction",
|
|
19
|
+
PresenceGroupLastLeftAction = "PresenceGroupLastLeftAction",
|
|
16
20
|
RoomRestoreShutterPositionCommand = "RoomRestoreShutterPositionCommand",
|
|
17
21
|
RoomRestoreLightCommand = "RoomRestoreLightCommand",
|
|
18
22
|
RoomSetLightTimeBasedCommand = "RoomSetLightTimeBasedCommand",
|
|
23
|
+
ShutterPositionChangedAction = "ShutterPositionChangedAction",
|
|
19
24
|
ShutterSetLevelCommand = "ShutterSetLevelCommand",
|
|
20
25
|
ShutterSunriseUpCommand = "ShutterSunriseUpCommand",
|
|
21
26
|
SunsetDownCommand = "SunsetDownCommand",
|
|
27
|
+
TemperatureSensorChangeAction = "TemperatureSensorChangeAction",
|
|
22
28
|
WindowRestoreDesiredPositionCommand = "WindowRestoreDesiredPositionCommand",
|
|
23
29
|
WindowSetDesiredPositionCommand = "WindowSetDesiredPositionCommand",
|
|
24
30
|
WindowSetRolloByWeatherStatusCommand = "WindowSetRolloByWeatherStatusCommand",
|
|
@@ -12,17 +12,23 @@ var CommandType;
|
|
|
12
12
|
CommandType["ActuatorWriteStateToDeviceCommand"] = "ActuatorWriteStateToDeviceCommand";
|
|
13
13
|
CommandType["DimmerSetLightCommand"] = "DimmerSetLightCommand";
|
|
14
14
|
CommandType["FloorSetAllShuttersCommand"] = "FloorSetAllShuttersCommand";
|
|
15
|
+
CommandType["HumiditySensorChangeAction"] = "HumiditySensorChangeAction";
|
|
15
16
|
CommandType["LampSetLightCommand"] = "LampSetLightCommand";
|
|
16
17
|
CommandType["LampSetTimeBasedCommand"] = "LampSetTimeBasedCommand";
|
|
17
18
|
CommandType["LampToggleLightCommand"] = "LampToggleLightCommand";
|
|
18
19
|
CommandType["LedSetLightCommand"] = "LedSetLightCommand";
|
|
19
20
|
CommandType["LightGroupSwitchTimeConditional"] = "LightGroupSwitchTimeConditional";
|
|
21
|
+
CommandType["MotionSensorAction"] = "MotionSensorAction";
|
|
22
|
+
CommandType["PresenceGroupFirstEnterAction"] = "PresenceGroupFirstEnterAction";
|
|
23
|
+
CommandType["PresenceGroupLastLeftAction"] = "PresenceGroupLastLeftAction";
|
|
20
24
|
CommandType["RoomRestoreShutterPositionCommand"] = "RoomRestoreShutterPositionCommand";
|
|
21
25
|
CommandType["RoomRestoreLightCommand"] = "RoomRestoreLightCommand";
|
|
22
26
|
CommandType["RoomSetLightTimeBasedCommand"] = "RoomSetLightTimeBasedCommand";
|
|
27
|
+
CommandType["ShutterPositionChangedAction"] = "ShutterPositionChangedAction";
|
|
23
28
|
CommandType["ShutterSetLevelCommand"] = "ShutterSetLevelCommand";
|
|
24
29
|
CommandType["ShutterSunriseUpCommand"] = "ShutterSunriseUpCommand";
|
|
25
30
|
CommandType["SunsetDownCommand"] = "SunsetDownCommand";
|
|
31
|
+
CommandType["TemperatureSensorChangeAction"] = "TemperatureSensorChangeAction";
|
|
26
32
|
CommandType["WindowRestoreDesiredPositionCommand"] = "WindowRestoreDesiredPositionCommand";
|
|
27
33
|
CommandType["WindowSetDesiredPositionCommand"] = "WindowSetDesiredPositionCommand";
|
|
28
34
|
CommandType["WindowSetRolloByWeatherStatusCommand"] = "WindowSetRolloByWeatherStatusCommand";
|
|
@@ -9,7 +9,7 @@ export declare class DimmerSetLightCommand extends LampSetLightCommand {
|
|
|
9
9
|
brightness: number;
|
|
10
10
|
transitionTime: number;
|
|
11
11
|
/** @inheritDoc */
|
|
12
|
-
|
|
12
|
+
type: CommandType;
|
|
13
13
|
/**
|
|
14
14
|
* Command to change the light of a dimmer
|
|
15
15
|
* @param source - The source of the command
|
|
@@ -20,7 +20,7 @@ class DimmerSetLightCommand extends lampSetLightCommand_1.LampSetLightCommand {
|
|
|
20
20
|
this.brightness = brightness;
|
|
21
21
|
this.transitionTime = transitionTime;
|
|
22
22
|
/** @inheritDoc */
|
|
23
|
-
this.
|
|
23
|
+
this.type = commandType_1.CommandType.DimmerSetLightCommand;
|
|
24
24
|
}
|
|
25
25
|
/** @inheritDoc */
|
|
26
26
|
get logMessage() {
|
|
@@ -5,7 +5,7 @@ export declare class FloorSetAllShuttersCommand extends BaseCommand {
|
|
|
5
5
|
readonly position: number;
|
|
6
6
|
readonly specificFloor: number | undefined;
|
|
7
7
|
/** @inheritDoc */
|
|
8
|
-
|
|
8
|
+
type: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Creates an instance of FloorSetAllShuttersCommand.
|
|
11
11
|
* @param source - The source of the command
|
|
@@ -16,7 +16,7 @@ class FloorSetAllShuttersCommand extends baseCommand_1.BaseCommand {
|
|
|
16
16
|
this.position = position;
|
|
17
17
|
this.specificFloor = specificFloor;
|
|
18
18
|
/** @inheritDoc */
|
|
19
|
-
this.
|
|
19
|
+
this.type = commandType_1.CommandType.FloorSetAllShuttersCommand;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
exports.FloorSetAllShuttersCommand = FloorSetAllShuttersCommand;
|
|
@@ -5,7 +5,7 @@ import { ActuatorSetStateCommand } from './actuatorSetStateCommand';
|
|
|
5
5
|
import { BlockAutomaticCommand } from './blockAutomaticCommand';
|
|
6
6
|
export declare class LampSetLightCommand extends ActuatorSetStateCommand {
|
|
7
7
|
/** @inheritDoc */
|
|
8
|
-
|
|
8
|
+
type: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Command to set the light of a lamp
|
|
11
11
|
* @param source - The source of the command
|
|
@@ -15,7 +15,7 @@ class LampSetLightCommand extends actuatorSetStateCommand_1.ActuatorSetStateComm
|
|
|
15
15
|
constructor(source, on, reason = '', disableAutomatic) {
|
|
16
16
|
super(source, on, reason, disableAutomatic);
|
|
17
17
|
/** @inheritDoc */
|
|
18
|
-
this.
|
|
18
|
+
this.type = commandType_1.CommandType.LampSetLightCommand;
|
|
19
19
|
}
|
|
20
20
|
/** @inheritDoc */
|
|
21
21
|
get logMessage() {
|
|
@@ -6,7 +6,7 @@ import { BlockAutomaticCommand } from './blockAutomaticCommand';
|
|
|
6
6
|
export declare class LampSetTimeBasedCommand extends BaseCommand {
|
|
7
7
|
time: TimeOfDay;
|
|
8
8
|
/** @inheritDoc */
|
|
9
|
-
|
|
9
|
+
type: CommandType;
|
|
10
10
|
/**
|
|
11
11
|
* The command to disable automatic actions for a specific duration.
|
|
12
12
|
* Null = no automatic actions will be disabled.
|
|
@@ -16,7 +16,7 @@ class LampSetTimeBasedCommand extends baseCommand_1.BaseCommand {
|
|
|
16
16
|
super(source, reason);
|
|
17
17
|
this.time = time;
|
|
18
18
|
/** @inheritDoc */
|
|
19
|
-
this.
|
|
19
|
+
this.type = commandType_1.CommandType.LampSetTimeBasedCommand;
|
|
20
20
|
this.disableAutomaticCommand = disableAutomatic;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -7,7 +7,7 @@ export declare class LampToggleLightCommand extends ActuatorToggleCommand {
|
|
|
7
7
|
time?: TimeOfDay | undefined;
|
|
8
8
|
readonly calculateTime: boolean;
|
|
9
9
|
/** @inheritDoc */
|
|
10
|
-
|
|
10
|
+
type: CommandType;
|
|
11
11
|
/**
|
|
12
12
|
* Command to toggle the light-state of a lamp
|
|
13
13
|
* @param source - The source of the command
|
|
@@ -16,7 +16,7 @@ class LampToggleLightCommand extends actuatorToggleCommand_1.ActuatorToggleComma
|
|
|
16
16
|
this.time = time;
|
|
17
17
|
this.calculateTime = calculateTime;
|
|
18
18
|
/** @inheritDoc */
|
|
19
|
-
this.
|
|
19
|
+
this.type = commandType_1.CommandType.LampToggleLightCommand;
|
|
20
20
|
}
|
|
21
21
|
get logMessage() {
|
|
22
22
|
return `Lamp toggleLight for reason: ${this.reasonTrace}`;
|
|
@@ -9,7 +9,7 @@ export declare class LedSetLightCommand extends DimmerSetLightCommand {
|
|
|
9
9
|
color: string;
|
|
10
10
|
colorTemp: number;
|
|
11
11
|
/** @inheritDoc */
|
|
12
|
-
|
|
12
|
+
type: CommandType;
|
|
13
13
|
/**
|
|
14
14
|
* Command to set the light-state of a Led-Device
|
|
15
15
|
* @param source - The source of the command
|
|
@@ -22,7 +22,7 @@ class LedSetLightCommand extends dimmerSetLightCommand_1.DimmerSetLightCommand {
|
|
|
22
22
|
this.color = color;
|
|
23
23
|
this.colorTemp = colorTemp;
|
|
24
24
|
/** @inheritDoc */
|
|
25
|
-
this.
|
|
25
|
+
this.type = commandType_1.CommandType.LedSetLightCommand;
|
|
26
26
|
}
|
|
27
27
|
/** @inheritDoc */
|
|
28
28
|
get logMessage() {
|
|
@@ -5,7 +5,7 @@ import { TimeOfDay } from '../timeCallback';
|
|
|
5
5
|
export declare class LightGroupSwitchTimeConditionalCommand extends BaseCommand {
|
|
6
6
|
readonly time: TimeOfDay;
|
|
7
7
|
/** @inheritDoc */
|
|
8
|
-
|
|
8
|
+
type: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Command to switch a light group in accordance to a specific time of the day
|
|
11
11
|
* @param source - The source of the command
|