homebridge-zwave-usb 2.8.5 → 2.8.7
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.
|
@@ -64,11 +64,6 @@ class ZWaveAccessory {
|
|
|
64
64
|
.setCharacteristic(this.platform.Characteristic.Manufacturer, manufacturer)
|
|
65
65
|
.setCharacteristic(this.platform.Characteristic.Model, model)
|
|
66
66
|
.setCharacteristic(this.platform.Characteristic.SerialNumber, `Node ${this.node.nodeId}`);
|
|
67
|
-
if (!infoService.testCharacteristic(this.platform.Characteristic.Name)) {
|
|
68
|
-
infoService.addOptionalCharacteristic(this.platform.Characteristic.Name);
|
|
69
|
-
}
|
|
70
|
-
// Update authoritative name immediately
|
|
71
|
-
infoService.updateCharacteristic(this.platform.Characteristic.Name, nodeName);
|
|
72
67
|
/**
|
|
73
68
|
* Helper to normalize UUIDs for reliable comparison during metadata pruning.
|
|
74
69
|
*/
|
|
@@ -98,24 +93,11 @@ class ZWaveAccessory {
|
|
|
98
93
|
rename(newName) {
|
|
99
94
|
this.platform.log.info(`Syncing HomeKit name for Node ${this.node.nodeId} -> ${newName}`);
|
|
100
95
|
this.platformAccessory.displayName = newName;
|
|
101
|
-
// Update the Accessory Information Service (
|
|
96
|
+
// Update the Accessory Information Service (Standard Characteristics Only)
|
|
102
97
|
const infoService = this.platformAccessory.getService(this.platform.Service.AccessoryInformation);
|
|
103
|
-
if
|
|
104
|
-
infoService.addOptionalCharacteristic(this.platform.Characteristic.Name);
|
|
105
|
-
}
|
|
106
|
-
infoService.getCharacteristic(this.platform.Characteristic.Name)
|
|
107
|
-
.setProps({
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
109
|
-
perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
|
|
110
|
-
});
|
|
111
|
-
infoService.updateCharacteristic(this.platform.Characteristic.Name, newName);
|
|
112
|
-
// Force metadata invalidation by updating the revision
|
|
113
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
114
|
-
const version = require('../../package.json').version;
|
|
115
|
-
infoService.updateCharacteristic(this.platform.Characteristic.SoftwareRevision, version);
|
|
116
|
-
// Update the Model and Serial if they were using the generic name
|
|
98
|
+
// Update the Model if it was using the generic name
|
|
117
99
|
const model = this.node.deviceConfig?.label || newName;
|
|
118
|
-
infoService.
|
|
100
|
+
infoService.updateCharacteristic(this.platform.Characteristic.Model, model);
|
|
119
101
|
// Update all features
|
|
120
102
|
for (const feature of this.features) {
|
|
121
103
|
feature.rename(newName);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseFeature = void 0;
|
|
4
|
-
const settings_1 = require("../platform/settings");
|
|
5
4
|
class BaseFeature {
|
|
6
5
|
platform;
|
|
7
6
|
accessory;
|
|
@@ -31,10 +30,7 @@ class BaseFeature {
|
|
|
31
30
|
// Sync internal property
|
|
32
31
|
service.displayName = serviceName;
|
|
33
32
|
if (service.testCharacteristic(this.platform.Characteristic.Name)) {
|
|
34
|
-
service.
|
|
35
|
-
}
|
|
36
|
-
if (service.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
37
|
-
service.updateCharacteristic(this.platform.Characteristic.ConfiguredName, serviceName);
|
|
33
|
+
service.getCharacteristic(this.platform.Characteristic.Name).updateValue(serviceName);
|
|
38
34
|
}
|
|
39
35
|
}
|
|
40
36
|
}
|
|
@@ -90,23 +86,8 @@ class BaseFeature {
|
|
|
90
86
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
91
87
|
service.setPrimaryService(true);
|
|
92
88
|
}
|
|
93
|
-
// Explicitly set the name characteristic
|
|
94
|
-
service.getCharacteristic(this.platform.Characteristic.Name)
|
|
95
|
-
.setProps({
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
-
perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
|
|
98
|
-
});
|
|
99
|
-
service.updateCharacteristic(this.platform.Characteristic.Name, serviceName);
|
|
100
|
-
// Also set ConfiguredName which many HomeKit versions prioritize for plugin-side renaming
|
|
101
|
-
if (!service.testCharacteristic(this.platform.Characteristic.ConfiguredName)) {
|
|
102
|
-
service.addOptionalCharacteristic(this.platform.Characteristic.ConfiguredName);
|
|
103
|
-
}
|
|
104
|
-
service.getCharacteristic(this.platform.Characteristic.ConfiguredName)
|
|
105
|
-
.setProps({
|
|
106
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
107
|
-
perms: [settings_1.HAPPerm.PAIRED_READ, settings_1.HAPPerm.NOTIFY],
|
|
108
|
-
});
|
|
109
|
-
service.updateCharacteristic(this.platform.Characteristic.ConfiguredName, serviceName);
|
|
89
|
+
// Explicitly set the name characteristic to ensure it's displayed correctly
|
|
90
|
+
service.getCharacteristic(this.platform.Characteristic.Name).updateValue(serviceName);
|
|
110
91
|
// Add Service Label Index for multi-endpoint devices to help with ordering/naming
|
|
111
92
|
if (this.endpoint.index > 0) {
|
|
112
93
|
if (!service.testCharacteristic(this.platform.Characteristic.ServiceLabelIndex)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-zwave-usb",
|
|
3
3
|
"displayName": "Homebridge Z-Wave USB",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.7",
|
|
5
5
|
"description": "A Homebridge dynamic platform plugin for Z-Wave USB controllers using zwave-js.",
|
|
6
6
|
"license": "Polyform-Noncommercial-1.0.0",
|
|
7
7
|
"funding": {
|