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.
Files changed (75) hide show
  1. package/README.md +2 -2
  2. package/config.schema.json +1 -0
  3. package/dist/accessoryBase.d.ts +2 -3
  4. package/dist/accessoryBase.js +15 -15
  5. package/dist/accessoryBase.js.map +1 -1
  6. package/dist/blindsController.d.ts +3 -4
  7. package/dist/blindsController.js +194 -196
  8. package/dist/blindsController.js.map +1 -1
  9. package/dist/index.d.ts +1 -2
  10. package/dist/index.js +7 -5
  11. package/dist/index.js.map +1 -1
  12. package/dist/loxone/loxoneWebinterface.d.ts +1 -2
  13. package/dist/loxone/loxoneWebinterface.js +41 -43
  14. package/dist/loxone/loxoneWebinterface.js.map +1 -1
  15. package/dist/loxone/scripts/comps.js-v15.0.1.js +1 -0
  16. package/dist/loxone/types.d.ts +0 -1
  17. package/dist/loxone/types.js +1 -2
  18. package/dist/loxone/utils/getBlindsTiming.d.ts +1 -2
  19. package/dist/loxone/utils/getBlindsTiming.js +7 -11
  20. package/dist/loxone/utils/getBlindsTiming.js.map +1 -1
  21. package/dist/loxone/utils/getTiltPositionFromTransforms.d.ts +1 -2
  22. package/dist/loxone/utils/getTiltPositionFromTransforms.js +5 -9
  23. package/dist/loxone/utils/getTiltPositionFromTransforms.js.map +1 -1
  24. package/dist/loxone/utils/sendCommand.d.ts +1 -2
  25. package/dist/loxone/utils/sendCommand.js +5 -9
  26. package/dist/loxone/utils/sendCommand.js.map +1 -1
  27. package/dist/loxone/utils/sleep.d.ts +0 -1
  28. package/dist/loxone/utils/sleep.js +1 -5
  29. package/dist/loxone/utils/sleep.js.map +1 -1
  30. package/dist/loxone/utils/split.d.ts +0 -1
  31. package/dist/loxone/utils/split.js +2 -7
  32. package/dist/loxone/utils/split.js.map +1 -1
  33. package/dist/loxone/utils/toPositive.d.ts +0 -1
  34. package/dist/loxone/utils/toPositive.js +1 -5
  35. package/dist/loxone/utils/toPositive.js.map +1 -1
  36. package/dist/platform.d.ts +23 -18
  37. package/dist/platform.js +142 -132
  38. package/dist/platform.js.map +1 -1
  39. package/dist/platformFanAccessory.d.ts +3 -4
  40. package/dist/platformFanAccessory.js +44 -49
  41. package/dist/platformFanAccessory.js.map +1 -1
  42. package/dist/platformLightAccessory.d.ts +3 -4
  43. package/dist/platformLightAccessory.js +28 -34
  44. package/dist/platformLightAccessory.js.map +1 -1
  45. package/dist/platformOutletAccessory.d.ts +3 -4
  46. package/dist/platformOutletAccessory.js +33 -37
  47. package/dist/platformOutletAccessory.js.map +1 -1
  48. package/dist/platformTemperatureAccessory.d.ts +3 -4
  49. package/dist/platformTemperatureAccessory.js +15 -18
  50. package/dist/platformTemperatureAccessory.js.map +1 -1
  51. package/dist/platformWindowCoveringAccessory.d.ts +3 -4
  52. package/dist/platformWindowCoveringAccessory.js +97 -101
  53. package/dist/platformWindowCoveringAccessory.js.map +1 -1
  54. package/dist/settings.d.ts +0 -1
  55. package/dist/settings.js +2 -5
  56. package/dist/settings.js.map +1 -1
  57. package/package.json +25 -19
  58. package/dist/accessoryBase.d.ts.map +0 -1
  59. package/dist/blindsController.d.ts.map +0 -1
  60. package/dist/index.d.ts.map +0 -1
  61. package/dist/loxone/loxoneWebinterface.d.ts.map +0 -1
  62. package/dist/loxone/types.d.ts.map +0 -1
  63. package/dist/loxone/utils/getBlindsTiming.d.ts.map +0 -1
  64. package/dist/loxone/utils/getTiltPositionFromTransforms.d.ts.map +0 -1
  65. package/dist/loxone/utils/sendCommand.d.ts.map +0 -1
  66. package/dist/loxone/utils/sleep.d.ts.map +0 -1
  67. package/dist/loxone/utils/split.d.ts.map +0 -1
  68. package/dist/loxone/utils/toPositive.d.ts.map +0 -1
  69. package/dist/platform.d.ts.map +0 -1
  70. package/dist/platformFanAccessory.d.ts.map +0 -1
  71. package/dist/platformLightAccessory.d.ts.map +0 -1
  72. package/dist/platformOutletAccessory.d.ts.map +0 -1
  73. package/dist/platformTemperatureAccessory.d.ts.map +0 -1
  74. package/dist/platformWindowCoveringAccessory.d.ts.map +0 -1
  75. 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 `v18` or `v20` - any other major version is not supported.
26
- - [Homebridge](https://homebridge.io): `v1.6` - refer to link for more information and installation instructions.
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
@@ -3,6 +3,7 @@
3
3
  "pluginType": "platform",
4
4
  "singular": true,
5
5
  "customUi": true,
6
+ "strictValidation": false,
6
7
  "schema": {
7
8
  "type": "object",
8
9
  "additionalProperties": true,
@@ -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
@@ -1,22 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccessoryBase = void 0;
4
- class AccessoryBase {
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":";;;AAIA,MAAa,aAAa;IAIxB,YACkB,QAA+B,EAC/B,SAA4B,EAC5B,UAAkB;QAFlB,aAAQ,GAAR,QAAQ,CAAuB;QAC/B,cAAS,GAAT,SAAS,CAAmB;QAC5B,eAAU,GAAV,UAAU,CAAQ;QAL7B,WAAM,GAAW,EAAE,CAAC;QAQ3B,gBAAW,GAAG,KAAK,IAAI,EAAE;YACvB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CACrB,iCAAiC,IAAI,CAAC,UAAU,GAAG,CACpD,CAAC;QACJ,CAAC,CAAC;QAEF,eAAU,GAAG,KAAK,IAAI,EAAE;YACtB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,gCAAgC,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAC9E,CAAC,CAAC;QAEF,aAAQ,GAAG,CAAC,SAAiB,EAAE,EAAE;YAC/B,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QAC1B,CAAC,CAAC;IAdC,CAAC;CAeL;AAvBD,sCAuBC"}
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
@@ -1,218 +1,216 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BlindsController = void 0;
4
- const getBlindsTiming_1 = require("./loxone/utils/getBlindsTiming");
5
- const sendCommand_1 = require("./loxone/utils/sendCommand");
6
- const sleep_1 = require("./loxone/utils/sleep");
7
- const toPositive_1 = require("./loxone/utils/toPositive");
8
- class BlindsController {
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.runCommands = [];
12
- this.runDebounceTimer = null;
13
- this.commandsExecuting = false;
14
- this.moveBlindsToPosition = async (params) => {
15
- return new Promise((resolve) => {
16
- const debounceDelay = 500;
17
- this.runCommands.push(params);
18
- if (this.runDebounceTimer) {
19
- clearTimeout(this.runDebounceTimer);
20
- }
21
- this.runDebounceTimer = setTimeout(() => {
22
- this.platform.log.debug(`🤖 Nothing received for ${debounceDelay}ms, collected commands: [${this.runCommands.map((rc) => rc.value)}]`);
23
- this.runDebounceTimer = null;
24
- this.commandsExecuting = true;
25
- const promises = this.runCommands.map(async (command, index) => {
26
- const additionalDelay = 600;
27
- const delay = index * additionalDelay;
28
- const movingDelay = await this.moveBlindsToPositionNow(command, delay);
29
- this.resetTiltButtonsAfterDelay(command.platformAccessory, movingDelay);
30
- return movingDelay;
31
- });
32
- Promise.all(promises).then((delays) => {
33
- this.platform.log.debug(`✅ All commands executed!, collected delays: ${JSON.stringify(delays.flat())}`);
34
- this.runCommands = [];
35
- this.commandsExecuting = false;
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
- }, debounceDelay);
40
- });
41
- };
42
- this.resetTiltButtonsAfterDelay = async (accessory, delay) => {
43
- await (0, sleep_1.sleep)(delay + 1000);
44
- accessory.resetTiltPositions();
45
- };
46
- this.moveBlindsToPositionNow = async ({ value, platformAccessory }, waitBeforeExecute = 0) => {
47
- try {
48
- await (0, sleep_1.sleep)(waitBeforeExecute);
49
- const actualTilt = platformAccessory.getOpenedOn()
50
- ? "open"
51
- : platformAccessory.getTiltedOn()
52
- ? "tilted"
53
- : "closed";
54
- const tilt = (value > 0 ? actualTilt : "closed");
55
- const { accessory, identifier, states } = platformAccessory;
56
- const [_searchDescription, _typeQuery, actionUuid] = identifier.split(":");
57
- if (this.activeTimers.has(actionUuid)) {
58
- this.platform.log.debug(` > 🕰️ Clear active timer for "${actionUuid}"`);
59
- clearTimeout(this.activeTimers.get(actionUuid));
60
- this.activeTimers.delete(actionUuid);
61
- }
62
- else {
63
- this.platform.log.debug(` > 🕰️ No active timer for "${actionUuid}", ${JSON.stringify(this.activeTimers.get(actionUuid))}`);
64
- }
65
- let delay = 0;
66
- const { blindsTiming, blindsMaxPosition } = accessory.context.device;
67
- const maxPosition = parseInt(blindsMaxPosition || "100", 10);
68
- const timing = isNaN(parseInt(blindsTiming, 10))
69
- ? (0, getBlindsTiming_1.getBlindsTiming)(blindsTiming, this.platform.config)
70
- : parseInt(blindsTiming, 10);
71
- const timingUp = (0, getBlindsTiming_1.getBlindsTiming)(blindsTiming, this.platform.config, "up");
72
- const blindsType = (blindsTiming === null || blindsTiming === void 0 ? void 0 : blindsTiming.includes("awning"))
73
- ? "awning"
74
- : "blinds";
75
- if (maxPosition < 100) {
76
- value = Math.round((value * maxPosition) / 100);
77
- }
78
- if (value > maxPosition) {
79
- value = maxPosition;
80
- }
81
- const steps = value - states.Position;
82
- const isMovingDown = steps > 0;
83
- const isPositionStateChanged = isMovingDown
84
- ? states.PositionState !==
85
- this.platform.Characteristic.PositionState.INCREASING
86
- : states.PositionState !==
87
- this.platform.Characteristic.PositionState.DECREASING;
88
- const isAlreadyRunning = states.PositionState !==
89
- this.platform.Characteristic.PositionState.STOPPED;
90
- if (isAlreadyRunning && isPositionStateChanged) {
91
- 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 })}`);
92
- await (0, sendCommand_1.sendCommand)(this.platform, identifier, ["FullDown"]);
93
- await (0, sleep_1.sleep)(500);
94
- }
95
- else if (isAlreadyRunning && !isPositionStateChanged) {
96
- this.platform.log.debug(` 👌 Blinds "${accessory.context.device.name}" are already running in the correct direction, do not stop them!`);
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 stepsToTarget = (0, toPositive_1.toPositive)(steps);
99
- const targetIsFullyDownOrUp = value === 0 || (value === 100 && tilt === "closed");
100
- if (stepsToTarget > 0) {
101
- if (!targetIsFullyDownOrUp) {
102
- // calculate exact delay to reach "stepsToTarget"
103
- delay = Math.floor(stepsToTarget * ((isMovingDown ? timing : timingUp) / 100) * 1000);
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
- else {
129
- // check if blinds are in correct slat tilt angle position
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: true,
122
+ isMovingDown,
135
123
  tilt,
136
124
  blindsType,
137
125
  });
138
- }
139
- else {
140
- this.platform.log.debug(` 👍 Nothing to do, the blinds are already at position ${value}`);
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
- catch (e) {
146
- this.platform.log.error(`Error in moveBlindsToPositionNow: ${e}`);
147
- return 0;
148
- }
149
- };
150
- this.moveBlindsToFinalPosition = async ({ platformAccessory, isMovingDown, tilt, blindsType, }) => {
151
- const { accessory } = platformAccessory;
152
- const { name } = accessory.context.device;
153
- await (0, sleep_1.sleep)(800);
154
- this.platform.log.debug(` 🎯 Control blinds slat tilt angle of "${name}" to final position "${JSON.stringify({
155
- tilt,
156
- isMovingDown,
157
- currPos: platformAccessory.getPositionState(),
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
- if (blindsType === "awning") {
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 (isMovingDown) {
168
- if (tilt === "closed") {
169
- this.platform.log.debug(` 👍 Nothing to do, the blinds are already closed`);
170
- return;
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
- if (tilt === "closed") {
187
- this.platform.log.debug(` 🕹️ Double click "down" button with delay of 1000ms (tilt=${tilt})})`);
188
- await this.sendMoveJalousieCommand(platformAccessory, true, "FullDown");
189
- await (0, sleep_1.sleep)(1000);
190
- await this.sendMoveJalousieCommand(platformAccessory, false, "FullDown");
191
- }
192
- else if (tilt === "tilted") {
193
- this.platform.log.debug(` 🕹️ Double click "down" button with delay of 600ms (tilt=${tilt})})`);
194
- await this.sendMoveJalousieCommand(platformAccessory, true, "FullDown");
195
- await (0, sleep_1.sleep)(600);
196
- await this.sendMoveJalousieCommand(platformAccessory, false, "FullDown");
197
- }
198
- else if (tilt === "open") {
199
- this.platform.log.debug(` 👍 Nothing to do, the blinds are already open`);
200
- return;
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
- this.sendMoveJalousieCommand = async (platformAccessory, shouldMove, command = "FullDown", failOver = 0) => {
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
- const jsError = await (0, sendCommand_1.sendCommand)(this.platform, platformAccessory.identifier, [command]);
209
- return jsError;
210
- };
211
- this.activeTimers = new Map();
212
- this.moveBlindsToPosition = this.moveBlindsToPosition.bind(this);
213
- this.moveBlindsToPositionNow = this.moveBlindsToPositionNow.bind(this);
214
- this.moveBlindsToFinalPosition = this.moveBlindsToFinalPosition.bind(this);
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":";;;AAGA,oEAAiE;AACjE,4DAAyD;AACzD,gDAA6C;AAC7C,0DAAuD;AAgBvD,MAAa,gBAAgB;IAO3B,YAA4B,QAA+B;QAA/B,aAAQ,GAAR,QAAQ,CAAuB;QAJnD,gBAAW,GAAiC,EAAE,CAAC;QAC/C,qBAAgB,GAA0B,IAAI,CAAC;QACh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AuB,CAAC,iBAAiB,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;gBACxE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;gBACjB,MAAM,IAAI,CAAC,uBAAuB,CAChC,iBAAiB,EACjB,KAAK,EACL,UAAU,CACX,CAAC;YACJ,CAAC;iBAAM,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CACrB,kDAAkD,CACnD,CAAC;gBACF,OAAO;YACT,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IAEF,uBAAuB,GAAG,KAAK,EAC7B,iBAAkD,EAClD,UAAmB,EACnB,OAAO,GAAG,UAAU,EACpB,QAAQ,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
@@ -3,5 +3,4 @@ import { API } from "homebridge";
3
3
  * This method registers the platform with Homebridge
4
4
  */
5
5
  declare const _default: (api: API) => void;
6
- export = _default;
7
- //# sourceMappingURL=index.d.ts.map
6
+ export default _default;
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
- "use strict";
2
- const settings_1 = require("./settings");
3
- const platform_1 = require("./platform");
4
- module.exports = (api) => {
5
- api.registerPlatform(settings_1.PLATFORM_NAME, platform_1.LoxoneControlPlatform);
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":";AAEA,yCAA2C;AAC3C,yCAAmD;AAKnD,iBAAS,CAAC,GAAQ,EAAE,EAAE;IACpB,GAAG,CAAC,gBAAgB,CAAC,wBAAa,EAAE,gCAAqB,CAAC,CAAC;AAC7D,CAAC,CAAC"}
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