homebridge-ac-freedom 2.3.7 → 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 +4 -0
- package/homebridge-ui/server.js +1 -1
- package/package.json +1 -1
- package/src/cloud-api.js +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
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
|
+
|
|
3
7
|
## 2.3.7
|
|
4
8
|
|
|
5
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.
|
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/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
|
|