hoffmation-base 3.0.0-alpha.20 → 3.0.0-alpha.22
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/liquid-pid.d.ts +2 -5
- package/lib/liquid-pid.js +2 -5
- package/lib/models/command/ShutterSetLevelCommand.d.ts +7 -0
- package/lib/models/command/ShutterSetLevelCommand.js +7 -1
- package/lib/models/command/WindowRestoreDesiredPositionCommand.d.ts +5 -0
- package/lib/models/command/WindowRestoreDesiredPositionCommand.js +5 -1
- package/lib/models/command/WindowSetDesiredPositionCommand.d.ts +6 -0
- package/lib/models/command/WindowSetDesiredPositionCommand.js +6 -1
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.d.ts +5 -0
- package/lib/models/command/WindowSetRolloByWeatherStatusCommand.js +5 -1
- package/lib/models/command/actuatorSetStateCommand.d.ts +7 -0
- package/lib/models/command/actuatorSetStateCommand.js +7 -1
- package/lib/models/command/actuatorToggleCommand.d.ts +5 -0
- package/lib/models/command/actuatorToggleCommand.js +5 -1
- package/lib/models/command/actuatorWriteStateToDeviceCommand.d.ts +6 -0
- package/lib/models/command/actuatorWriteStateToDeviceCommand.js +6 -1
- package/lib/models/command/baseCommand.d.ts +10 -0
- package/lib/models/command/baseCommand.js +16 -1
- package/lib/models/command/blockAutomaticCommand.d.ts +4 -4
- package/lib/models/command/blockAutomaticCommand.js +4 -4
- package/lib/models/command/blockAutomaticLiftBlockCommand.d.ts +2 -2
- package/lib/models/command/blockAutomaticLiftBlockCommand.js +2 -2
- package/lib/models/command/blockAutomaticUntilCommand.d.ts +4 -4
- package/lib/models/command/blockAutomaticUntilCommand.js +4 -4
- package/lib/models/command/commandSource.d.ts +19 -0
- package/lib/models/command/commandSource.js +20 -1
- package/lib/models/command/dimmerSetLightCommand.d.ts +7 -6
- package/lib/models/command/dimmerSetLightCommand.js +7 -6
- package/lib/models/command/floorSetAllShuttersCommand.d.ts +4 -4
- package/lib/models/command/floorSetAllShuttersCommand.js +4 -4
- package/lib/models/command/lampSetLightCommand.d.ts +7 -0
- package/lib/models/command/lampSetLightCommand.js +7 -1
- package/lib/models/command/lampSetTimeBasedCommand.d.ts +4 -4
- package/lib/models/command/lampSetTimeBasedCommand.js +4 -4
- package/lib/models/command/lampToggleLightCommand.d.ts +5 -5
- package/lib/models/command/lampToggleLightCommand.js +5 -5
- package/lib/models/command/ledSetLightCommand.d.ts +15 -9
- package/lib/models/command/ledSetLightCommand.js +15 -10
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.d.ts +6 -0
- package/lib/models/command/lightGroupSwitchTimeConditionalCommand.js +6 -1
- package/lib/models/command/restoreTargetAutomaticValueCommand.d.ts +5 -0
- package/lib/models/command/restoreTargetAutomaticValueCommand.js +5 -1
- package/lib/models/command/roomRestoreLightCommand.d.ts +5 -0
- package/lib/models/command/roomRestoreLightCommand.js +5 -1
- package/lib/models/command/roomRestoreShutterPositionCommand.d.ts +6 -0
- package/lib/models/command/roomRestoreShutterPositionCommand.js +6 -1
- package/lib/models/command/roomSetLightTimeBasedCommand.d.ts +3 -3
- package/lib/models/command/roomSetLightTimeBasedCommand.js +3 -3
- package/lib/models/command/shutterSunriseUpCommand.d.ts +5 -0
- package/lib/models/command/shutterSunriseUpCommand.js +5 -1
- package/lib/models/command/shutterSunsetDownCommand.d.ts +5 -0
- package/lib/models/command/shutterSunsetDownCommand.js +5 -1
- package/lib/models/command/wledSetLightCommand.d.ts +10 -0
- package/lib/models/command/wledSetLightCommand.js +10 -1
- package/lib/models/connectionCallbacks.d.ts +4 -4
- package/lib/models/deviceConfig.d.ts +3 -3
- package/lib/models/deviceSettings/acSettings.d.ts +0 -5
- package/lib/models/deviceSettings/acSettings.js +0 -5
- package/lib/models/deviceSettings/actuatorSettings.d.ts +0 -8
- package/lib/models/deviceSettings/actuatorSettings.js +0 -8
- package/lib/models/deviceSettings/garageDoorOpenerSettings.d.ts +0 -1
- package/lib/models/deviceSettings/garageDoorOpenerSettings.js +0 -1
- package/lib/models/deviceSettings/heaterSettings.d.ts +0 -6
- package/lib/models/deviceSettings/heaterSettings.js +0 -6
- package/lib/models/deviceSettings/motionSensorSettings.d.ts +0 -1
- package/lib/models/deviceSettings/motionSensorSettings.js +0 -1
- package/lib/models/deviceSettings/shutterSettings.d.ts +0 -3
- package/lib/models/deviceSettings/shutterSettings.js +0 -3
- package/lib/models/groupSettings/heatGroupSettings.d.ts +0 -2
- package/lib/models/groupSettings/heatGroupSettings.js +0 -2
- package/lib/models/iIdHolder.d.ts +6 -0
- package/lib/models/objectSettings.d.ts +2 -2
- package/lib/models/objectSettings.js +2 -2
- package/lib/models/rooms/RoomBase.d.ts +2 -1
- package/lib/models/rooms/RoomBase.js +2 -1
- package/lib/models/rooms/iRoomBase.d.ts +17 -0
- package/lib/models/rooms/iRoomImportEnforcer.d.ts +4 -0
- package/lib/server/devices/Griffe.js +0 -1
- package/lib/server/devices/IoBrokerBaseDevice.d.ts +9 -16
- package/lib/server/devices/IoBrokerBaseDevice.js +9 -16
- package/lib/server/devices/IoBrokerDeviceInfo.d.ts +2 -2
- package/lib/server/devices/IoBrokerDeviceInfo.js +6 -4
- package/lib/server/devices/baseDeviceInterfaces/iAcDevice.d.ts +32 -0
- package/lib/server/devices/baseDeviceInterfaces/iActuator.d.ts +16 -0
- package/lib/server/devices/baseDeviceInterfaces/iBaseDevice.d.ts +25 -0
- package/lib/server/devices/baseDeviceInterfaces/iBatteryDevice.d.ts +10 -1
- package/lib/server/devices/baseDeviceInterfaces/iBluetoothDetector.d.ts +5 -5
- package/lib/server/devices/baseDeviceInterfaces/iButtonSwitch.d.ts +13 -0
- package/lib/server/devices/baseDeviceInterfaces/iCameraDevice.d.ts +10 -0
- package/lib/server/devices/baseDeviceInterfaces/iDimmableLamp.d.ts +9 -2
- package/lib/server/devices/baseDeviceInterfaces/iEnergyManager.d.ts +13 -2
- package/lib/server/devices/baseDeviceInterfaces/iExcessEnergyConsumer.d.ts +16 -2
- package/lib/server/devices/baseDeviceInterfaces/iGarageDoorOpener.d.ts +10 -0
- package/lib/server/devices/baseDeviceInterfaces/iHandleSensor.d.ts +12 -0
- package/lib/server/devices/baseDeviceInterfaces/iHeater.d.ts +12 -2
- package/lib/server/devices/baseDeviceInterfaces/iHumiditySensor.d.ts +7 -0
- package/lib/server/devices/baseDeviceInterfaces/iLamp.d.ts +4 -0
- package/lib/server/devices/baseDeviceInterfaces/iLedRgbCct.d.ts +5 -0
- package/lib/server/devices/baseDeviceInterfaces/iMotionSensor.d.ts +7 -1
- package/lib/server/devices/baseDeviceInterfaces/iScene.d.ts +7 -0
- package/lib/server/devices/baseDeviceInterfaces/iShutter.d.ts +7 -0
- package/lib/server/devices/baseDeviceInterfaces/iSmokeDetectorDevice.d.ts +7 -0
- package/lib/server/devices/baseDeviceInterfaces/iSpeaker.d.ts +25 -0
- package/lib/server/devices/baseDeviceInterfaces/iTemperatureSensor.d.ts +11 -0
- package/lib/server/devices/baseDeviceInterfaces/iTemporaryDisableAutomatic.d.ts +7 -0
- package/lib/server/devices/baseDeviceInterfaces/iTvDevice.d.ts +12 -0
- package/lib/server/devices/baseDeviceInterfaces/iVibrationSensor.d.ts +0 -1
- package/lib/server/devices/blueIris/cameraDevice.d.ts +2 -3
- package/lib/server/devices/blueIris/cameraDevice.js +2 -3
- package/lib/server/devices/dachs/interfaces/KeyListEntity.d.ts +0 -8
- package/lib/server/devices/dachs/interfaces/KeyListEntity.js +0 -8
- package/lib/server/devices/dachs/lib/dachsHttpClient.d.ts +1 -1
- package/lib/server/devices/groups/Window.d.ts +1 -0
- package/lib/server/devices/groups/Window.js +1 -0
- package/lib/server/devices/groups/heatGroup.d.ts +6 -6
- package/lib/server/devices/groups/heatGroup.js +6 -6
- package/lib/server/devices/groups/presenceGroup.d.ts +0 -1
- package/lib/server/devices/groups/presenceGroup.js +0 -1
- package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.d.ts +0 -1
- package/lib/server/devices/hmIPDevices/hmIpHeizgruppe.js +0 -6
- package/lib/server/devices/iDeviceUpdater.d.ts +11 -0
- package/lib/server/devices/jsObject/jsObjectEnergyManager.d.ts +1 -1
- package/lib/server/devices/jsObject/jsObjectEnergyManager.js +1 -1
- package/lib/server/devices/sharedFunctions/lampUtils.js +3 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.d.ts +1 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeMotionSensor.js +1 -1
- package/lib/server/devices/zigbee/BaseDevices/zigbeeSwitch.d.ts +1 -1
- package/lib/server/devices/zigbee/zigbeeAquaraVibra.d.ts +1 -1
- package/lib/server/devices/zigbee/zigbeeEuroHeater.d.ts +2 -3
- package/lib/server/devices/zigbee/zigbeeEuroHeater.js +2 -3
- package/lib/server/ioBroker/connection.d.ts +20 -20
- package/lib/server/ioBroker/connection.js +29 -21
- package/lib/server/ioBroker/socketIOConnectOptions.d.ts +2 -2
- package/lib/server/ioBroker/socketIOVisCommand.d.ts +5 -1
- package/lib/server/services/Sonos/polly-service.js +1 -2
- package/lib/server/services/Translation/res.d.ts +34 -19
- package/lib/server/services/Translation/res.js +34 -19
- package/lib/server/services/api/api-service.d.ts +72 -70
- package/lib/server/services/api/api-service.js +72 -70
- package/lib/server/services/blockAutomaticHandler.js +5 -0
- package/lib/server/services/dbo/iPersist.d.ts +96 -0
- package/lib/server/services/https-service.d.ts +3 -2
- package/lib/server/services/https-service.js +3 -2
- package/lib/server/services/log-service/log-service.d.ts +2 -2
- package/lib/server/services/log-service/log-service.js +2 -2
- package/lib/server/services/news-service.d.ts +5 -6
- package/lib/server/services/news-service.js +5 -6
- package/lib/server/services/room-service/room-service.d.ts +3 -2
- package/lib/server/services/room-service/room-service.js +4 -3
- package/lib/server/services/settings-service.d.ts +3 -2
- package/lib/server/services/settings-service.js +3 -2
- package/lib/server/services/utils/iDisposeable.d.ts +3 -0
- package/lib/server/services/victron/victron-device.d.ts +2 -2
- package/lib/server/services/victron/victron-device.js +2 -2
- package/lib/server/services/weather/weather-current.d.ts +0 -2
- package/lib/server/services/weather/weather-service.d.ts +4 -1
- package/lib/server/services/weather/weather-service.js +4 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -5
package/lib/liquid-pid.d.ts
CHANGED
|
@@ -4,12 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* I'm a NodeJS guy not a scientist, so please be a careful!!!
|
|
6
6
|
* FYI: http://en.wikipedia.org/wiki/PID_controller
|
|
7
|
-
*
|
|
8
|
-
* @module controller
|
|
9
|
-
*
|
|
10
7
|
* @author https://github.com/hekike/liquid-pid
|
|
11
|
-
*
|
|
12
|
-
|
|
8
|
+
* licence: MIT
|
|
9
|
+
*/
|
|
13
10
|
export declare class PIDController {
|
|
14
11
|
private _Tref;
|
|
15
12
|
private readonly _Pmax;
|
package/lib/liquid-pid.js
CHANGED
|
@@ -7,12 +7,9 @@ exports.PIDController = void 0;
|
|
|
7
7
|
*
|
|
8
8
|
* I'm a NodeJS guy not a scientist, so please be a careful!!!
|
|
9
9
|
* FYI: http://en.wikipedia.org/wiki/PID_controller
|
|
10
|
-
*
|
|
11
|
-
* @module controller
|
|
12
|
-
*
|
|
13
10
|
* @author https://github.com/hekike/liquid-pid
|
|
14
|
-
*
|
|
15
|
-
|
|
11
|
+
* licence: MIT
|
|
12
|
+
*/
|
|
16
13
|
class PIDController {
|
|
17
14
|
constructor(options) {
|
|
18
15
|
var _a, _b, _c, _d, _f, _g;
|
|
@@ -5,6 +5,13 @@ export declare class ShutterSetLevelCommand extends BaseCommand {
|
|
|
5
5
|
readonly level: number;
|
|
6
6
|
readonly skipOpenWarning: boolean;
|
|
7
7
|
_commandType: CommandType;
|
|
8
|
+
/**
|
|
9
|
+
* Command to set the level of a shutter
|
|
10
|
+
* @param source - The source of the command
|
|
11
|
+
* @param level - The level to set the shutter to (0: close, 100: completely open)
|
|
12
|
+
* @param reason - You can provide a reason for clarification
|
|
13
|
+
* @param skipOpenWarning - Whether to skip the warning of window being open
|
|
14
|
+
*/
|
|
8
15
|
constructor(source: CommandSource | BaseCommand, level: number, reason?: string, skipOpenWarning?: boolean);
|
|
9
16
|
get logMessage(): string;
|
|
10
17
|
}
|
|
@@ -4,7 +4,13 @@ exports.ShutterSetLevelCommand = void 0;
|
|
|
4
4
|
const baseCommand_1 = require("./baseCommand");
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
class ShutterSetLevelCommand extends baseCommand_1.BaseCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the level of a shutter
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param level - The level to set the shutter to (0: close, 100: completely open)
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
* @param skipOpenWarning - Whether to skip the warning of window being open
|
|
13
|
+
*/
|
|
8
14
|
constructor(source, level, reason = '', skipOpenWarning = false) {
|
|
9
15
|
super(source, reason);
|
|
10
16
|
this.level = level;
|
|
@@ -3,5 +3,10 @@ import { CommandSource } from './commandSource';
|
|
|
3
3
|
import { CommandType } from './commandType';
|
|
4
4
|
export declare class WindowRestoreDesiredPositionCommand extends BaseCommand {
|
|
5
5
|
_commandType: CommandType;
|
|
6
|
+
/**
|
|
7
|
+
* Command to restore the desired position of the shutter of a window
|
|
8
|
+
* @param source - The source of the command
|
|
9
|
+
* @param reason - You can provide a reason for clarification
|
|
10
|
+
*/
|
|
6
11
|
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
7
12
|
}
|
|
@@ -4,7 +4,11 @@ exports.WindowRestoreDesiredPositionCommand = void 0;
|
|
|
4
4
|
const baseCommand_1 = require("./baseCommand");
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
class WindowRestoreDesiredPositionCommand extends baseCommand_1.BaseCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to restore the desired position of the shutter of a window
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param reason - You can provide a reason for clarification
|
|
11
|
+
*/
|
|
8
12
|
constructor(source, reason = '') {
|
|
9
13
|
super(source, reason);
|
|
10
14
|
this._commandType = commandType_1.CommandType.WindowRestoreDesiredPositionCommand;
|
|
@@ -4,5 +4,11 @@ import { CommandType } from './commandType';
|
|
|
4
4
|
export declare class WindowSetDesiredPositionCommand extends BaseCommand {
|
|
5
5
|
readonly position: number;
|
|
6
6
|
_commandType: CommandType;
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the desired position of the shutter of a window
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param position - The desired position of the shutter (0 closed, 100 open)
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
*/
|
|
7
13
|
constructor(source: CommandSource | BaseCommand, position: number, reason?: string);
|
|
8
14
|
}
|
|
@@ -4,7 +4,12 @@ exports.WindowSetDesiredPositionCommand = void 0;
|
|
|
4
4
|
const baseCommand_1 = require("./baseCommand");
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
class WindowSetDesiredPositionCommand extends baseCommand_1.BaseCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the desired position of the shutter of a window
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param position - The desired position of the shutter (0 closed, 100 open)
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
*/
|
|
8
13
|
constructor(source, position, reason = '') {
|
|
9
14
|
super(source, reason);
|
|
10
15
|
this.position = position;
|
|
@@ -3,5 +3,10 @@ import { CommandSource } from './commandSource';
|
|
|
3
3
|
import { CommandType } from './commandType';
|
|
4
4
|
export declare class WindowSetRolloByWeatherStatusCommand extends BaseCommand {
|
|
5
5
|
_commandType: CommandType;
|
|
6
|
+
/**
|
|
7
|
+
* Command to set the desired position of the shutter of a window based on the weather status
|
|
8
|
+
* @param source - The source of the command
|
|
9
|
+
* @param reason - You can provide a reason for clarification
|
|
10
|
+
*/
|
|
6
11
|
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
7
12
|
}
|
|
@@ -4,7 +4,11 @@ exports.WindowSetRolloByWeatherStatusCommand = void 0;
|
|
|
4
4
|
const baseCommand_1 = require("./baseCommand");
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
class WindowSetRolloByWeatherStatusCommand extends baseCommand_1.BaseCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the desired position of the shutter of a window based on the weather status
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param reason - You can provide a reason for clarification
|
|
11
|
+
*/
|
|
8
12
|
constructor(source, reason = '') {
|
|
9
13
|
super(source, reason);
|
|
10
14
|
this._commandType = commandType_1.CommandType.WindowSetRolloByWeatherStatusCommand;
|
|
@@ -7,6 +7,13 @@ export declare class ActuatorSetStateCommand extends BaseCommand {
|
|
|
7
7
|
readonly on: boolean;
|
|
8
8
|
timeout: number;
|
|
9
9
|
_commandType: CommandType;
|
|
10
|
+
/**
|
|
11
|
+
* Command to set the state of an actuator
|
|
12
|
+
* @param source - The source of the command
|
|
13
|
+
* @param on - The new state of the actuator
|
|
14
|
+
* @param reason - You can provide a reason for clarification
|
|
15
|
+
* @param timeout - If provided, the device automatic will be turned off for the given time in ms
|
|
16
|
+
*/
|
|
10
17
|
constructor(source: CommandSource | BaseCommand, on: boolean, reason?: string, timeout?: number);
|
|
11
18
|
get logMessage(): string;
|
|
12
19
|
static byActuatorAndToggleCommand(device: iActuator, c: ActuatorToggleCommand): ActuatorSetStateCommand;
|
|
@@ -4,7 +4,13 @@ exports.ActuatorSetStateCommand = void 0;
|
|
|
4
4
|
const baseCommand_1 = require("./baseCommand");
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
class ActuatorSetStateCommand extends baseCommand_1.BaseCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the state of an actuator
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param on - The new state of the actuator
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
* @param timeout - If provided, the device automatic will be turned off for the given time in ms
|
|
13
|
+
*/
|
|
8
14
|
constructor(source, on, reason = '', timeout = -1) {
|
|
9
15
|
super(source, reason);
|
|
10
16
|
this.on = on;
|
|
@@ -3,6 +3,11 @@ import { BaseCommand } from './baseCommand';
|
|
|
3
3
|
import { CommandSource } from './commandSource';
|
|
4
4
|
export declare class ActuatorToggleCommand extends BaseCommand {
|
|
5
5
|
_commandType: CommandType;
|
|
6
|
+
/**
|
|
7
|
+
* Command to toggle the state of an actuator
|
|
8
|
+
* @param source - The source of the command
|
|
9
|
+
* @param reason - You can provide a reason for clarification
|
|
10
|
+
*/
|
|
6
11
|
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
7
12
|
get logMessage(): string;
|
|
8
13
|
}
|
|
@@ -4,7 +4,11 @@ exports.ActuatorToggleCommand = void 0;
|
|
|
4
4
|
const commandType_1 = require("./commandType");
|
|
5
5
|
const baseCommand_1 = require("./baseCommand");
|
|
6
6
|
class ActuatorToggleCommand extends baseCommand_1.BaseCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to toggle the state of an actuator
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param reason - You can provide a reason for clarification
|
|
11
|
+
*/
|
|
8
12
|
constructor(source, reason = '') {
|
|
9
13
|
super(source, reason);
|
|
10
14
|
this._commandType = commandType_1.CommandType.ActuatorToggleCommand;
|
|
@@ -4,6 +4,12 @@ import { CommandSource } from './commandSource';
|
|
|
4
4
|
export declare class ActuatorWriteStateToDeviceCommand extends BaseCommand {
|
|
5
5
|
readonly stateValue: boolean;
|
|
6
6
|
_commandType: CommandType;
|
|
7
|
+
/**
|
|
8
|
+
* Command to write the state of an actuator to the device
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param stateValue - The new state of the actuator
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
*/
|
|
7
13
|
constructor(source: CommandSource | BaseCommand, stateValue: boolean, reason?: string);
|
|
8
14
|
get logMessage(): string;
|
|
9
15
|
}
|
|
@@ -5,7 +5,12 @@ const baseCommand_1 = require("./baseCommand");
|
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
const actuatorSetStateCommand_1 = require("./actuatorSetStateCommand");
|
|
7
7
|
class ActuatorWriteStateToDeviceCommand extends baseCommand_1.BaseCommand {
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Command to write the state of an actuator to the device
|
|
10
|
+
* @param source - The source of the command
|
|
11
|
+
* @param stateValue - The new state of the actuator
|
|
12
|
+
* @param reason - You can provide a reason for clarification
|
|
13
|
+
*/
|
|
9
14
|
constructor(source, stateValue, reason = '') {
|
|
10
15
|
super(source, reason);
|
|
11
16
|
this.stateValue = stateValue;
|
|
@@ -5,6 +5,16 @@ export declare abstract class BaseCommand {
|
|
|
5
5
|
readonly reason: string;
|
|
6
6
|
readonly timestamp: Date;
|
|
7
7
|
abstract _commandType: CommandType;
|
|
8
|
+
/**
|
|
9
|
+
* If set, this will be used in regards to checking if this is a force/manual/automatic action.
|
|
10
|
+
* @type {CommandSource | undefined} The source of the command
|
|
11
|
+
*/
|
|
12
|
+
overrideCommandSource: CommandSource | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Base class for all commands
|
|
15
|
+
* @param source - The source of the command
|
|
16
|
+
* @param reason - You can provide a reason for clarification
|
|
17
|
+
*/
|
|
8
18
|
protected constructor(source?: CommandSource | BaseCommand, reason?: string);
|
|
9
19
|
get isAutomaticAction(): boolean;
|
|
10
20
|
get isForceAction(): boolean;
|
|
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BaseCommand = void 0;
|
|
4
4
|
const commandSource_1 = require("./commandSource");
|
|
5
5
|
class BaseCommand {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Base class for all commands
|
|
8
|
+
* @param source - The source of the command
|
|
9
|
+
* @param reason - You can provide a reason for clarification
|
|
10
|
+
*/
|
|
7
11
|
constructor(source = commandSource_1.CommandSource.Unknown, reason = '') {
|
|
8
12
|
this.source = source;
|
|
9
13
|
this.reason = reason;
|
|
@@ -16,18 +20,29 @@ class BaseCommand {
|
|
|
16
20
|
return this.source === commandSource_1.CommandSource.Automatic;
|
|
17
21
|
}
|
|
18
22
|
get isForceAction() {
|
|
23
|
+
if (this.overrideCommandSource !== undefined) {
|
|
24
|
+
return (this.overrideCommandSource === commandSource_1.CommandSource.Manual ||
|
|
25
|
+
this.overrideCommandSource === commandSource_1.CommandSource.API ||
|
|
26
|
+
this.overrideCommandSource === commandSource_1.CommandSource.Force);
|
|
27
|
+
}
|
|
19
28
|
if (this.source instanceof BaseCommand) {
|
|
20
29
|
return this.source.isForceAction;
|
|
21
30
|
}
|
|
22
31
|
return (this.source === commandSource_1.CommandSource.Manual || this.source === commandSource_1.CommandSource.API || this.source === commandSource_1.CommandSource.Force);
|
|
23
32
|
}
|
|
24
33
|
get isManual() {
|
|
34
|
+
if (this.overrideCommandSource !== undefined) {
|
|
35
|
+
return this.overrideCommandSource === commandSource_1.CommandSource.Manual || this.overrideCommandSource === commandSource_1.CommandSource.API;
|
|
36
|
+
}
|
|
25
37
|
if (this.source instanceof BaseCommand) {
|
|
26
38
|
return this.source.isManual;
|
|
27
39
|
}
|
|
28
40
|
return this.source === commandSource_1.CommandSource.Manual || this.source === commandSource_1.CommandSource.API;
|
|
29
41
|
}
|
|
30
42
|
get isInitial() {
|
|
43
|
+
if (this.overrideCommandSource !== undefined) {
|
|
44
|
+
return this.overrideCommandSource === commandSource_1.CommandSource.Initial;
|
|
45
|
+
}
|
|
31
46
|
if (this.source instanceof BaseCommand) {
|
|
32
47
|
return this.source.isInitial;
|
|
33
48
|
}
|
|
@@ -8,10 +8,10 @@ export declare class BlockAutomaticCommand extends BaseCommand {
|
|
|
8
8
|
_commandType: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Command to disable automatic actions for a specific duration.
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param reason You can provide an individual reason here for debugging purpose.
|
|
14
|
-
* @param
|
|
11
|
+
* @param source - The source of the command.
|
|
12
|
+
* @param durationMS - The duration in milliseconds for the automatic actions to be disabled.
|
|
13
|
+
* @param reason - You can provide an individual reason here for debugging purpose.
|
|
14
|
+
* @param onCollideAction - The action to take if a block is already active. --> Default: overrideIfGreater
|
|
15
15
|
*/
|
|
16
16
|
constructor(source: CommandSource | BaseCommand, durationMS: number, reason?: string, onCollideAction?: CollisionSolving);
|
|
17
17
|
}
|
|
@@ -7,10 +7,10 @@ const baseCommand_1 = require("./baseCommand");
|
|
|
7
7
|
class BlockAutomaticCommand extends baseCommand_1.BaseCommand {
|
|
8
8
|
/**
|
|
9
9
|
* Command to disable automatic actions for a specific duration.
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param reason You can provide an individual reason here for debugging purpose.
|
|
13
|
-
* @param
|
|
10
|
+
* @param source - The source of the command.
|
|
11
|
+
* @param durationMS - The duration in milliseconds for the automatic actions to be disabled.
|
|
12
|
+
* @param reason - You can provide an individual reason here for debugging purpose.
|
|
13
|
+
* @param onCollideAction - The action to take if a block is already active. --> Default: overrideIfGreater
|
|
14
14
|
*/
|
|
15
15
|
constructor(source, durationMS, reason = '', onCollideAction = collisionSolving_1.CollisionSolving.overrideIfGreater) {
|
|
16
16
|
super(source, reason);
|
|
@@ -5,8 +5,8 @@ export declare class BlockAutomaticLiftBlockCommand extends BaseCommand {
|
|
|
5
5
|
_commandType: CommandType;
|
|
6
6
|
/**
|
|
7
7
|
* Command to lift a block --> Restore the automatic actions.
|
|
8
|
-
* @param
|
|
9
|
-
* @param
|
|
8
|
+
* @param source - The source of the command.
|
|
9
|
+
* @param reason - You can provide an individual reason here for debugging purpose.
|
|
10
10
|
*/
|
|
11
11
|
constructor(source: CommandSource | BaseCommand, reason?: string);
|
|
12
12
|
}
|
|
@@ -6,8 +6,8 @@ const baseCommand_1 = require("./baseCommand");
|
|
|
6
6
|
class BlockAutomaticLiftBlockCommand extends baseCommand_1.BaseCommand {
|
|
7
7
|
/**
|
|
8
8
|
* Command to lift a block --> Restore the automatic actions.
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
9
|
+
* @param source - The source of the command.
|
|
10
|
+
* @param reason - You can provide an individual reason here for debugging purpose.
|
|
11
11
|
*/
|
|
12
12
|
constructor(source, reason = '') {
|
|
13
13
|
super(source, reason);
|
|
@@ -8,10 +8,10 @@ export declare class BlockAutomaticUntilCommand extends BaseCommand {
|
|
|
8
8
|
_commandType: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Command to disable automatic actions until a specific date.
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param reason You can provide an individual reason here for debugging purpose.
|
|
14
|
-
* @param
|
|
11
|
+
* @param source - The source of the command.
|
|
12
|
+
* @param targetDate - The date until the automatic actions will be disabled.
|
|
13
|
+
* @param reason - You can provide an individual reason here for debugging purpose.
|
|
14
|
+
* @param onCollideAction - The action to take if a block is already active. --> Default: overrideIfGreater
|
|
15
15
|
*/
|
|
16
16
|
constructor(source: CommandSource | BaseCommand, targetDate: Date, reason?: string, onCollideAction?: CollisionSolving);
|
|
17
17
|
}
|
|
@@ -7,10 +7,10 @@ const baseCommand_1 = require("./baseCommand");
|
|
|
7
7
|
class BlockAutomaticUntilCommand extends baseCommand_1.BaseCommand {
|
|
8
8
|
/**
|
|
9
9
|
* Command to disable automatic actions until a specific date.
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param reason You can provide an individual reason here for debugging purpose.
|
|
13
|
-
* @param
|
|
10
|
+
* @param source - The source of the command.
|
|
11
|
+
* @param targetDate - The date until the automatic actions will be disabled.
|
|
12
|
+
* @param reason - You can provide an individual reason here for debugging purpose.
|
|
13
|
+
* @param onCollideAction - The action to take if a block is already active. --> Default: overrideIfGreater
|
|
14
14
|
*/
|
|
15
15
|
constructor(source, targetDate, reason = '', onCollideAction = collisionSolving_1.CollisionSolving.overrideIfGreater) {
|
|
16
16
|
super(source, reason);
|
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
export declare enum CommandSource {
|
|
2
|
+
/**
|
|
3
|
+
* In case of unclear command stack/source this should be used.
|
|
4
|
+
*/
|
|
2
5
|
Unknown = 0,
|
|
6
|
+
/**
|
|
7
|
+
* This should mark all startup commands, as this allows devices to treat this correctly.
|
|
8
|
+
*/
|
|
3
9
|
Initial = 1,
|
|
10
|
+
/**
|
|
11
|
+
* This should mark all commands that are executed as an automatic response to a certain action/change.
|
|
12
|
+
*/
|
|
4
13
|
Automatic = 2,
|
|
14
|
+
/**
|
|
15
|
+
* This should mark all commands that are executed by a user thus having a higher priority than other automatic commands.
|
|
16
|
+
*/
|
|
5
17
|
Manual = 3,
|
|
18
|
+
/**
|
|
19
|
+
* This should mark all commands that are executed by an API call.
|
|
20
|
+
* !WARNING! API could be an automatic call, but also a manual call e.g. using hoffmation-ios or homebridge-hoffmation --> So this is a higher priority than Automatic but still lower than manual/force.
|
|
21
|
+
*/
|
|
6
22
|
API = 4,
|
|
23
|
+
/**
|
|
24
|
+
* This should mark all commands that have highest priority, thus overruling/ignoring certain controls/safety mechanisms.
|
|
25
|
+
*/
|
|
7
26
|
Force = 5
|
|
8
27
|
}
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommandSource = void 0;
|
|
4
|
-
//
|
|
4
|
+
// Definition: Enum for command source.
|
|
5
5
|
var CommandSource;
|
|
6
6
|
(function (CommandSource) {
|
|
7
|
+
/**
|
|
8
|
+
* In case of unclear command stack/source this should be used.
|
|
9
|
+
*/
|
|
7
10
|
CommandSource[CommandSource["Unknown"] = 0] = "Unknown";
|
|
11
|
+
/**
|
|
12
|
+
* This should mark all startup commands, as this allows devices to treat this correctly.
|
|
13
|
+
*/
|
|
8
14
|
CommandSource[CommandSource["Initial"] = 1] = "Initial";
|
|
15
|
+
/**
|
|
16
|
+
* This should mark all commands that are executed as an automatic response to a certain action/change.
|
|
17
|
+
*/
|
|
9
18
|
CommandSource[CommandSource["Automatic"] = 2] = "Automatic";
|
|
19
|
+
/**
|
|
20
|
+
* This should mark all commands that are executed by a user thus having a higher priority than other automatic commands.
|
|
21
|
+
*/
|
|
10
22
|
CommandSource[CommandSource["Manual"] = 3] = "Manual";
|
|
23
|
+
/**
|
|
24
|
+
* This should mark all commands that are executed by an API call.
|
|
25
|
+
* !WARNING! API could be an automatic call, but also a manual call e.g. using hoffmation-ios or homebridge-hoffmation --> So this is a higher priority than Automatic but still lower than manual/force.
|
|
26
|
+
*/
|
|
11
27
|
CommandSource[CommandSource["API"] = 4] = "API";
|
|
28
|
+
/**
|
|
29
|
+
* This should mark all commands that have highest priority, thus overruling/ignoring certain controls/safety mechanisms.
|
|
30
|
+
*/
|
|
12
31
|
CommandSource[CommandSource["Force"] = 5] = "Force";
|
|
13
32
|
})(CommandSource || (exports.CommandSource = CommandSource = {}));
|
|
@@ -9,12 +9,13 @@ export declare class DimmerSetLightCommand extends LampSetLightCommand {
|
|
|
9
9
|
transitionTime: number;
|
|
10
10
|
_commandType: CommandType;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
16
|
-
* @param
|
|
17
|
-
* @param
|
|
12
|
+
* Command to change the light of a dimmer
|
|
13
|
+
* @param source - The source of the command
|
|
14
|
+
* @param on - The desired value
|
|
15
|
+
* @param reason - You can provide a reason for clarity
|
|
16
|
+
* @param timeout - A chosen Timeout after which the light should be reset
|
|
17
|
+
* @param brightness - The desired brightness
|
|
18
|
+
* @param transitionTime - The transition time during turnOn/turnOff
|
|
18
19
|
*/
|
|
19
20
|
constructor(source: CommandSource | BaseCommand, on: boolean, reason?: string, timeout?: number, brightness?: number, transitionTime?: number);
|
|
20
21
|
get logMessage(): string;
|
|
@@ -6,12 +6,13 @@ const commandType_1 = require("./commandType");
|
|
|
6
6
|
const timeCallback_1 = require("../timeCallback");
|
|
7
7
|
class DimmerSetLightCommand extends lampSetLightCommand_1.LampSetLightCommand {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
9
|
+
* Command to change the light of a dimmer
|
|
10
|
+
* @param source - The source of the command
|
|
11
|
+
* @param on - The desired value
|
|
12
|
+
* @param reason - You can provide a reason for clarity
|
|
13
|
+
* @param timeout - A chosen Timeout after which the light should be reset
|
|
14
|
+
* @param brightness - The desired brightness
|
|
15
|
+
* @param transitionTime - The transition time during turnOn/turnOff
|
|
15
16
|
*/
|
|
16
17
|
constructor(source, on, reason = '', timeout = -1, brightness = -1, transitionTime = -1) {
|
|
17
18
|
super(source, on, reason, timeout);
|
|
@@ -7,10 +7,10 @@ export declare class FloorSetAllShuttersCommand extends BaseCommand {
|
|
|
7
7
|
_commandType: CommandType;
|
|
8
8
|
/**
|
|
9
9
|
* Creates an instance of FloorSetAllShuttersCommand.
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
10
|
+
* @param source - The source of the command
|
|
11
|
+
* @param position - (0 closed, 100 open)
|
|
12
|
+
* @param specificFloor - undefined = all floors
|
|
13
|
+
* @param reason - You can provide a reason for clarity
|
|
14
14
|
*/
|
|
15
15
|
constructor(source: CommandSource | BaseCommand, position: number, specificFloor?: number | undefined, reason?: string);
|
|
16
16
|
}
|
|
@@ -6,10 +6,10 @@ const commandType_1 = require("./commandType");
|
|
|
6
6
|
class FloorSetAllShuttersCommand extends baseCommand_1.BaseCommand {
|
|
7
7
|
/**
|
|
8
8
|
* Creates an instance of FloorSetAllShuttersCommand.
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param position - (0 closed, 100 open)
|
|
11
|
+
* @param specificFloor - undefined = all floors
|
|
12
|
+
* @param reason - You can provide a reason for clarity
|
|
13
13
|
*/
|
|
14
14
|
constructor(source, position, specificFloor = undefined, reason = '') {
|
|
15
15
|
super(source, reason);
|
|
@@ -4,6 +4,13 @@ import { BaseCommand } from './baseCommand';
|
|
|
4
4
|
import { ActuatorSetStateCommand } from './actuatorSetStateCommand';
|
|
5
5
|
export declare class LampSetLightCommand extends ActuatorSetStateCommand {
|
|
6
6
|
_commandType: CommandType;
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the light of a lamp
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param on - The new state of the light
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
* @param timeout - If provided, the device automatic will be turned off for the given time in ms --> Reverts to automatic after the timeout.
|
|
13
|
+
*/
|
|
7
14
|
constructor(source: CommandSource | BaseCommand, on: boolean, reason?: string, timeout?: number);
|
|
8
15
|
get logMessage(): string;
|
|
9
16
|
}
|
|
@@ -4,7 +4,13 @@ exports.LampSetLightCommand = void 0;
|
|
|
4
4
|
const commandType_1 = require("./commandType");
|
|
5
5
|
const actuatorSetStateCommand_1 = require("./actuatorSetStateCommand");
|
|
6
6
|
class LampSetLightCommand extends actuatorSetStateCommand_1.ActuatorSetStateCommand {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Command to set the light of a lamp
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param on - The new state of the light
|
|
11
|
+
* @param reason - You can provide a reason for clarification
|
|
12
|
+
* @param timeout - If provided, the device automatic will be turned off for the given time in ms --> Reverts to automatic after the timeout.
|
|
13
|
+
*/
|
|
8
14
|
constructor(source, on, reason = '', timeout = -1) {
|
|
9
15
|
super(source, on, reason, timeout);
|
|
10
16
|
this._commandType = commandType_1.CommandType.LampSetLightCommand;
|
|
@@ -8,10 +8,10 @@ export declare class LampSetTimeBasedCommand extends BaseCommand {
|
|
|
8
8
|
_commandType: CommandType;
|
|
9
9
|
/**
|
|
10
10
|
* Set's the lamp based on lamp settings for the current time
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
13
|
-
* @param reason
|
|
14
|
-
* @param
|
|
11
|
+
* @param source - The source of the command
|
|
12
|
+
* @param time - The time to use for calculation of desired state
|
|
13
|
+
* @param reason - You can provide a reason for clarity
|
|
14
|
+
* @param timeout - If > 0 this is the time after which the lamp reverts to its original state
|
|
15
15
|
*/
|
|
16
16
|
constructor(source: CommandSource | BaseCommand, time: TimeOfDay, reason?: string, timeout?: number);
|
|
17
17
|
get logMessage(): string;
|
|
@@ -7,10 +7,10 @@ const timeCallback_1 = require("../timeCallback");
|
|
|
7
7
|
class LampSetTimeBasedCommand extends baseCommand_1.BaseCommand {
|
|
8
8
|
/**
|
|
9
9
|
* Set's the lamp based on lamp settings for the current time
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param reason
|
|
13
|
-
* @param
|
|
10
|
+
* @param source - The source of the command
|
|
11
|
+
* @param time - The time to use for calculation of desired state
|
|
12
|
+
* @param reason - You can provide a reason for clarity
|
|
13
|
+
* @param timeout - If > 0 this is the time after which the lamp reverts to its original state
|
|
14
14
|
*/
|
|
15
15
|
constructor(source, time, reason = '', timeout = -1) {
|
|
16
16
|
super(source, reason);
|
|
@@ -8,11 +8,11 @@ export declare class LampToggleLightCommand extends ActuatorToggleCommand {
|
|
|
8
8
|
readonly calculateTime: boolean;
|
|
9
9
|
_commandType: CommandType;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @param
|
|
11
|
+
* Command to toggle the light-state of a lamp
|
|
12
|
+
* @param source - The source of the command
|
|
13
|
+
* @param reason - You can provide a reason for clarity
|
|
14
|
+
* @param time - The time to use for calculation of desired state
|
|
15
|
+
* @param calculateTime - Alternative to "time", if set the time will be calculated by the lamps room and its settings
|
|
16
16
|
*/
|
|
17
17
|
constructor(source: CommandSource | BaseCommand, reason?: string, time?: TimeOfDay | undefined, calculateTime?: boolean);
|
|
18
18
|
get logMessage(): string;
|
|
@@ -5,11 +5,11 @@ const actuatorToggleCommand_1 = require("./actuatorToggleCommand");
|
|
|
5
5
|
const commandType_1 = require("./commandType");
|
|
6
6
|
class LampToggleLightCommand extends actuatorToggleCommand_1.ActuatorToggleCommand {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
* @param
|
|
8
|
+
* Command to toggle the light-state of a lamp
|
|
9
|
+
* @param source - The source of the command
|
|
10
|
+
* @param reason - You can provide a reason for clarity
|
|
11
|
+
* @param time - The time to use for calculation of desired state
|
|
12
|
+
* @param calculateTime - Alternative to "time", if set the time will be calculated by the lamps room and its settings
|
|
13
13
|
*/
|
|
14
14
|
constructor(source, reason = '', time, calculateTime = false) {
|
|
15
15
|
super(source, reason);
|