hoffmation-base 2.22.18 → 3.0.0-alpha.0
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/command/ShutterSetLevelCommand.d.ts +10 -0
- package/lib/models/command/ShutterSetLevelCommand.js +17 -0
- package/lib/models/command/WindowRestoreDesiredPositionCommand.d.ts +7 -0
- package/lib/models/command/WindowRestoreDesiredPositionCommand.js +12 -0
- package/lib/models/command/WindowSetDesiredPositionCommand.d.ts +8 -0
- package/lib/models/command/WindowSetDesiredPositionCommand.js +13 -0
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.d.ts +7 -0
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.js +12 -0
- package/lib/models/command/actuatorSetStateCommand.d.ts +13 -0
- package/lib/models/command/actuatorSetStateCommand.js +22 -0
- package/lib/models/command/actuatorToggleCommand.d.ts +8 -0
- package/lib/models/command/actuatorToggleCommand.js +15 -0
- package/lib/models/command/actuatorWriteStateToDeviceCommand.d.ts +9 -0
- package/lib/models/command/actuatorWriteStateToDeviceCommand.js +16 -0
- package/lib/models/command/baseCommand.d.ts +12 -0
- package/lib/models/command/baseCommand.js +34 -0
- package/lib/models/command/commandSource.d.ts +8 -0
- package/lib/models/command/commandSource.js +12 -0
- package/lib/models/command/commandType.d.ts +23 -0
- package/lib/models/command/commandType.js +27 -0
- package/lib/models/command/dimmerSetLightCommand.d.ts +22 -0
- package/lib/models/command/dimmerSetLightCommand.js +40 -0
- package/lib/models/command/floorSetAllShuttersCommand.d.ts +16 -0
- package/lib/models/command/floorSetAllShuttersCommand.js +21 -0
- package/lib/models/command/index.d.ts +24 -0
- package/lib/models/command/index.js +51 -0
- package/lib/models/command/lampSetLightCommand.d.ts +9 -0
- package/lib/models/command/lampSetLightCommand.js +15 -0
- package/lib/models/command/lampSetTimeBasedCommand.d.ts +18 -0
- package/lib/models/command/lampSetTimeBasedCommand.js +25 -0
- package/lib/models/command/lampToggleLightCommand.d.ts +19 -0
- package/lib/models/command/lampToggleLightCommand.js +24 -0
- package/lib/models/command/ledSetLightCommand.d.ts +25 -0
- package/lib/models/command/ledSetLightCommand.js +41 -0
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.d.ts +9 -0
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.js +13 -0
- package/lib/models/command/restoreTargetAutomaticValueCommand.d.ts +8 -0
- package/lib/models/command/restoreTargetAutomaticValueCommand.js +15 -0
- package/lib/models/command/roomRestoreLightCommand.d.ts +7 -0
- package/lib/models/command/roomRestoreLightCommand.js +12 -0
- package/lib/models/command/roomRestoreShutterPositionCommand.d.ts +8 -0
- package/lib/models/command/roomRestoreShutterPositionCommand.js +13 -0
- package/lib/models/command/roomSetLightTimeBasedCommand.d.ts +14 -0
- package/lib/models/command/roomSetLightTimeBasedCommand.js +19 -0
- package/lib/models/command/shutterSunriseUpCommand.d.ts +7 -0
- package/lib/models/command/shutterSunriseUpCommand.js +12 -0
- package/lib/models/command/shutterSunsetDownCommand.d.ts +7 -0
- package/lib/models/command/shutterSunsetDownCommand.js +12 -0
- package/lib/models/command/wledSetLightCommand.d.ts +12 -0
- package/lib/models/command/wledSetLightCommand.js +28 -0
- package/lib/models/index.d.ts +1 -0
- package/lib/models/index.js +1 -0
- package/lib/models/rooms/RoomBase.d.ts +2 -2
- package/lib/models/rooms/RoomBase.js +5 -5
- package/lib/models/rooms/iRoomBase.d.ts +2 -5
- package/lib/server/devices/baseDeviceInterfaces/iActuator.d.ts +5 -6
- package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.d.ts +3 -8
- package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +6 -16
- package/lib/server/devices/baseDeviceInterfaces/iLedRgbCct.d.ts +2 -16
- package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +2 -2
- package/lib/server/devices/baseDeviceInterfaces/iTemporaryDisableAutomatic.d.ts +2 -1
- package/lib/server/devices/dachs/dachs.d.ts +5 -4
- package/lib/server/devices/dachs/dachs.js +13 -21
- package/lib/server/devices/groups/Window.d.ts +3 -3
- package/lib/server/devices/groups/Window.js +9 -15
- package/lib/server/devices/groups/lightGroup.d.ts +9 -7
- package/lib/server/devices/groups/lightGroup.js +46 -40
- package/lib/server/devices/groups/presenceGroup.js +2 -2
- package/lib/server/devices/groups/tasterGroup.js +22 -6
- package/lib/server/devices/groups/windowGroup.d.ts +5 -7
- package/lib/server/devices/groups/windowGroup.js +25 -43
- package/lib/server/devices/hmIPDevices/hmIpLampe.d.ts +8 -7
- package/lib/server/devices/hmIPDevices/hmIpLampe.js +19 -31
- package/lib/server/devices/hmIPDevices/hmIpRoll.d.ts +2 -2
- package/lib/server/devices/hmIPDevices/hmIpRoll.js +17 -15
- package/lib/server/devices/sharedFunctions/lampUtils.d.ts +8 -7
- package/lib/server/devices/sharedFunctions/lampUtils.js +47 -27
- package/lib/server/devices/wledDevice.d.ts +9 -8
- package/lib/server/devices/wledDevice.js +37 -52
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.d.ts +5 -4
- package/lib/server/devices/zigbee/BaseDevices/ZigbeeActuator.js +13 -21
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.d.ts +8 -12
- package/lib/server/devices/zigbee/BaseDevices/zigbeeDimmer.js +32 -45
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.d.ts +3 -3
- package/lib/server/devices/zigbee/BaseDevices/zigbeeLedRGBCCT.js +11 -32
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.d.ts +2 -2
- package/lib/server/devices/zigbee/BaseDevices/zigbeeShutter.js +9 -7
- package/lib/server/devices/zigbee/zigbeeBlitzShp.js +2 -2
- package/lib/server/devices/zigbee/zigbeeHeimanSmoke.js +1 -1
- package/lib/server/devices/zigbee/zigbeeIlluActuator.d.ts +0 -2
- package/lib/server/devices/zigbee/zigbeeIlluActuator.js +0 -6
- package/lib/server/devices/zigbee/zigbeeIlluLampe.d.ts +4 -4
- package/lib/server/devices/zigbee/zigbeeIlluLampe.js +6 -11
- package/lib/server/devices/zigbee/zigbeeInnr142C.d.ts +0 -4
- package/lib/server/devices/zigbee/zigbeeInnr142C.js +0 -33
- package/lib/server/devices/zigbee/zigbeeUbisysActuator.d.ts +0 -2
- package/lib/server/devices/zigbee/zigbeeUbisysActuator.js +0 -6
- package/lib/server/devices/zigbee/zigbeeUbisysLampe.d.ts +4 -4
- package/lib/server/devices/zigbee/zigbeeUbisysLampe.js +6 -11
- package/lib/server/services/ShutterService.d.ts +2 -7
- package/lib/server/services/ShutterService.js +2 -26
- package/lib/server/services/Telegram/telegram-Commands.js +2 -1
- package/lib/server/services/ac/daikin-service.d.ts +1 -1
- package/lib/server/services/ac/daikin-service.js +7 -2
- package/lib/server/services/ac/own-daikin-device.d.ts +3 -2
- package/lib/server/services/ac/own-daikin-device.js +4 -3
- package/lib/server/services/api/api-service.js +6 -6
- package/lib/server/services/blockAutomaticHandler.d.ts +2 -2
- package/lib/server/services/blockAutomaticHandler.js +5 -3
- package/lib/server/services/govee/own-govee-device.d.ts +8 -7
- package/lib/server/services/govee/own-govee-device.js +36 -47
- package/lib/server/services/room-service/room-service.d.ts +6 -10
- package/lib/server/services/room-service/room-service.js +19 -25
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +21 -20
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { CommandType } from './commandType';
|
|
4
|
+
export declare class ShutterSetLevelCommand extends BaseCommand {
|
|
5
|
+
readonly level: number;
|
|
6
|
+
readonly skipOpenWarning: boolean;
|
|
7
|
+
_commandType: CommandType;
|
|
8
|
+
constructor(source: CommandSource | BaseCommand, level: number, reason?: string, skipOpenWarning?: boolean);
|
|
9
|
+
get logMessage(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ShutterSetLevelCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class ShutterSetLevelCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(source, level, reason = '', skipOpenWarning = false) {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this.level = level;
|
|
10
|
+
this.skipOpenWarning = skipOpenWarning;
|
|
11
|
+
this._commandType = commandType_1.CommandType.ShutterSetLevelCommand;
|
|
12
|
+
}
|
|
13
|
+
get logMessage() {
|
|
14
|
+
return `Shutter setLevel to ${this.level} from ${this.source} for reason: ${this.reasonTrace}`;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ShutterSetLevelCommand = ShutterSetLevelCommand;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { CommandType } from './commandType';
|
|
4
|
+
export declare class WindowRestoreDesiredPositionCommand extends BaseCommand {
|
|
5
|
+
_commandType: CommandType;
|
|
6
|
+
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WindowRestoreDesiredPositionCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class WindowRestoreDesiredPositionCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(source, reason = '') {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this._commandType = commandType_1.CommandType.WindowRestoreDesiredPositionCommand;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.WindowRestoreDesiredPositionCommand = WindowRestoreDesiredPositionCommand;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { CommandType } from './commandType';
|
|
4
|
+
export declare class WindowSetDesiredPositionCommand extends BaseCommand {
|
|
5
|
+
readonly position: number;
|
|
6
|
+
_commandType: CommandType;
|
|
7
|
+
constructor(source: CommandSource | BaseCommand, position: number, reason?: string);
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WindowSetDesiredPositionCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class WindowSetDesiredPositionCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(source, position, reason = '') {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this.position = position;
|
|
10
|
+
this._commandType = commandType_1.CommandType.WindowSetDesiredPositionCommand;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.WindowSetDesiredPositionCommand = WindowSetDesiredPositionCommand;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { CommandType } from './commandType';
|
|
4
|
+
export declare class WindowSetRolloByWeatherStatusCommand extends BaseCommand {
|
|
5
|
+
_commandType: CommandType;
|
|
6
|
+
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WindowSetRolloByWeatherStatusCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class WindowSetRolloByWeatherStatusCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(source, reason = '') {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this._commandType = commandType_1.CommandType.WindowSetRolloByWeatherStatusCommand;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.WindowSetRolloByWeatherStatusCommand = WindowSetRolloByWeatherStatusCommand;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { CommandType } from './commandType';
|
|
4
|
+
import { ActuatorToggleCommand } from './actuatorToggleCommand';
|
|
5
|
+
import { iActuator } from '../../server';
|
|
6
|
+
export declare class ActuatorSetStateCommand extends BaseCommand {
|
|
7
|
+
readonly on: boolean;
|
|
8
|
+
timeout: number;
|
|
9
|
+
_commandType: CommandType;
|
|
10
|
+
constructor(source: CommandSource | BaseCommand, on: boolean, reason?: string, timeout?: number);
|
|
11
|
+
get logMessage(): string;
|
|
12
|
+
static byActuatorAndToggleCommand(device: iActuator, c: ActuatorToggleCommand): ActuatorSetStateCommand;
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActuatorSetStateCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class ActuatorSetStateCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(source, on, reason = '', timeout = -1) {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this.on = on;
|
|
10
|
+
this.timeout = timeout;
|
|
11
|
+
this._commandType = commandType_1.CommandType.ShutterSetLevelCommand;
|
|
12
|
+
}
|
|
13
|
+
get logMessage() {
|
|
14
|
+
return `Actuator setState to ${this.on} from ${this.source} for reason: ${this.reasonTrace}`;
|
|
15
|
+
}
|
|
16
|
+
static byActuatorAndToggleCommand(device, c) {
|
|
17
|
+
const newVal = device.queuedValue !== null ? !device.queuedValue : !device.actuatorOn;
|
|
18
|
+
const timeout = newVal && c.isForceAction ? 30 * 60 * 1000 : -1;
|
|
19
|
+
return new ActuatorSetStateCommand(c, newVal, 'Due to ActuatorToggle', timeout);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ActuatorSetStateCommand = ActuatorSetStateCommand;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CommandType } from './commandType';
|
|
2
|
+
import { BaseCommand } from './baseCommand';
|
|
3
|
+
import { CommandSource } from './commandSource';
|
|
4
|
+
export declare class ActuatorToggleCommand extends BaseCommand {
|
|
5
|
+
_commandType: CommandType;
|
|
6
|
+
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
7
|
+
get logMessage(): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActuatorToggleCommand = void 0;
|
|
4
|
+
const commandType_1 = require("./commandType");
|
|
5
|
+
const baseCommand_1 = require("./baseCommand");
|
|
6
|
+
class ActuatorToggleCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(source, reason = '') {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this._commandType = commandType_1.CommandType.ActuatorToggleCommand;
|
|
10
|
+
}
|
|
11
|
+
get logMessage() {
|
|
12
|
+
return `Actuator toggle due to ${this.source} for reason: ${this.reasonTrace}`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ActuatorToggleCommand = ActuatorToggleCommand;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandType } from './commandType';
|
|
3
|
+
import { CommandSource } from './commandSource';
|
|
4
|
+
export declare class ActuatorWriteStateToDeviceCommand extends BaseCommand {
|
|
5
|
+
readonly stateValue: boolean;
|
|
6
|
+
_commandType: CommandType;
|
|
7
|
+
constructor(stateValue: boolean, source: CommandSource | BaseCommand, reason?: string);
|
|
8
|
+
get logMessage(): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActuatorWriteStateToDeviceCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class ActuatorWriteStateToDeviceCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
constructor(stateValue, source, reason = '') {
|
|
8
|
+
super(source, reason);
|
|
9
|
+
this.stateValue = stateValue;
|
|
10
|
+
this._commandType = commandType_1.CommandType.ActuatorWriteStateToDeviceCommand;
|
|
11
|
+
}
|
|
12
|
+
get logMessage() {
|
|
13
|
+
return `Actuator writeStateToDevice(${this.stateValue}) due to ${this.source} for reason: ${this.reasonTrace}`;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ActuatorWriteStateToDeviceCommand = ActuatorWriteStateToDeviceCommand;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CommandSource } from './commandSource';
|
|
2
|
+
import { CommandType } from './commandType';
|
|
3
|
+
export declare abstract class BaseCommand {
|
|
4
|
+
readonly source: CommandSource | BaseCommand;
|
|
5
|
+
readonly reason: string;
|
|
6
|
+
readonly timestamp: Date;
|
|
7
|
+
abstract _commandType: CommandType;
|
|
8
|
+
constructor(source?: CommandSource | BaseCommand, reason?: string);
|
|
9
|
+
get isForceAction(): boolean;
|
|
10
|
+
get isInitial(): boolean;
|
|
11
|
+
get reasonTrace(): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseCommand = void 0;
|
|
4
|
+
const commandSource_1 = require("./commandSource");
|
|
5
|
+
class BaseCommand {
|
|
6
|
+
constructor(source = commandSource_1.CommandSource.Unknown, reason = '') {
|
|
7
|
+
this.source = source;
|
|
8
|
+
this.reason = reason;
|
|
9
|
+
this.timestamp = new Date();
|
|
10
|
+
}
|
|
11
|
+
get isForceAction() {
|
|
12
|
+
if (this.source instanceof BaseCommand) {
|
|
13
|
+
return this.source.isForceAction;
|
|
14
|
+
}
|
|
15
|
+
return (this.source === commandSource_1.CommandSource.Manual || this.source === commandSource_1.CommandSource.API || this.source === commandSource_1.CommandSource.Force);
|
|
16
|
+
}
|
|
17
|
+
get isInitial() {
|
|
18
|
+
if (this.source instanceof BaseCommand) {
|
|
19
|
+
return this.source.isInitial;
|
|
20
|
+
}
|
|
21
|
+
return this.source === commandSource_1.CommandSource.Initial;
|
|
22
|
+
}
|
|
23
|
+
get reasonTrace() {
|
|
24
|
+
let reason = '';
|
|
25
|
+
if (this.source instanceof BaseCommand) {
|
|
26
|
+
reason = this.source.reasonTrace;
|
|
27
|
+
}
|
|
28
|
+
if (this.reason === '') {
|
|
29
|
+
return `${reason} -> ${this._commandType}`;
|
|
30
|
+
}
|
|
31
|
+
return `${reason} -> ${this._commandType}(${this.reason})`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.BaseCommand = BaseCommand;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandSource = void 0;
|
|
4
|
+
var CommandSource;
|
|
5
|
+
(function (CommandSource) {
|
|
6
|
+
CommandSource[CommandSource["Unknown"] = 0] = "Unknown";
|
|
7
|
+
CommandSource[CommandSource["Initial"] = 1] = "Initial";
|
|
8
|
+
CommandSource[CommandSource["Automatic"] = 2] = "Automatic";
|
|
9
|
+
CommandSource[CommandSource["Manual"] = 3] = "Manual";
|
|
10
|
+
CommandSource[CommandSource["API"] = 4] = "API";
|
|
11
|
+
CommandSource[CommandSource["Force"] = 5] = "Force";
|
|
12
|
+
})(CommandSource || (exports.CommandSource = CommandSource = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum CommandType {
|
|
2
|
+
ActuatorToggleCommand = "ActuatorToggleCommand",
|
|
3
|
+
ActuatorSetStateCommand = "ActuatorSetStateCommand",
|
|
4
|
+
ActuatorRestoreTargetAutomaticValueCommand = "ActuatorRestoreTargetAutomaticValueCommand",
|
|
5
|
+
ActuatorWriteStateToDeviceCommand = "ActuatorWriteStateToDeviceCommand",
|
|
6
|
+
DimmerSetLightCommand = "DimmerSetLightCommand",
|
|
7
|
+
FloorSetAllShuttersCommand = "FloorSetAllShuttersCommand",
|
|
8
|
+
LampSetLightCommand = "LampSetLightCommand",
|
|
9
|
+
LampSetTimeBasedCommand = "LampSetTimeBasedCommand",
|
|
10
|
+
LampToggleLightCommand = "LampToggleLightCommand",
|
|
11
|
+
LedSetLightCommand = "LedSetLightCommand",
|
|
12
|
+
LightGroupSwitchTimeConditional = "LightGroupSwitchTimeConditional",
|
|
13
|
+
RoomRestoreShutterPositionCommand = "RoomRestoreShutterPositionCommand",
|
|
14
|
+
RoomRestoreLightCommand = "RoomRestoreLightCommand",
|
|
15
|
+
RoomSetLightTimeBasedCommand = "RoomSetLightTimeBasedCommand",
|
|
16
|
+
ShutterSetLevelCommand = "ShutterSetLevelCommand",
|
|
17
|
+
ShutterSunriseUpCommand = "ShutterSunriseUpCommand",
|
|
18
|
+
SunsetDownCommand = "SunsetDownCommand",
|
|
19
|
+
WindowRestoreDesiredPositionCommand = "WindowRestoreDesiredPositionCommand",
|
|
20
|
+
WindowSetDesiredPositionCommand = "WindowSetDesiredPositionCommand",
|
|
21
|
+
WindowSetRolloByWeatherStatusCommand = "WindowSetRolloByWeatherStatusCommand",
|
|
22
|
+
WledSetLightCommand = "WledSetLightCommand"
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CommandType = void 0;
|
|
4
|
+
var CommandType;
|
|
5
|
+
(function (CommandType) {
|
|
6
|
+
CommandType["ActuatorToggleCommand"] = "ActuatorToggleCommand";
|
|
7
|
+
CommandType["ActuatorSetStateCommand"] = "ActuatorSetStateCommand";
|
|
8
|
+
CommandType["ActuatorRestoreTargetAutomaticValueCommand"] = "ActuatorRestoreTargetAutomaticValueCommand";
|
|
9
|
+
CommandType["ActuatorWriteStateToDeviceCommand"] = "ActuatorWriteStateToDeviceCommand";
|
|
10
|
+
CommandType["DimmerSetLightCommand"] = "DimmerSetLightCommand";
|
|
11
|
+
CommandType["FloorSetAllShuttersCommand"] = "FloorSetAllShuttersCommand";
|
|
12
|
+
CommandType["LampSetLightCommand"] = "LampSetLightCommand";
|
|
13
|
+
CommandType["LampSetTimeBasedCommand"] = "LampSetTimeBasedCommand";
|
|
14
|
+
CommandType["LampToggleLightCommand"] = "LampToggleLightCommand";
|
|
15
|
+
CommandType["LedSetLightCommand"] = "LedSetLightCommand";
|
|
16
|
+
CommandType["LightGroupSwitchTimeConditional"] = "LightGroupSwitchTimeConditional";
|
|
17
|
+
CommandType["RoomRestoreShutterPositionCommand"] = "RoomRestoreShutterPositionCommand";
|
|
18
|
+
CommandType["RoomRestoreLightCommand"] = "RoomRestoreLightCommand";
|
|
19
|
+
CommandType["RoomSetLightTimeBasedCommand"] = "RoomSetLightTimeBasedCommand";
|
|
20
|
+
CommandType["ShutterSetLevelCommand"] = "ShutterSetLevelCommand";
|
|
21
|
+
CommandType["ShutterSunriseUpCommand"] = "ShutterSunriseUpCommand";
|
|
22
|
+
CommandType["SunsetDownCommand"] = "SunsetDownCommand";
|
|
23
|
+
CommandType["WindowRestoreDesiredPositionCommand"] = "WindowRestoreDesiredPositionCommand";
|
|
24
|
+
CommandType["WindowSetDesiredPositionCommand"] = "WindowSetDesiredPositionCommand";
|
|
25
|
+
CommandType["WindowSetRolloByWeatherStatusCommand"] = "WindowSetRolloByWeatherStatusCommand";
|
|
26
|
+
CommandType["WledSetLightCommand"] = "WledSetLightCommand";
|
|
27
|
+
})(CommandType || (exports.CommandType = CommandType = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LampSetLightCommand } from './lampSetLightCommand';
|
|
2
|
+
import { CommandType } from './commandType';
|
|
3
|
+
import { CommandSource } from './commandSource';
|
|
4
|
+
import { BaseCommand } from './baseCommand';
|
|
5
|
+
import { LampSetTimeBasedCommand } from './lampSetTimeBasedCommand';
|
|
6
|
+
import { DimmerSettings } from '../deviceSettings';
|
|
7
|
+
export declare class DimmerSetLightCommand extends LampSetLightCommand {
|
|
8
|
+
brightness: number;
|
|
9
|
+
transitionTime: number;
|
|
10
|
+
_commandType: CommandType;
|
|
11
|
+
/**
|
|
12
|
+
* @param {CommandSource | BaseCommand} source
|
|
13
|
+
* @param {boolean} on The desired value
|
|
14
|
+
* @param {string} reason
|
|
15
|
+
* @param {number} timeout A chosen Timeout after which the light should be reset
|
|
16
|
+
* @param {number} brightness The desired brightness
|
|
17
|
+
* @param {number} transitionTime The transition time during turnOn/turnOff
|
|
18
|
+
*/
|
|
19
|
+
constructor(source: CommandSource | BaseCommand, on: boolean, reason?: string, timeout?: number, brightness?: number, transitionTime?: number);
|
|
20
|
+
get logMessage(): string;
|
|
21
|
+
static byTimeBased(s: DimmerSettings, c: LampSetTimeBasedCommand): DimmerSetLightCommand;
|
|
22
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DimmerSetLightCommand = void 0;
|
|
4
|
+
const lampSetLightCommand_1 = require("./lampSetLightCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
const timeCallback_1 = require("../timeCallback");
|
|
7
|
+
class DimmerSetLightCommand extends lampSetLightCommand_1.LampSetLightCommand {
|
|
8
|
+
/**
|
|
9
|
+
* @param {CommandSource | BaseCommand} source
|
|
10
|
+
* @param {boolean} on The desired value
|
|
11
|
+
* @param {string} reason
|
|
12
|
+
* @param {number} timeout A chosen Timeout after which the light should be reset
|
|
13
|
+
* @param {number} brightness The desired brightness
|
|
14
|
+
* @param {number} transitionTime The transition time during turnOn/turnOff
|
|
15
|
+
*/
|
|
16
|
+
constructor(source, on, reason = '', timeout = -1, brightness = -1, transitionTime = -1) {
|
|
17
|
+
super(source, on, reason, timeout);
|
|
18
|
+
this.brightness = brightness;
|
|
19
|
+
this.transitionTime = transitionTime;
|
|
20
|
+
this._commandType = commandType_1.CommandType.DimmerSetLightCommand;
|
|
21
|
+
}
|
|
22
|
+
get logMessage() {
|
|
23
|
+
return `Dimmer setLight to ${this.on} from ${this.source} for reason: ${this.reasonTrace}`;
|
|
24
|
+
}
|
|
25
|
+
static byTimeBased(s, c) {
|
|
26
|
+
switch (c.time) {
|
|
27
|
+
case timeCallback_1.TimeOfDay.Daylight:
|
|
28
|
+
return new DimmerSetLightCommand(c, true, 'By TimeBased Daylight', c.timeout, s.dayBrightness);
|
|
29
|
+
case timeCallback_1.TimeOfDay.BeforeSunrise:
|
|
30
|
+
return new DimmerSetLightCommand(c, s.dawnOn, '', c.timeout, s.dawnBrightness, undefined);
|
|
31
|
+
case timeCallback_1.TimeOfDay.AfterSunset:
|
|
32
|
+
return new DimmerSetLightCommand(c, s.duskOn, '', c.timeout, s.duskBrightness, undefined);
|
|
33
|
+
case timeCallback_1.TimeOfDay.Night:
|
|
34
|
+
return new DimmerSetLightCommand(c, s.nightOn, '', c.timeout, s.nightBrightness, undefined);
|
|
35
|
+
default:
|
|
36
|
+
throw new Error(`TimeOfDay ${c.time} not supported`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.DimmerSetLightCommand = DimmerSetLightCommand;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { CommandType } from './commandType';
|
|
4
|
+
export declare class FloorSetAllShuttersCommand extends BaseCommand {
|
|
5
|
+
readonly position: number;
|
|
6
|
+
readonly specificFloor: number | undefined;
|
|
7
|
+
_commandType: CommandType;
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of FloorSetAllShuttersCommand.
|
|
10
|
+
* @param {CommandSource | BaseCommand} source
|
|
11
|
+
* @param {number} position (0 closed, 100 open)
|
|
12
|
+
* @param {number | undefined} specificFloor undefined = all floors
|
|
13
|
+
* @param {string} reason
|
|
14
|
+
*/
|
|
15
|
+
constructor(source: CommandSource | BaseCommand, position: number, specificFloor?: number | undefined, reason?: string);
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FloorSetAllShuttersCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class FloorSetAllShuttersCommand extends baseCommand_1.BaseCommand {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of FloorSetAllShuttersCommand.
|
|
9
|
+
* @param {CommandSource | BaseCommand} source
|
|
10
|
+
* @param {number} position (0 closed, 100 open)
|
|
11
|
+
* @param {number | undefined} specificFloor undefined = all floors
|
|
12
|
+
* @param {string} reason
|
|
13
|
+
*/
|
|
14
|
+
constructor(source, position, specificFloor = undefined, reason = '') {
|
|
15
|
+
super(source, reason);
|
|
16
|
+
this.position = position;
|
|
17
|
+
this.specificFloor = specificFloor;
|
|
18
|
+
this._commandType = commandType_1.CommandType.FloorSetAllShuttersCommand;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.FloorSetAllShuttersCommand = FloorSetAllShuttersCommand;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { RestoreTargetAutomaticValueCommand } from './restoreTargetAutomaticValueCommand';
|
|
2
|
+
export { ActuatorSetStateCommand } from './actuatorSetStateCommand';
|
|
3
|
+
export { ActuatorToggleCommand } from './actuatorToggleCommand';
|
|
4
|
+
export { ActuatorWriteStateToDeviceCommand } from './actuatorWriteStateToDeviceCommand';
|
|
5
|
+
export { BaseCommand } from './baseCommand';
|
|
6
|
+
export { CommandSource } from './commandSource';
|
|
7
|
+
export { CommandType } from './commandType';
|
|
8
|
+
export { DimmerSetLightCommand } from './dimmerSetLightCommand';
|
|
9
|
+
export { FloorSetAllShuttersCommand } from './floorSetAllShuttersCommand';
|
|
10
|
+
export { LampSetLightCommand } from './lampSetLightCommand';
|
|
11
|
+
export { LampSetTimeBasedCommand } from './lampSetTimeBasedCommand';
|
|
12
|
+
export { LampToggleLightCommand } from './lampToggleLightCommand';
|
|
13
|
+
export { LedSetLightCommand } from './ledSetLightCommand';
|
|
14
|
+
export { LightGroupSwitchTimeConditionalCommand } from './lightGroupSwitchTimeConditionalCommand';
|
|
15
|
+
export { RoomRestoreLightCommand } from './roomRestoreLightCommand';
|
|
16
|
+
export { RoomRestoreShutterPositionCommand } from './roomRestoreShutterPositionCommand';
|
|
17
|
+
export { RoomSetLightTimeBasedCommand } from './roomSetLightTimeBasedCommand';
|
|
18
|
+
export { ShutterSetLevelCommand } from './ShutterSetLevelCommand';
|
|
19
|
+
export { ShutterSunriseUpCommand } from './shutterSunriseUpCommand';
|
|
20
|
+
export { ShutterSunsetDownCommand } from './shutterSunsetDownCommand';
|
|
21
|
+
export { WindowRestoreDesiredPositionCommand } from './WindowRestoreDesiredPositionCommand';
|
|
22
|
+
export { WindowSetDesiredPositionCommand } from './WindowSetDesiredPositionCommand';
|
|
23
|
+
export { WindowSetRolloByWeatherStatusCommand } from './WindowSetRolloByWeatherStatusCommand';
|
|
24
|
+
export { WledSetLightCommand } from './wledSetLightCommand';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WledSetLightCommand = exports.WindowSetRolloByWeatherStatusCommand = exports.WindowSetDesiredPositionCommand = exports.WindowRestoreDesiredPositionCommand = exports.ShutterSunsetDownCommand = exports.ShutterSunriseUpCommand = exports.ShutterSetLevelCommand = exports.RoomSetLightTimeBasedCommand = exports.RoomRestoreShutterPositionCommand = exports.RoomRestoreLightCommand = exports.LightGroupSwitchTimeConditionalCommand = exports.LedSetLightCommand = exports.LampToggleLightCommand = exports.LampSetTimeBasedCommand = exports.LampSetLightCommand = exports.FloorSetAllShuttersCommand = exports.DimmerSetLightCommand = exports.CommandType = exports.CommandSource = exports.BaseCommand = exports.ActuatorWriteStateToDeviceCommand = exports.ActuatorToggleCommand = exports.ActuatorSetStateCommand = exports.RestoreTargetAutomaticValueCommand = void 0;
|
|
4
|
+
var restoreTargetAutomaticValueCommand_1 = require("./restoreTargetAutomaticValueCommand");
|
|
5
|
+
Object.defineProperty(exports, "RestoreTargetAutomaticValueCommand", { enumerable: true, get: function () { return restoreTargetAutomaticValueCommand_1.RestoreTargetAutomaticValueCommand; } });
|
|
6
|
+
var actuatorSetStateCommand_1 = require("./actuatorSetStateCommand");
|
|
7
|
+
Object.defineProperty(exports, "ActuatorSetStateCommand", { enumerable: true, get: function () { return actuatorSetStateCommand_1.ActuatorSetStateCommand; } });
|
|
8
|
+
var actuatorToggleCommand_1 = require("./actuatorToggleCommand");
|
|
9
|
+
Object.defineProperty(exports, "ActuatorToggleCommand", { enumerable: true, get: function () { return actuatorToggleCommand_1.ActuatorToggleCommand; } });
|
|
10
|
+
var actuatorWriteStateToDeviceCommand_1 = require("./actuatorWriteStateToDeviceCommand");
|
|
11
|
+
Object.defineProperty(exports, "ActuatorWriteStateToDeviceCommand", { enumerable: true, get: function () { return actuatorWriteStateToDeviceCommand_1.ActuatorWriteStateToDeviceCommand; } });
|
|
12
|
+
var baseCommand_1 = require("./baseCommand");
|
|
13
|
+
Object.defineProperty(exports, "BaseCommand", { enumerable: true, get: function () { return baseCommand_1.BaseCommand; } });
|
|
14
|
+
var commandSource_1 = require("./commandSource");
|
|
15
|
+
Object.defineProperty(exports, "CommandSource", { enumerable: true, get: function () { return commandSource_1.CommandSource; } });
|
|
16
|
+
var commandType_1 = require("./commandType");
|
|
17
|
+
Object.defineProperty(exports, "CommandType", { enumerable: true, get: function () { return commandType_1.CommandType; } });
|
|
18
|
+
var dimmerSetLightCommand_1 = require("./dimmerSetLightCommand");
|
|
19
|
+
Object.defineProperty(exports, "DimmerSetLightCommand", { enumerable: true, get: function () { return dimmerSetLightCommand_1.DimmerSetLightCommand; } });
|
|
20
|
+
var floorSetAllShuttersCommand_1 = require("./floorSetAllShuttersCommand");
|
|
21
|
+
Object.defineProperty(exports, "FloorSetAllShuttersCommand", { enumerable: true, get: function () { return floorSetAllShuttersCommand_1.FloorSetAllShuttersCommand; } });
|
|
22
|
+
var lampSetLightCommand_1 = require("./lampSetLightCommand");
|
|
23
|
+
Object.defineProperty(exports, "LampSetLightCommand", { enumerable: true, get: function () { return lampSetLightCommand_1.LampSetLightCommand; } });
|
|
24
|
+
var lampSetTimeBasedCommand_1 = require("./lampSetTimeBasedCommand");
|
|
25
|
+
Object.defineProperty(exports, "LampSetTimeBasedCommand", { enumerable: true, get: function () { return lampSetTimeBasedCommand_1.LampSetTimeBasedCommand; } });
|
|
26
|
+
var lampToggleLightCommand_1 = require("./lampToggleLightCommand");
|
|
27
|
+
Object.defineProperty(exports, "LampToggleLightCommand", { enumerable: true, get: function () { return lampToggleLightCommand_1.LampToggleLightCommand; } });
|
|
28
|
+
var ledSetLightCommand_1 = require("./ledSetLightCommand");
|
|
29
|
+
Object.defineProperty(exports, "LedSetLightCommand", { enumerable: true, get: function () { return ledSetLightCommand_1.LedSetLightCommand; } });
|
|
30
|
+
var lightGroupSwitchTimeConditionalCommand_1 = require("./lightGroupSwitchTimeConditionalCommand");
|
|
31
|
+
Object.defineProperty(exports, "LightGroupSwitchTimeConditionalCommand", { enumerable: true, get: function () { return lightGroupSwitchTimeConditionalCommand_1.LightGroupSwitchTimeConditionalCommand; } });
|
|
32
|
+
var roomRestoreLightCommand_1 = require("./roomRestoreLightCommand");
|
|
33
|
+
Object.defineProperty(exports, "RoomRestoreLightCommand", { enumerable: true, get: function () { return roomRestoreLightCommand_1.RoomRestoreLightCommand; } });
|
|
34
|
+
var roomRestoreShutterPositionCommand_1 = require("./roomRestoreShutterPositionCommand");
|
|
35
|
+
Object.defineProperty(exports, "RoomRestoreShutterPositionCommand", { enumerable: true, get: function () { return roomRestoreShutterPositionCommand_1.RoomRestoreShutterPositionCommand; } });
|
|
36
|
+
var roomSetLightTimeBasedCommand_1 = require("./roomSetLightTimeBasedCommand");
|
|
37
|
+
Object.defineProperty(exports, "RoomSetLightTimeBasedCommand", { enumerable: true, get: function () { return roomSetLightTimeBasedCommand_1.RoomSetLightTimeBasedCommand; } });
|
|
38
|
+
var ShutterSetLevelCommand_1 = require("./ShutterSetLevelCommand");
|
|
39
|
+
Object.defineProperty(exports, "ShutterSetLevelCommand", { enumerable: true, get: function () { return ShutterSetLevelCommand_1.ShutterSetLevelCommand; } });
|
|
40
|
+
var shutterSunriseUpCommand_1 = require("./shutterSunriseUpCommand");
|
|
41
|
+
Object.defineProperty(exports, "ShutterSunriseUpCommand", { enumerable: true, get: function () { return shutterSunriseUpCommand_1.ShutterSunriseUpCommand; } });
|
|
42
|
+
var shutterSunsetDownCommand_1 = require("./shutterSunsetDownCommand");
|
|
43
|
+
Object.defineProperty(exports, "ShutterSunsetDownCommand", { enumerable: true, get: function () { return shutterSunsetDownCommand_1.ShutterSunsetDownCommand; } });
|
|
44
|
+
var WindowRestoreDesiredPositionCommand_1 = require("./WindowRestoreDesiredPositionCommand");
|
|
45
|
+
Object.defineProperty(exports, "WindowRestoreDesiredPositionCommand", { enumerable: true, get: function () { return WindowRestoreDesiredPositionCommand_1.WindowRestoreDesiredPositionCommand; } });
|
|
46
|
+
var WindowSetDesiredPositionCommand_1 = require("./WindowSetDesiredPositionCommand");
|
|
47
|
+
Object.defineProperty(exports, "WindowSetDesiredPositionCommand", { enumerable: true, get: function () { return WindowSetDesiredPositionCommand_1.WindowSetDesiredPositionCommand; } });
|
|
48
|
+
var WindowSetRolloByWeatherStatusCommand_1 = require("./WindowSetRolloByWeatherStatusCommand");
|
|
49
|
+
Object.defineProperty(exports, "WindowSetRolloByWeatherStatusCommand", { enumerable: true, get: function () { return WindowSetRolloByWeatherStatusCommand_1.WindowSetRolloByWeatherStatusCommand; } });
|
|
50
|
+
var wledSetLightCommand_1 = require("./wledSetLightCommand");
|
|
51
|
+
Object.defineProperty(exports, "WledSetLightCommand", { enumerable: true, get: function () { return wledSetLightCommand_1.WledSetLightCommand; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommandType } from './commandType';
|
|
2
|
+
import { CommandSource } from './commandSource';
|
|
3
|
+
import { BaseCommand } from './baseCommand';
|
|
4
|
+
import { ActuatorSetStateCommand } from './actuatorSetStateCommand';
|
|
5
|
+
export declare class LampSetLightCommand extends ActuatorSetStateCommand {
|
|
6
|
+
_commandType: CommandType;
|
|
7
|
+
constructor(source: CommandSource | BaseCommand, on: boolean, reason?: string, timeout?: number);
|
|
8
|
+
get logMessage(): string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LampSetLightCommand = void 0;
|
|
4
|
+
const commandType_1 = require("./commandType");
|
|
5
|
+
const actuatorSetStateCommand_1 = require("./actuatorSetStateCommand");
|
|
6
|
+
class LampSetLightCommand extends actuatorSetStateCommand_1.ActuatorSetStateCommand {
|
|
7
|
+
constructor(source, on, reason = '', timeout = -1) {
|
|
8
|
+
super(source, on, reason, timeout);
|
|
9
|
+
this._commandType = commandType_1.CommandType.LampSetLightCommand;
|
|
10
|
+
}
|
|
11
|
+
get logMessage() {
|
|
12
|
+
return `Lamp setLight to ${this.on} from ${this.source} for reason: ${this.reasonTrace}`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.LampSetLightCommand = LampSetLightCommand;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseCommand } from './baseCommand';
|
|
2
|
+
import { CommandType } from './commandType';
|
|
3
|
+
import { CommandSource } from './commandSource';
|
|
4
|
+
import { TimeOfDay } from '../timeCallback';
|
|
5
|
+
export declare class LampSetTimeBasedCommand extends BaseCommand {
|
|
6
|
+
time: TimeOfDay;
|
|
7
|
+
timeout: number;
|
|
8
|
+
_commandType: CommandType;
|
|
9
|
+
/**
|
|
10
|
+
* Set's the lamp based on lamp settings for the current time
|
|
11
|
+
* @param {CommandSource | BaseCommand} source
|
|
12
|
+
* @param {TimeOfDay} time The time to use for calculation of desired state
|
|
13
|
+
* @param reason
|
|
14
|
+
* @param {number} timeout If > 0 this is the time after which the lamp reverts to its original state
|
|
15
|
+
*/
|
|
16
|
+
constructor(source: CommandSource | BaseCommand, time: TimeOfDay, reason?: string, timeout?: number);
|
|
17
|
+
get logMessage(): string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LampSetTimeBasedCommand = void 0;
|
|
4
|
+
const baseCommand_1 = require("./baseCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
const timeCallback_1 = require("../timeCallback");
|
|
7
|
+
class LampSetTimeBasedCommand extends baseCommand_1.BaseCommand {
|
|
8
|
+
/**
|
|
9
|
+
* Set's the lamp based on lamp settings for the current time
|
|
10
|
+
* @param {CommandSource | BaseCommand} source
|
|
11
|
+
* @param {TimeOfDay} time The time to use for calculation of desired state
|
|
12
|
+
* @param reason
|
|
13
|
+
* @param {number} timeout If > 0 this is the time after which the lamp reverts to its original state
|
|
14
|
+
*/
|
|
15
|
+
constructor(source, time, reason = '', timeout = -1) {
|
|
16
|
+
super(source, reason);
|
|
17
|
+
this.time = time;
|
|
18
|
+
this.timeout = timeout;
|
|
19
|
+
this._commandType = commandType_1.CommandType.LampSetTimeBasedCommand;
|
|
20
|
+
}
|
|
21
|
+
get logMessage() {
|
|
22
|
+
return `Lamp setTimeBased to ${timeCallback_1.TimeOfDay[this.time]} from ${this.source}`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.LampSetTimeBasedCommand = LampSetTimeBasedCommand;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActuatorToggleCommand } from './actuatorToggleCommand';
|
|
2
|
+
import { CommandType } from './commandType';
|
|
3
|
+
import { CommandSource } from './commandSource';
|
|
4
|
+
import { BaseCommand } from './baseCommand';
|
|
5
|
+
import { TimeOfDay } from '../timeCallback';
|
|
6
|
+
export declare class LampToggleLightCommand extends ActuatorToggleCommand {
|
|
7
|
+
time?: TimeOfDay | undefined;
|
|
8
|
+
readonly calculateTime: boolean;
|
|
9
|
+
_commandType: CommandType;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param {CommandSource | BaseCommand} source
|
|
13
|
+
* @param {string} reason
|
|
14
|
+
* @param {TimeOfDay} time The time to use for calculation of desired state
|
|
15
|
+
* @param {boolean} calculateTime Alternative to "time", if set the time will be calculated by the lamps room and its settings
|
|
16
|
+
*/
|
|
17
|
+
constructor(source: CommandSource | BaseCommand, reason?: string, time?: TimeOfDay | undefined, calculateTime?: boolean);
|
|
18
|
+
get logMessage(): string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LampToggleLightCommand = void 0;
|
|
4
|
+
const actuatorToggleCommand_1 = require("./actuatorToggleCommand");
|
|
5
|
+
const commandType_1 = require("./commandType");
|
|
6
|
+
class LampToggleLightCommand extends actuatorToggleCommand_1.ActuatorToggleCommand {
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {CommandSource | BaseCommand} source
|
|
10
|
+
* @param {string} reason
|
|
11
|
+
* @param {TimeOfDay} time The time to use for calculation of desired state
|
|
12
|
+
* @param {boolean} calculateTime Alternative to "time", if set the time will be calculated by the lamps room and its settings
|
|
13
|
+
*/
|
|
14
|
+
constructor(source, reason = '', time, calculateTime = false) {
|
|
15
|
+
super(source, reason);
|
|
16
|
+
this.time = time;
|
|
17
|
+
this.calculateTime = calculateTime;
|
|
18
|
+
this._commandType = commandType_1.CommandType.LampToggleLightCommand;
|
|
19
|
+
}
|
|
20
|
+
get logMessage() {
|
|
21
|
+
return `Lamp toggleLight from ${this.source} for reason: ${this.reasonTrace}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.LampToggleLightCommand = LampToggleLightCommand;
|