homebridge-philips-airplus-cloud 0.3.3 → 0.3.4
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/package.json +1 -1
- package/src/platform.js +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
The Home Assistant integration in `custom_components/` is unchanged from upstream and keeps its own history.
|
|
4
4
|
|
|
5
|
+
## 0.3.4 — 2026-10-11
|
|
6
|
+
|
|
7
|
+
- Fix (0.3.3 regression): on Homebridge 2.x a newly created accessory could be left out of HomeKit ("has the same UUID as existing accessory … Skipping duplicate"), because its settings were saved before it was registered. Accessories are now only updated after registration.
|
|
8
|
+
|
|
5
9
|
## 0.3.3 — 2026-10-11
|
|
6
10
|
|
|
7
11
|
- Fix: the plugin could stop updating when the cloud connection stayed open but stopped delivering data. If the purifier sends nothing for three status polls (at least 6 minutes), the connection is now rebuilt.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-philips-airplus-cloud",
|
|
3
3
|
"displayName": "Philips Air+",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"description": "Homebridge plugin for Philips Air+ / PureProtect air purifiers via the Philips (Versuni) cloud — the same MQTT protocol used by the Air+ app and Google Home.",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"license": "MIT",
|
package/src/platform.js
CHANGED
|
@@ -37,7 +37,14 @@ class PhilipsAirPlusPlatform {
|
|
|
37
37
|
this.cached.set(accessory.UUID, accessory);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Persist context changes. Only for accessories Homebridge already knows:
|
|
42
|
+
* updating one that is not registered yet adds it to Homebridge's cache,
|
|
43
|
+
* and the registration that follows is then rejected as a duplicate
|
|
44
|
+
* (Homebridge 2.x), leaving the accessory out of HomeKit.
|
|
45
|
+
*/
|
|
40
46
|
updateAccessory(accessory) {
|
|
47
|
+
if (!this.cached.has(accessory.UUID)) return;
|
|
41
48
|
this.api.updatePlatformAccessories([accessory]);
|
|
42
49
|
}
|
|
43
50
|
|
|
@@ -89,6 +96,7 @@ class PhilipsAirPlusPlatform {
|
|
|
89
96
|
const register = () => {
|
|
90
97
|
this.log.info(`Adding ${dev.name}`);
|
|
91
98
|
this.api.registerPlatformAccessories(C.PLUGIN_NAME, C.PLATFORM_NAME, [acc]);
|
|
99
|
+
this.cached.set(acc.UUID, acc);
|
|
92
100
|
};
|
|
93
101
|
if (handler.model) register();
|
|
94
102
|
else handler.onModelReady = register;
|
|
@@ -103,6 +111,7 @@ class PhilipsAirPlusPlatform {
|
|
|
103
111
|
if (stale.length) {
|
|
104
112
|
this.log.info(`Removing ${stale.map((a) => a.displayName).join(', ')}`);
|
|
105
113
|
this.api.unregisterPlatformAccessories(C.PLUGIN_NAME, C.PLATFORM_NAME, stale);
|
|
114
|
+
for (const a of stale) this.cached.delete(a.UUID);
|
|
106
115
|
}
|
|
107
116
|
}
|
|
108
117
|
}
|