homebridge-ac-freedom 2.3.6 → 2.3.8
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/CHANGELOG.md +8 -0
- package/homebridge-ui/server.js +1 -1
- package/package.json +1 -1
- package/src/ac-accessory.js +6 -4
- package/src/cloud-api.js +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.8
|
|
4
|
+
|
|
5
|
+
- **Fix Fetch stuck on "Fetching…"** (#2) — the config UI Fetch button called `getDeviceParams` for every discovered device (each a separate HTTP call with a 15 s timeout), causing the total request time to exceed the UI framework timeout and leaving the button permanently stuck. Device param fetching is now skipped during the UI fetch — only the device name and ID are needed at that point.
|
|
6
|
+
|
|
7
|
+
## 2.3.7
|
|
8
|
+
|
|
9
|
+
- **Fix inverted swing mode on local connection** (#1) — local Broadlink protocol uses fixation `0` = swinging and `7` = fixed; the plugin had it reversed, so the HomeKit swing toggle showed the opposite of the actual louvre state. Cloud connection was unaffected.
|
|
10
|
+
|
|
3
11
|
## 2.3.6
|
|
4
12
|
|
|
5
13
|
- **Config UI: feature toggles redesigned** — checkboxes removed; each feature is now a colour-coded pill: bright green when enabled, muted grey when disabled
|
package/homebridge-ui/server.js
CHANGED
|
@@ -36,7 +36,7 @@ class AcFreedomUiServer extends HomebridgePluginUiServer {
|
|
|
36
36
|
const devices = [];
|
|
37
37
|
|
|
38
38
|
for (const fam of families) {
|
|
39
|
-
const devs = await api.getDevices(fam.familyid);
|
|
39
|
+
const devs = await api.getDevices(fam.familyid, { fetchParams: false });
|
|
40
40
|
devices.push(...devs);
|
|
41
41
|
}
|
|
42
42
|
|
package/package.json
CHANGED
package/src/ac-accessory.js
CHANGED
|
@@ -462,8 +462,9 @@ class AcFreedomAccessory {
|
|
|
462
462
|
this.state.currentTemp = s.ambientTemp;
|
|
463
463
|
// Normalise local fan speed → canonical cloud numbering
|
|
464
464
|
this.state.fanSpeed = FAN_REMAP[s.fanSpeed] ?? FAN_SPEED.AUTO;
|
|
465
|
-
|
|
466
|
-
this.state.
|
|
465
|
+
// Local fixation: 0 = swinging, 7 = fixed
|
|
466
|
+
this.state.swingV = s.verticalFixation === 0;
|
|
467
|
+
this.state.swingH = s.horizontalFixation === 0;
|
|
467
468
|
this.state.sleep = !!s.sleep;
|
|
468
469
|
this.state.health = !!s.health;
|
|
469
470
|
this.state.eco = !!s.mildew;
|
|
@@ -613,8 +614,9 @@ class AcFreedomAccessory {
|
|
|
613
614
|
return this._send(
|
|
614
615
|
() => {
|
|
615
616
|
const a = this._localApi;
|
|
616
|
-
|
|
617
|
-
a.state.
|
|
617
|
+
// Local fixation: 0 = swinging, 7 = fixed
|
|
618
|
+
a.state.verticalFixation = v ? 0 : 7;
|
|
619
|
+
a.state.horizontalFixation = h ? 0 : 7;
|
|
618
620
|
return a.setState();
|
|
619
621
|
},
|
|
620
622
|
() => this.cloudSet({ [CLOUD.SWING_V]: v ? 1 : 0, [CLOUD.SWING_H]: h ? 1 : 0 }),
|
package/src/cloud-api.js
CHANGED
|
@@ -159,7 +159,7 @@ class AuxCloudAPI {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// ── Devices ────────────────────────────────────────────────────
|
|
162
|
-
async getDevices(familyId) {
|
|
162
|
+
async getDevices(familyId, { fetchParams = true } = {}) {
|
|
163
163
|
const result = await this._request('POST', 'appsync/group/dev/query?action=select', {
|
|
164
164
|
headers: this._headers({ familyid: familyId }),
|
|
165
165
|
body: '{"pids":[]}',
|
|
@@ -171,13 +171,15 @@ class AuxCloudAPI {
|
|
|
171
171
|
|
|
172
172
|
const devices = result.data?.endpoints || [];
|
|
173
173
|
|
|
174
|
-
|
|
175
|
-
dev
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
if (fetchParams) {
|
|
175
|
+
for (const dev of devices) {
|
|
176
|
+
dev.params = {};
|
|
177
|
+
try {
|
|
178
|
+
const params = await this.getDeviceParams(dev);
|
|
179
|
+
if (params) dev.params = params;
|
|
180
|
+
} catch {
|
|
181
|
+
// Ignore param fetch errors on initial load
|
|
182
|
+
}
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
185
|
|