hoffmation-base 3.0.0-alpha.20 → 3.0.0-alpha.21
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 +2 -2
- 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
|
@@ -2,26 +2,122 @@ import { ButtonPressType, iAcDevice, iActuator, iBaseDevice, iBatteryDevice, iBu
|
|
|
2
2
|
import { CountToday, DesiredShutterPosition, EnergyCalculation, RoomBase, ShutterCalibration } from '../../../models';
|
|
3
3
|
export interface iPersist {
|
|
4
4
|
initialized: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Adds a room to the database
|
|
7
|
+
* @param {RoomBase} room - The room to add
|
|
8
|
+
*/
|
|
5
9
|
addRoom(room: RoomBase): void;
|
|
10
|
+
/**
|
|
11
|
+
* Adds a device to the database
|
|
12
|
+
* @param {iBaseDevice} device - The device to add
|
|
13
|
+
*/
|
|
6
14
|
addDevice(device: iBaseDevice): void;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the count of the motion sensor today
|
|
17
|
+
* @param {iMotionSensor} device - The device to get the count for
|
|
18
|
+
* @returns {Promise<CountToday>} - The count of the motion sensor today
|
|
19
|
+
*/
|
|
7
20
|
motionSensorTodayCount(device: iMotionSensor): Promise<CountToday>;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the last desired position of the shutter
|
|
23
|
+
* @param {iShutter} device - The device to get the last desired position for
|
|
24
|
+
* @returns {Promise<DesiredShutterPosition>} - The last desired position of the shutter
|
|
25
|
+
*/
|
|
8
26
|
getLastDesiredPosition(device: iShutter): Promise<DesiredShutterPosition>;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the shutter calibration
|
|
29
|
+
* @param {iShutter} device - The device to get the shutter calibration for
|
|
30
|
+
* @returns {Promise<ShutterCalibration>} - The shutter calibration
|
|
31
|
+
*/
|
|
9
32
|
getShutterCalibration(device: iShutter): Promise<ShutterCalibration>;
|
|
33
|
+
/**
|
|
34
|
+
* Initializes the database-connection and prepares the database
|
|
35
|
+
* @returns {Promise<void>} - The promise that resolves when the database is initialized
|
|
36
|
+
*/
|
|
10
37
|
initialize(): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Persists the shutter calibration
|
|
40
|
+
* @param {ShutterCalibration} data - The shutter calibration data to persist
|
|
41
|
+
*/
|
|
11
42
|
persistShutterCalibration(data: ShutterCalibration): void;
|
|
43
|
+
/**
|
|
44
|
+
* Persists data for an illumination sensor
|
|
45
|
+
* @param {iIlluminationSensor} device - The device to persist data for
|
|
46
|
+
*/
|
|
12
47
|
persistIlluminationSensor(device: iIlluminationSensor): void;
|
|
48
|
+
/**
|
|
49
|
+
* Persists data for an energy manager
|
|
50
|
+
* @param {EnergyCalculation} energyData - The energy data to persist
|
|
51
|
+
*/
|
|
13
52
|
persistEnergyManager(energyData: EnergyCalculation): void;
|
|
53
|
+
/**
|
|
54
|
+
* Persists data of an AC device
|
|
55
|
+
* @param {iAcDevice} device - The device to persist data for
|
|
56
|
+
*/
|
|
14
57
|
persistAC(device: iAcDevice): void;
|
|
58
|
+
/**
|
|
59
|
+
* Persists data of an actuator
|
|
60
|
+
* @param {iActuator} device - The device to persist data for
|
|
61
|
+
*/
|
|
15
62
|
persistActuator(device: iActuator): void;
|
|
63
|
+
/**
|
|
64
|
+
* Persists data of a heater
|
|
65
|
+
* @param {iHeater} device - The device to persist data for
|
|
66
|
+
*/
|
|
16
67
|
persistHeater(device: iHeater): void;
|
|
68
|
+
/**
|
|
69
|
+
* Persists data of a motion sensor
|
|
70
|
+
* @param {iMotionSensor} device - The device to persist data for
|
|
71
|
+
*/
|
|
17
72
|
persistMotionSensor(device: iMotionSensor): void;
|
|
73
|
+
/**
|
|
74
|
+
* Persists data of a button switch action
|
|
75
|
+
* @param {iButtonSwitch} device - The device to persist data for
|
|
76
|
+
* @param {ButtonPressType} pressType - The type of button press
|
|
77
|
+
* @param {string} buttonName - The name of the button
|
|
78
|
+
*/
|
|
18
79
|
persistSwitchInput(device: iButtonSwitch, pressType: ButtonPressType, buttonName: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Persists data of a shutter
|
|
82
|
+
* @param {iShutter} device - The device to persist data for
|
|
83
|
+
*/
|
|
19
84
|
persistShutter(device: iShutter): void;
|
|
85
|
+
/**
|
|
86
|
+
* Persists data of a temperature sensor
|
|
87
|
+
* @param {iTemperatureSensor} device - The device to persist data for
|
|
88
|
+
*/
|
|
20
89
|
persistTemperatureSensor(device: iTemperatureSensor): void;
|
|
90
|
+
/**
|
|
91
|
+
* Persists data of a humidity sensor
|
|
92
|
+
* @param {iHumiditySensor} device - The device to persist data for
|
|
93
|
+
*/
|
|
21
94
|
persistHumiditySensor(device: iHumiditySensor): void;
|
|
95
|
+
/**
|
|
96
|
+
* Persists data of a handle sensor
|
|
97
|
+
* @param {iHandleSensor} device - The device to persist data for
|
|
98
|
+
*/
|
|
22
99
|
persistHandleSensor(device: iHandleSensor): void;
|
|
100
|
+
/**
|
|
101
|
+
* Persists data of a battery device
|
|
102
|
+
* @param {iBatteryDevice} device - The device to persist data for
|
|
103
|
+
*/
|
|
23
104
|
persistBatteryDevice(device: iBatteryDevice): void;
|
|
105
|
+
/**
|
|
106
|
+
* Persists data of a Zigbee device
|
|
107
|
+
* @param {ZigbeeDevice} device - The device to persist data for
|
|
108
|
+
*/
|
|
24
109
|
persistZigbeeDevice(device: ZigbeeDevice): void;
|
|
110
|
+
/**
|
|
111
|
+
* Persists settings for the given id
|
|
112
|
+
* @param {string} id - The id to persist settings for
|
|
113
|
+
* @param {string} settings - The settings to persist (as JSON string)
|
|
114
|
+
* @param {string} customname - The custom name of the device/object
|
|
115
|
+
*/
|
|
25
116
|
persistSettings(id: string, settings: string, customname: string): void;
|
|
117
|
+
/**
|
|
118
|
+
* Loads settings for the given id
|
|
119
|
+
* @param {string} id - The id of the object/device to load settings for
|
|
120
|
+
* @returns {Promise<string | undefined>} - The settings as JSON string or undefined if not found
|
|
121
|
+
*/
|
|
26
122
|
loadSettings(id: string): Promise<string | undefined>;
|
|
27
123
|
}
|
|
@@ -4,8 +4,9 @@ export declare class HTTPSService {
|
|
|
4
4
|
/**
|
|
5
5
|
* Downloads a file from a given url to the given location.
|
|
6
6
|
* If the location doesn't exist, it will be created quietly.
|
|
7
|
-
* @param url URL to download file from
|
|
8
|
-
* @param filePath Path to save file to
|
|
7
|
+
* @param url - URL to download file from
|
|
8
|
+
* @param filePath - Path to save file to
|
|
9
|
+
* @returns A promise that resolves to true if the file was downloaded successfully, false otherwise
|
|
9
10
|
*/
|
|
10
11
|
static downloadFile(url: string, filePath: string): Promise<boolean>;
|
|
11
12
|
private static defaultCallback;
|
|
@@ -65,8 +65,9 @@ class HTTPSService {
|
|
|
65
65
|
/**
|
|
66
66
|
* Downloads a file from a given url to the given location.
|
|
67
67
|
* If the location doesn't exist, it will be created quietly.
|
|
68
|
-
* @param url URL to download file from
|
|
69
|
-
* @param filePath Path to save file to
|
|
68
|
+
* @param url - URL to download file from
|
|
69
|
+
* @param filePath - Path to save file to
|
|
70
|
+
* @returns A promise that resolves to true if the file was downloaded successfully, false otherwise
|
|
70
71
|
*/
|
|
71
72
|
static async downloadFile(url, filePath) {
|
|
72
73
|
return new Promise((resolve, reject) => {
|
|
@@ -17,8 +17,8 @@ export declare class ServerLogService {
|
|
|
17
17
|
static missingRoomIndexHandling(pRoomName: string, pIndex: number, pDeviceType: DeviceType): void;
|
|
18
18
|
/**
|
|
19
19
|
* Checks if this message is of a debugtype which should be skipped according to settings
|
|
20
|
-
* @param {LogDebugType}
|
|
21
|
-
* @returns
|
|
20
|
+
* @param debugType - {LogDebugType}
|
|
21
|
+
* @returns If the Message should be skipped
|
|
22
22
|
*/
|
|
23
23
|
private static checkDebugLogSkip;
|
|
24
24
|
}
|
|
@@ -60,8 +60,8 @@ class ServerLogService {
|
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Checks if this message is of a debugtype which should be skipped according to settings
|
|
63
|
-
* @param {LogDebugType}
|
|
64
|
-
* @returns
|
|
63
|
+
* @param debugType - {LogDebugType}
|
|
64
|
+
* @returns If the Message should be skipped
|
|
65
65
|
*/
|
|
66
66
|
static checkDebugLogSkip(debugType) {
|
|
67
67
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -25,17 +25,16 @@ export declare class NewsService {
|
|
|
25
25
|
static getLatestNews(): void;
|
|
26
26
|
/**
|
|
27
27
|
* Plays the latest news on a sonos device
|
|
28
|
-
* @param speaker Sonos device to play from
|
|
29
|
-
* @param volume volume to play at
|
|
30
|
-
* @param retries Number of times playing should be tried if there is currently no audio file available
|
|
28
|
+
* @param speaker - Sonos device to play from
|
|
29
|
+
* @param volume - volume to play at
|
|
30
|
+
* @param retries - Number of times playing should be tried if there is currently no audio file available
|
|
31
31
|
*/
|
|
32
32
|
static playLastNews(speaker: iSpeaker, volume?: number, retries?: number): void;
|
|
33
33
|
private static downloadLatestFileFromFeed;
|
|
34
34
|
/**
|
|
35
35
|
* Deletes all files in the given directory that are older than the given age.
|
|
36
|
-
* @param rootDir Directory to search in
|
|
37
|
-
* @param keepMaxAge Maximum age in minutes until a file gets deleted
|
|
38
|
-
* @private
|
|
36
|
+
* @param rootDir - Directory to search in
|
|
37
|
+
* @param keepMaxAge - Maximum age in minutes until a file gets deleted
|
|
39
38
|
*/
|
|
40
39
|
private static cleanOldFiles;
|
|
41
40
|
}
|
|
@@ -96,9 +96,9 @@ class NewsService {
|
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Plays the latest news on a sonos device
|
|
99
|
-
* @param speaker Sonos device to play from
|
|
100
|
-
* @param volume volume to play at
|
|
101
|
-
* @param retries Number of times playing should be tried if there is currently no audio file available
|
|
99
|
+
* @param speaker - Sonos device to play from
|
|
100
|
+
* @param volume - volume to play at
|
|
101
|
+
* @param retries - Number of times playing should be tried if there is currently no audio file available
|
|
102
102
|
*/
|
|
103
103
|
static playLastNews(speaker, volume = 30, retries = 5) {
|
|
104
104
|
if (!NewsService.lastNewsAudioFile) {
|
|
@@ -167,9 +167,8 @@ class NewsService {
|
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Deletes all files in the given directory that are older than the given age.
|
|
170
|
-
* @param rootDir Directory to search in
|
|
171
|
-
* @param keepMaxAge Maximum age in minutes until a file gets deleted
|
|
172
|
-
* @private
|
|
170
|
+
* @param rootDir - Directory to search in
|
|
171
|
+
* @param keepMaxAge - Maximum age in minutes until a file gets deleted
|
|
173
172
|
*/
|
|
174
173
|
static cleanOldFiles(rootDir, keepMaxAge) {
|
|
175
174
|
let deleteCount = 0;
|
|
@@ -16,13 +16,14 @@ export declare class RoomService {
|
|
|
16
16
|
static getAllRoomsOfFloor(floor: number): IterableIterator<[string, RoomBase]>;
|
|
17
17
|
/**
|
|
18
18
|
* Moves all shutters of the desired floor(s) to the desired position
|
|
19
|
+
* @param c - the command to be executed on all windows of the desired floor(s)
|
|
19
20
|
*/
|
|
20
21
|
static setAllShutterOfFloor(c: FloorSetAllShuttersCommand): void;
|
|
21
22
|
/**
|
|
22
23
|
* Set ALl Lamps of a specific floor
|
|
23
24
|
* !!floor -1 sets all lamps in house instead!!
|
|
24
|
-
* @param floor the level on which all lamps shall be changed -1 equals all rooms
|
|
25
|
-
* @param command the command to be executed
|
|
25
|
+
* @param floor - {number} the level on which all lamps shall be changed -1 equals all rooms
|
|
26
|
+
* @param command - {ActuatorSetStateCommand} the command to be executed
|
|
26
27
|
*/
|
|
27
28
|
static setAllLampsOfFloor(floor: number, command: ActuatorSetStateCommand): void;
|
|
28
29
|
static clearAllAlarms(): void;
|
|
@@ -16,6 +16,7 @@ class RoomService {
|
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Moves all shutters of the desired floor(s) to the desired position
|
|
19
|
+
* @param c - the command to be executed on all windows of the desired floor(s)
|
|
19
20
|
*/
|
|
20
21
|
static setAllShutterOfFloor(c) {
|
|
21
22
|
var _a;
|
|
@@ -27,8 +28,8 @@ class RoomService {
|
|
|
27
28
|
/**
|
|
28
29
|
* Set ALl Lamps of a specific floor
|
|
29
30
|
* !!floor -1 sets all lamps in house instead!!
|
|
30
|
-
* @param floor the level on which all lamps shall be changed -1 equals all rooms
|
|
31
|
-
* @param command the command to be executed
|
|
31
|
+
* @param floor - {number} the level on which all lamps shall be changed -1 equals all rooms
|
|
32
|
+
* @param command - {ActuatorSetStateCommand} the command to be executed
|
|
32
33
|
*/
|
|
33
34
|
static setAllLampsOfFloor(floor, command) {
|
|
34
35
|
var _a, _b, _c, _d;
|
|
@@ -92,7 +93,7 @@ class RoomService {
|
|
|
92
93
|
}
|
|
93
94
|
static endAlarmModes() {
|
|
94
95
|
if (this.awayModeActive) {
|
|
95
|
-
Telegram_1.TelegramService.sendMessage(Telegram_1.TelegramService.subscribedIDs, `
|
|
96
|
+
Telegram_1.TelegramService.sendMessage(Telegram_1.TelegramService.subscribedIDs, `Alarm Mode disarmed`);
|
|
96
97
|
Sonos_1.SonosService.speakOnAll(Translation_1.Res.welcomeHome(), 35);
|
|
97
98
|
}
|
|
98
99
|
if (this.nightAlarmActive) {
|
|
@@ -8,8 +8,9 @@ export declare class SettingsService {
|
|
|
8
8
|
static get latitude(): number;
|
|
9
9
|
static get longitude(): number;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @returns
|
|
11
|
+
* Generates a fresh Test configuration.
|
|
12
|
+
* @returns The test configuration.
|
|
13
|
+
* @deprecated Only use in unit tests.
|
|
13
14
|
*/
|
|
14
15
|
static get testConfig(): iConfig;
|
|
15
16
|
}
|
|
@@ -37,8 +37,9 @@ class SettingsService {
|
|
|
37
37
|
return 7.097266042276687;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
* @returns
|
|
40
|
+
* Generates a fresh Test configuration.
|
|
41
|
+
* @returns The test configuration.
|
|
42
|
+
* @deprecated Only use in unit tests.
|
|
42
43
|
*/
|
|
43
44
|
static get testConfig() {
|
|
44
45
|
return {
|
|
@@ -29,7 +29,7 @@ export declare class VictronDevice implements iEnergyManager {
|
|
|
29
29
|
get injectingWattage(): number;
|
|
30
30
|
get drawingWattage(): number;
|
|
31
31
|
get selfConsumingWattage(): number;
|
|
32
|
-
|
|
32
|
+
dispose(): void;
|
|
33
33
|
getReport(): string;
|
|
34
34
|
recalculatePowerSharing(): void;
|
|
35
35
|
loadDeviceSettings(): void;
|
|
@@ -38,7 +38,7 @@ export declare class VictronDevice implements iEnergyManager {
|
|
|
38
38
|
toJSON(): Partial<VictronDevice>;
|
|
39
39
|
/**
|
|
40
40
|
* Changes the grid set point of the Victron device, to the desired value.
|
|
41
|
-
* @param
|
|
41
|
+
* @param setPoint - The desired watt point the system should aim for.
|
|
42
42
|
*/
|
|
43
43
|
setGridSetPoint(setPoint: number): void;
|
|
44
44
|
private calculateExcessEnergy;
|
|
@@ -73,7 +73,7 @@ class VictronDevice {
|
|
|
73
73
|
var _a;
|
|
74
74
|
return Math.max((_a = this.victronConsumer.data.system.power) !== null && _a !== void 0 ? _a : 0, 0) - this.drawingWattage;
|
|
75
75
|
}
|
|
76
|
-
|
|
76
|
+
dispose() {
|
|
77
77
|
this._victronConsumer.disconnect();
|
|
78
78
|
if (this._iDatabaseLoggerInterval !== null) {
|
|
79
79
|
clearInterval(this._iDatabaseLoggerInterval);
|
|
@@ -122,7 +122,7 @@ class VictronDevice {
|
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* Changes the grid set point of the Victron device, to the desired value.
|
|
125
|
-
* @param
|
|
125
|
+
* @param setPoint - The desired watt point the system should aim for.
|
|
126
126
|
*/
|
|
127
127
|
setGridSetPoint(setPoint) {
|
|
128
128
|
this._victronConsumer.setGridSetPoint(setPoint);
|
|
@@ -24,7 +24,6 @@ export declare class WeatherService {
|
|
|
24
24
|
static lastResponse: WeatherResponse;
|
|
25
25
|
/**
|
|
26
26
|
* The sun horizontal degree (0 is North)
|
|
27
|
-
* @type {number}
|
|
28
27
|
*/
|
|
29
28
|
static sunDirection: number;
|
|
30
29
|
private static _dataUpdateCbs;
|
|
@@ -46,5 +45,9 @@ export declare class WeatherService {
|
|
|
46
45
|
private static getActiveAlerts;
|
|
47
46
|
private static getWeatherData;
|
|
48
47
|
private static recalcAzimuth;
|
|
48
|
+
/**
|
|
49
|
+
* Method to calculate the hours until sunset based on the current location
|
|
50
|
+
* @returns - The hours until sunset
|
|
51
|
+
*/
|
|
49
52
|
private static hoursTilSunset;
|
|
50
53
|
}
|
|
@@ -218,6 +218,10 @@ class WeatherService {
|
|
|
218
218
|
180 +
|
|
219
219
|
(180 / Math.PI) * suncalc_1.default.getPosition(new Date(), parseFloat(this.latitude), parseFloat(this.longitude)).azimuth;
|
|
220
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Method to calculate the hours until sunset based on the current location
|
|
223
|
+
* @returns - The hours until sunset
|
|
224
|
+
*/
|
|
221
225
|
static hoursTilSunset() {
|
|
222
226
|
const now = new Date();
|
|
223
227
|
const sunset = time_callback_service_1.TimeCallbackService.getSunsetForDate(now, parseFloat(this.latitude), parseFloat(this.longitude));
|