homebridge-loxone-control 1.3.0 → 1.3.2
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/README.md +2 -2
- package/config.schema.json +1 -0
- package/dist/accessoryBase.d.ts +2 -3
- package/dist/accessoryBase.js +15 -15
- package/dist/accessoryBase.js.map +1 -1
- package/dist/blindsController.d.ts +3 -4
- package/dist/blindsController.js +194 -196
- package/dist/blindsController.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/loxone/loxoneWebinterface.d.ts +1 -2
- package/dist/loxone/loxoneWebinterface.js +41 -43
- package/dist/loxone/loxoneWebinterface.js.map +1 -1
- package/dist/loxone/scripts/comps.js-v15.0.1.js +1 -0
- package/dist/loxone/types.d.ts +0 -1
- package/dist/loxone/types.js +1 -2
- package/dist/loxone/utils/getBlindsTiming.d.ts +1 -2
- package/dist/loxone/utils/getBlindsTiming.js +7 -11
- package/dist/loxone/utils/getBlindsTiming.js.map +1 -1
- package/dist/loxone/utils/getTiltPositionFromTransforms.d.ts +1 -2
- package/dist/loxone/utils/getTiltPositionFromTransforms.js +5 -9
- package/dist/loxone/utils/getTiltPositionFromTransforms.js.map +1 -1
- package/dist/loxone/utils/sendCommand.d.ts +1 -2
- package/dist/loxone/utils/sendCommand.js +5 -9
- package/dist/loxone/utils/sendCommand.js.map +1 -1
- package/dist/loxone/utils/sleep.d.ts +0 -1
- package/dist/loxone/utils/sleep.js +1 -5
- package/dist/loxone/utils/sleep.js.map +1 -1
- package/dist/loxone/utils/split.d.ts +0 -1
- package/dist/loxone/utils/split.js +2 -7
- package/dist/loxone/utils/split.js.map +1 -1
- package/dist/loxone/utils/toPositive.d.ts +0 -1
- package/dist/loxone/utils/toPositive.js +1 -5
- package/dist/loxone/utils/toPositive.js.map +1 -1
- package/dist/platform.d.ts +23 -18
- package/dist/platform.js +142 -132
- package/dist/platform.js.map +1 -1
- package/dist/platformFanAccessory.d.ts +3 -4
- package/dist/platformFanAccessory.js +44 -49
- package/dist/platformFanAccessory.js.map +1 -1
- package/dist/platformLightAccessory.d.ts +3 -4
- package/dist/platformLightAccessory.js +28 -34
- package/dist/platformLightAccessory.js.map +1 -1
- package/dist/platformOutletAccessory.d.ts +3 -4
- package/dist/platformOutletAccessory.js +33 -37
- package/dist/platformOutletAccessory.js.map +1 -1
- package/dist/platformTemperatureAccessory.d.ts +3 -4
- package/dist/platformTemperatureAccessory.js +15 -18
- package/dist/platformTemperatureAccessory.js.map +1 -1
- package/dist/platformWindowCoveringAccessory.d.ts +3 -4
- package/dist/platformWindowCoveringAccessory.js +97 -101
- package/dist/platformWindowCoveringAccessory.js.map +1 -1
- package/dist/settings.d.ts +0 -1
- package/dist/settings.js +2 -5
- package/dist/settings.js.map +1 -1
- package/package.json +25 -19
- package/dist/accessoryBase.d.ts.map +0 -1
- package/dist/blindsController.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/loxone/loxoneWebinterface.d.ts.map +0 -1
- package/dist/loxone/types.d.ts.map +0 -1
- package/dist/loxone/utils/getBlindsTiming.d.ts.map +0 -1
- package/dist/loxone/utils/getTiltPositionFromTransforms.d.ts.map +0 -1
- package/dist/loxone/utils/sendCommand.d.ts.map +0 -1
- package/dist/loxone/utils/sleep.d.ts.map +0 -1
- package/dist/loxone/utils/split.d.ts.map +0 -1
- package/dist/loxone/utils/toPositive.d.ts.map +0 -1
- package/dist/platform.d.ts.map +0 -1
- package/dist/platformFanAccessory.d.ts.map +0 -1
- package/dist/platformLightAccessory.d.ts.map +0 -1
- package/dist/platformOutletAccessory.d.ts.map +0 -1
- package/dist/platformTemperatureAccessory.d.ts.map +0 -1
- package/dist/platformWindowCoveringAccessory.d.ts.map +0 -1
- package/dist/settings.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
### Prerequisites
|
|
23
23
|
|
|
24
24
|
- To use this plugin, you will need to already have:
|
|
25
|
-
- [Node](https://nodejs.org): latest version of `
|
|
26
|
-
- [Homebridge](https://homebridge.io): `v1.
|
|
25
|
+
- [Node](https://nodejs.org): latest version of `v20` or `v22` - any other major version is not supported.
|
|
26
|
+
- [Homebridge](https://homebridge.io): `v1.9` - refer to link for more information and installation instructions.
|
|
27
27
|
- Credentials for Loxone MiniServer: You will need your Loxone MiniServer ID and login credentials for the Loxone App. Typically, your landlord will provide a login link or similar access method for the Loxone App. Within the app, navigate to the info panel to locate the "serial number," which serves as your MiniServer ID.
|
|
28
28
|
|
|
29
29
|
### Tenants at Jägerstrasse 59, Winterthur
|
package/config.schema.json
CHANGED
package/dist/accessoryBase.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlatformAccessory, Service } from "homebridge";
|
|
2
|
-
import { LoxoneControlPlatform } from "./platform";
|
|
3
|
-
import { States } from "./loxone/types";
|
|
2
|
+
import { LoxoneControlPlatform } from "./platform.js";
|
|
3
|
+
import { States } from "./loxone/types.js";
|
|
4
4
|
export declare class AccessoryBase {
|
|
5
5
|
readonly platform: LoxoneControlPlatform;
|
|
6
6
|
readonly accessory: PlatformAccessory;
|
|
@@ -12,4 +12,3 @@ export declare class AccessoryBase {
|
|
|
12
12
|
setStateOn: () => Promise<void>;
|
|
13
13
|
setState: (newStates: States) => void;
|
|
14
14
|
}
|
|
15
|
-
//# sourceMappingURL=accessoryBase.d.ts.map
|
package/dist/accessoryBase.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export class AccessoryBase {
|
|
2
|
+
platform;
|
|
3
|
+
accessory;
|
|
4
|
+
identifier;
|
|
5
|
+
service;
|
|
6
|
+
states = {};
|
|
5
7
|
constructor(platform, accessory, identifier) {
|
|
6
8
|
this.platform = platform;
|
|
7
9
|
this.accessory = accessory;
|
|
8
10
|
this.identifier = identifier;
|
|
9
|
-
this.states = {};
|
|
10
|
-
this.toggleState = async () => {
|
|
11
|
-
this.platform.log.error(`toggleState not implemented! (${this.identifier})`);
|
|
12
|
-
};
|
|
13
|
-
this.setStateOn = async () => {
|
|
14
|
-
this.platform.log.error(`setStateOn not implemented! (${this.identifier})`);
|
|
15
|
-
};
|
|
16
|
-
this.setState = (newStates) => {
|
|
17
|
-
this.states = newStates;
|
|
18
|
-
};
|
|
19
11
|
}
|
|
12
|
+
toggleState = async () => {
|
|
13
|
+
this.platform.log.error(`toggleState not implemented! (${this.identifier})`);
|
|
14
|
+
};
|
|
15
|
+
setStateOn = async () => {
|
|
16
|
+
this.platform.log.error(`setStateOn not implemented! (${this.identifier})`);
|
|
17
|
+
};
|
|
18
|
+
setState = (newStates) => {
|
|
19
|
+
this.states = newStates;
|
|
20
|
+
};
|
|
20
21
|
}
|
|
21
|
-
exports.AccessoryBase = AccessoryBase;
|
|
22
22
|
//# sourceMappingURL=accessoryBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessoryBase.js","sourceRoot":"","sources":["../src/accessoryBase.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accessoryBase.js","sourceRoot":"","sources":["../src/accessoryBase.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,aAAa;IAKN;IACA;IACA;IANX,OAAO,CAAsB;IAC7B,MAAM,GAAW,EAAE,CAAC;IAE3B,YACkB,QAA+B,EAC/B,SAA4B,EAC5B,UAAkB;QAFlB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,cAAS,GAAT,SAAS,CAAmB;QAC5B,eAAU,GAAV,UAAU,CAAQ;IACjC,CAAC;IAEJ,WAAW,GAAG,KAAK,IAAI,EAAE;QACvB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CACrB,iCAAiC,IAAI,CAAC,UAAU,GAAG,CACpD,CAAC;IACJ,CAAC,CAAC;IAEF,UAAU,GAAG,KAAK,IAAI,EAAE;QACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,gCAAgC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;IAC9E,CAAC,CAAC;IAEF,QAAQ,GAAG,CAAC,SAAiB,EAAE,EAAE;QAC/B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;IAC1B,CAAC,CAAC;CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BlindsTilt, BlindsType } from "./loxone/types";
|
|
2
|
-
import { LoxoneControlPlatform } from "./platform";
|
|
3
|
-
import { PlatformWindowCoveringAccessory } from "./platformWindowCoveringAccessory";
|
|
1
|
+
import { BlindsTilt, BlindsType } from "./loxone/types.js";
|
|
2
|
+
import { LoxoneControlPlatform } from "./platform.js";
|
|
3
|
+
import { PlatformWindowCoveringAccessory } from "./platformWindowCoveringAccessory.js";
|
|
4
4
|
interface MoveBlindsToPositionParams {
|
|
5
5
|
value: number;
|
|
6
6
|
platformAccessory: PlatformWindowCoveringAccessory;
|
|
@@ -25,4 +25,3 @@ export declare class BlindsController {
|
|
|
25
25
|
sendMoveJalousieCommand: (platformAccessory: PlatformWindowCoveringAccessory, shouldMove: boolean, command?: string, failOver?: number) => Promise<unknown>;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
28
|
-
//# sourceMappingURL=blindsController.d.ts.map
|
package/dist/blindsController.js
CHANGED
|
@@ -1,218 +1,216 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { getBlindsTiming } from "./loxone/utils/getBlindsTiming.js";
|
|
2
|
+
import { sendCommand } from "./loxone/utils/sendCommand.js";
|
|
3
|
+
import { sleep } from "./loxone/utils/sleep.js";
|
|
4
|
+
import { toPositive } from "./loxone/utils/toPositive.js";
|
|
5
|
+
export class BlindsController {
|
|
6
|
+
platform;
|
|
7
|
+
activeTimers;
|
|
8
|
+
runCommands = [];
|
|
9
|
+
runDebounceTimer = null;
|
|
10
|
+
commandsExecuting = false;
|
|
9
11
|
constructor(platform) {
|
|
10
12
|
this.platform = platform;
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.runDebounceTimer
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
resolve(delays.flat());
|
|
37
|
-
});
|
|
13
|
+
this.activeTimers = new Map();
|
|
14
|
+
this.moveBlindsToPosition = this.moveBlindsToPosition.bind(this);
|
|
15
|
+
this.moveBlindsToPositionNow = this.moveBlindsToPositionNow.bind(this);
|
|
16
|
+
this.moveBlindsToFinalPosition = this.moveBlindsToFinalPosition.bind(this);
|
|
17
|
+
}
|
|
18
|
+
moveBlindsToPosition = async (params) => {
|
|
19
|
+
return new Promise((resolve) => {
|
|
20
|
+
const debounceDelay = 500;
|
|
21
|
+
this.runCommands.push(params);
|
|
22
|
+
if (this.runDebounceTimer) {
|
|
23
|
+
clearTimeout(this.runDebounceTimer);
|
|
24
|
+
}
|
|
25
|
+
this.runDebounceTimer = setTimeout(() => {
|
|
26
|
+
this.platform.log.debug(`🤖 Nothing received for ${debounceDelay}ms, collected commands: [${this.runCommands.map((rc) => rc.value)}]`);
|
|
27
|
+
this.runDebounceTimer = null;
|
|
28
|
+
this.commandsExecuting = true;
|
|
29
|
+
const promises = this.runCommands.map(async (command, index) => {
|
|
30
|
+
const additionalDelay = 600;
|
|
31
|
+
const delay = index * additionalDelay;
|
|
32
|
+
const movingDelay = await this.moveBlindsToPositionNow(command, delay);
|
|
33
|
+
this.resetTiltButtonsAfterDelay(command.platformAccessory, movingDelay);
|
|
34
|
+
return movingDelay;
|
|
35
|
+
});
|
|
36
|
+
Promise.all(promises).then((delays) => {
|
|
37
|
+
this.platform.log.debug(`✅ All commands executed!, collected delays: ${JSON.stringify(delays.flat())}`);
|
|
38
38
|
this.runCommands = [];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
this.platform.Characteristic.PositionState.
|
|
90
|
-
|
|
91
|
-
this.platform.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
39
|
+
this.commandsExecuting = false;
|
|
40
|
+
resolve(delays.flat());
|
|
41
|
+
});
|
|
42
|
+
this.runCommands = [];
|
|
43
|
+
}, debounceDelay);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
resetTiltButtonsAfterDelay = async (accessory, delay) => {
|
|
47
|
+
await sleep(delay + 1000);
|
|
48
|
+
accessory.resetTiltPositions();
|
|
49
|
+
};
|
|
50
|
+
moveBlindsToPositionNow = async ({ value, platformAccessory }, waitBeforeExecute = 0) => {
|
|
51
|
+
try {
|
|
52
|
+
await sleep(waitBeforeExecute);
|
|
53
|
+
const actualTilt = platformAccessory.getOpenedOn()
|
|
54
|
+
? "open"
|
|
55
|
+
: platformAccessory.getTiltedOn()
|
|
56
|
+
? "tilted"
|
|
57
|
+
: "closed";
|
|
58
|
+
const tilt = (value > 0 ? actualTilt : "closed");
|
|
59
|
+
const { accessory, identifier, states } = platformAccessory;
|
|
60
|
+
const [_searchDescription, _typeQuery, actionUuid] = identifier.split(":");
|
|
61
|
+
if (this.activeTimers.has(actionUuid)) {
|
|
62
|
+
this.platform.log.debug(` > 🕰️ Clear active timer for "${actionUuid}"`);
|
|
63
|
+
clearTimeout(this.activeTimers.get(actionUuid));
|
|
64
|
+
this.activeTimers.delete(actionUuid);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
this.platform.log.debug(` > 🕰️ No active timer for "${actionUuid}", ${JSON.stringify(this.activeTimers.get(actionUuid))}`);
|
|
68
|
+
}
|
|
69
|
+
let delay = 0;
|
|
70
|
+
const { blindsTiming, blindsMaxPosition } = accessory.context.device;
|
|
71
|
+
const maxPosition = parseInt(blindsMaxPosition || "100", 10);
|
|
72
|
+
const timing = isNaN(parseInt(blindsTiming, 10))
|
|
73
|
+
? getBlindsTiming(blindsTiming, this.platform.config)
|
|
74
|
+
: parseInt(blindsTiming, 10);
|
|
75
|
+
const timingUp = getBlindsTiming(blindsTiming, this.platform.config, "up");
|
|
76
|
+
const blindsType = blindsTiming?.includes("awning")
|
|
77
|
+
? "awning"
|
|
78
|
+
: "blinds";
|
|
79
|
+
if (maxPosition < 100) {
|
|
80
|
+
value = Math.round((value * maxPosition) / 100);
|
|
81
|
+
}
|
|
82
|
+
if (value > maxPosition) {
|
|
83
|
+
value = maxPosition;
|
|
84
|
+
}
|
|
85
|
+
const steps = value - states.Position;
|
|
86
|
+
const isMovingDown = steps > 0;
|
|
87
|
+
const isPositionStateChanged = isMovingDown
|
|
88
|
+
? states.PositionState !==
|
|
89
|
+
this.platform.Characteristic.PositionState.INCREASING
|
|
90
|
+
: states.PositionState !==
|
|
91
|
+
this.platform.Characteristic.PositionState.DECREASING;
|
|
92
|
+
const isAlreadyRunning = states.PositionState !==
|
|
93
|
+
this.platform.Characteristic.PositionState.STOPPED;
|
|
94
|
+
if (isAlreadyRunning && isPositionStateChanged) {
|
|
95
|
+
this.platform.log.debug(` 🔥 Blinds "${accessory.context.device.name}" are already running and will have a new direction, stop them! ${JSON.stringify({ isMovingDown, PositionState: states.PositionState })}`);
|
|
96
|
+
await sendCommand(this.platform, identifier, ["FullDown"]);
|
|
97
|
+
await sleep(500);
|
|
98
|
+
}
|
|
99
|
+
else if (isAlreadyRunning && !isPositionStateChanged) {
|
|
100
|
+
this.platform.log.debug(` 👌 Blinds "${accessory.context.device.name}" are already running in the correct direction, do not stop them!`);
|
|
101
|
+
}
|
|
102
|
+
const stepsToTarget = toPositive(steps);
|
|
103
|
+
const targetIsFullyDownOrUp = value === 0 || (value === 100 && tilt === "closed");
|
|
104
|
+
if (stepsToTarget > 0) {
|
|
105
|
+
if (!targetIsFullyDownOrUp) {
|
|
106
|
+
// calculate exact delay to reach "stepsToTarget"
|
|
107
|
+
delay = Math.floor(stepsToTarget * ((isMovingDown ? timing : timingUp) / 100) * 1000);
|
|
97
108
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const { name } = accessory.context.device;
|
|
106
|
-
this.platform.log.info(`🕹️ Move jalousie "${name}" from ${states.Position}% to ${value}% (${tilt}), wait ${delay}ms to reach position`);
|
|
107
|
-
states.TargetPosition = value;
|
|
108
|
-
if (!isAlreadyRunning) {
|
|
109
|
-
const jsError = await this.sendMoveJalousieCommand(platformAccessory, true, isMovingDown ? "FullDown" : "FullUp");
|
|
110
|
-
if (jsError) {
|
|
111
|
-
this.platform.log.error(`Error in sendCommand: ${jsError}`);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (delay > 0) {
|
|
115
|
-
const newTimer = setTimeout((() => {
|
|
116
|
-
this.moveBlindsToFinalPosition({
|
|
117
|
-
platformAccessory,
|
|
118
|
-
isMovingDown,
|
|
119
|
-
tilt,
|
|
120
|
-
blindsType,
|
|
121
|
-
});
|
|
122
|
-
this.activeTimers.delete(actionUuid);
|
|
123
|
-
}).bind(this), delay);
|
|
124
|
-
this.activeTimers.set(actionUuid, newTimer);
|
|
125
|
-
this.platform.log.debug(` > 🕰️ Set timer for "${actionUuid}" to ${delay}ms, ${JSON.stringify(this.activeTimers.has(actionUuid))}`);
|
|
109
|
+
const { name } = accessory.context.device;
|
|
110
|
+
this.platform.log.info(`🕹️ Move jalousie "${name}" from ${states.Position}% to ${value}% (${tilt}), wait ${delay}ms to reach position`);
|
|
111
|
+
states.TargetPosition = value;
|
|
112
|
+
if (!isAlreadyRunning) {
|
|
113
|
+
const jsError = await this.sendMoveJalousieCommand(platformAccessory, true, isMovingDown ? "FullDown" : "FullUp");
|
|
114
|
+
if (jsError) {
|
|
115
|
+
this.platform.log.error(`Error in sendCommand: ${jsError}`);
|
|
126
116
|
}
|
|
127
117
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (tilt !== states.TiltPosition) {
|
|
131
|
-
this.platform.log.debug(` 🕹️ Move slat tilt angle only, from "${states.TargetPosition}" to "${tilt}"`);
|
|
118
|
+
if (delay > 0) {
|
|
119
|
+
const newTimer = setTimeout((() => {
|
|
132
120
|
this.moveBlindsToFinalPosition({
|
|
133
121
|
platformAccessory,
|
|
134
|
-
isMovingDown
|
|
122
|
+
isMovingDown,
|
|
135
123
|
tilt,
|
|
136
124
|
blindsType,
|
|
137
125
|
});
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
126
|
+
this.activeTimers.delete(actionUuid);
|
|
127
|
+
}).bind(this), delay);
|
|
128
|
+
this.activeTimers.set(actionUuid, newTimer);
|
|
129
|
+
this.platform.log.debug(` > 🕰️ Set timer for "${actionUuid}" to ${delay}ms, ${JSON.stringify(this.activeTimers.has(actionUuid))}`);
|
|
142
130
|
}
|
|
143
|
-
return delay;
|
|
144
131
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
if (platformAccessory.getPositionState() !== 2) {
|
|
160
|
-
// Stop the blinds now at reached position (more or less :D)
|
|
161
|
-
await this.sendMoveJalousieCommand(platformAccessory, false, isMovingDown ? "FullDown" : "FullUp");
|
|
162
|
-
await (0, sleep_1.sleep)(500);
|
|
132
|
+
else {
|
|
133
|
+
// check if blinds are in correct slat tilt angle position
|
|
134
|
+
if (tilt !== states.TiltPosition) {
|
|
135
|
+
this.platform.log.debug(` 🕹️ Move slat tilt angle only, from "${states.TargetPosition}" to "${tilt}"`);
|
|
136
|
+
this.moveBlindsToFinalPosition({
|
|
137
|
+
platformAccessory,
|
|
138
|
+
isMovingDown: true,
|
|
139
|
+
tilt,
|
|
140
|
+
blindsType,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
this.platform.log.debug(` 👍 Nothing to do, the blinds are already at position ${value}`);
|
|
145
|
+
}
|
|
163
146
|
}
|
|
164
|
-
|
|
147
|
+
return delay;
|
|
148
|
+
}
|
|
149
|
+
catch (e) {
|
|
150
|
+
this.platform.log.error(`Error in moveBlindsToPositionNow: ${e}`);
|
|
151
|
+
return 0;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
moveBlindsToFinalPosition = async ({ platformAccessory, isMovingDown, tilt, blindsType, }) => {
|
|
155
|
+
const { accessory } = platformAccessory;
|
|
156
|
+
const { name } = accessory.context.device;
|
|
157
|
+
await sleep(800);
|
|
158
|
+
this.platform.log.debug(` 🎯 Control blinds slat tilt angle of "${name}" to final position "${JSON.stringify({
|
|
159
|
+
tilt,
|
|
160
|
+
isMovingDown,
|
|
161
|
+
currPos: platformAccessory.getPositionState(),
|
|
162
|
+
})}"`);
|
|
163
|
+
if (platformAccessory.getPositionState() !== 2) {
|
|
164
|
+
// Stop the blinds now at reached position (more or less :D)
|
|
165
|
+
await this.sendMoveJalousieCommand(platformAccessory, false, isMovingDown ? "FullDown" : "FullUp");
|
|
166
|
+
await sleep(500);
|
|
167
|
+
}
|
|
168
|
+
if (blindsType === "awning") {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (isMovingDown) {
|
|
172
|
+
if (tilt === "closed") {
|
|
173
|
+
this.platform.log.debug(" 👍 Nothing to do, the blinds are already closed");
|
|
165
174
|
return;
|
|
166
175
|
}
|
|
167
|
-
if (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
else if (tilt === "tilted") {
|
|
173
|
-
this.platform.log.debug(` 🕹️ Double click "up" button with delay of 300ms (tilt=${tilt})})`);
|
|
174
|
-
await this.sendMoveJalousieCommand(platformAccessory, true, "FullUp");
|
|
175
|
-
await (0, sleep_1.sleep)(300);
|
|
176
|
-
await this.sendMoveJalousieCommand(platformAccessory, false, "FullUp");
|
|
177
|
-
}
|
|
178
|
-
else if (tilt === "open") {
|
|
179
|
-
this.platform.log.debug(` 🕹️ Double click "up" button with delay of 1000ms (tilt=${tilt})})`);
|
|
180
|
-
await this.sendMoveJalousieCommand(platformAccessory, true, "FullUp");
|
|
181
|
-
await (0, sleep_1.sleep)(1000);
|
|
182
|
-
await this.sendMoveJalousieCommand(platformAccessory, false, "FullUp");
|
|
183
|
-
}
|
|
176
|
+
else if (tilt === "tilted") {
|
|
177
|
+
this.platform.log.debug(` 🕹️ Double click "up" button with delay of 300ms (tilt=${tilt})})`);
|
|
178
|
+
await this.sendMoveJalousieCommand(platformAccessory, true, "FullUp");
|
|
179
|
+
await sleep(300);
|
|
180
|
+
await this.sendMoveJalousieCommand(platformAccessory, false, "FullUp");
|
|
184
181
|
}
|
|
185
|
-
else {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
182
|
+
else if (tilt === "open") {
|
|
183
|
+
this.platform.log.debug(` 🕹️ Double click "up" button with delay of 1000ms (tilt=${tilt})})`);
|
|
184
|
+
await this.sendMoveJalousieCommand(platformAccessory, true, "FullUp");
|
|
185
|
+
await sleep(1000);
|
|
186
|
+
await this.sendMoveJalousieCommand(platformAccessory, false, "FullUp");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
if (tilt === "closed") {
|
|
191
|
+
this.platform.log.debug(` 🕹️ Double click "down" button with delay of 1000ms (tilt=${tilt})})`);
|
|
192
|
+
await this.sendMoveJalousieCommand(platformAccessory, true, "FullDown");
|
|
193
|
+
await sleep(1000);
|
|
194
|
+
await this.sendMoveJalousieCommand(platformAccessory, false, "FullDown");
|
|
195
|
+
}
|
|
196
|
+
else if (tilt === "tilted") {
|
|
197
|
+
this.platform.log.debug(` 🕹️ Double click "down" button with delay of 600ms (tilt=${tilt})})`);
|
|
198
|
+
await this.sendMoveJalousieCommand(platformAccessory, true, "FullDown");
|
|
199
|
+
await sleep(600);
|
|
200
|
+
await this.sendMoveJalousieCommand(platformAccessory, false, "FullDown");
|
|
202
201
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
if (failOver > 1) {
|
|
202
|
+
else if (tilt === "open") {
|
|
203
|
+
this.platform.log.debug(" 👍 Nothing to do, the blinds are already open");
|
|
206
204
|
return;
|
|
207
205
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
sendMoveJalousieCommand = async (platformAccessory, shouldMove, command = "FullDown", failOver = 0) => {
|
|
209
|
+
if (failOver > 1) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const jsError = await sendCommand(this.platform, platformAccessory.identifier, [command]);
|
|
213
|
+
return jsError;
|
|
214
|
+
};
|
|
216
215
|
}
|
|
217
|
-
exports.BlindsController = BlindsController;
|
|
218
216
|
//# sourceMappingURL=blindsController.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blindsController.js","sourceRoot":"","sources":["../src/blindsController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"blindsController.js","sourceRoot":"","sources":["../src/blindsController.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAgB1D,MAAM,OAAO,gBAAgB;IAOC;IANpB,YAAY,CAA8B;IAE1C,WAAW,GAAiC,EAAE,CAAC;IAC/C,gBAAgB,GAA0B,IAAI,CAAC;IAChD,iBAAiB,GAAG,KAAK,CAAC;IAEjC,YAA4B,QAA+B;QAA/B,aAAQ,GAAR,QAAQ,CAAuB;QACzD,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,EAA0B,CAAC;QACtD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvE,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7E,CAAC;IAED,oBAAoB,GAA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GAAG,CAAC,EACZ,EAAE;QACF,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,WAAW,CAC/B,IAAI,CAAC,QAAQ,EACb,iBAAiB,CAAC,UAAU,EAC5B,CAAC,OAAO,CAAC,CACV,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;CACH"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { LoxoneControlPlatform } from "./platform.js";
|
|
2
|
+
import { PLATFORM_NAME } from "./settings.js";
|
|
3
|
+
/**
|
|
4
|
+
* This method registers the platform with Homebridge
|
|
5
|
+
*/
|
|
6
|
+
export default (api) => {
|
|
7
|
+
api.registerPlatform(PLATFORM_NAME, LoxoneControlPlatform);
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,eAAe,CAAC,GAAQ,EAAE,EAAE;IAC1B,GAAG,CAAC,gBAAgB,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;AAC7D,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Page } from "puppeteer";
|
|
2
|
-
import { LoxoneControlPlatform } from "../platform";
|
|
2
|
+
import { LoxoneControlPlatform } from "../platform.js";
|
|
3
3
|
export type LoxoneComponent = {
|
|
4
4
|
identifier: string;
|
|
5
5
|
uuidAction: string;
|
|
@@ -31,4 +31,3 @@ export declare class LoxoneWebinterface {
|
|
|
31
31
|
password: any;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
//# sourceMappingURL=loxoneWebinterface.d.ts.map
|