diff --git a/packages/homebridge-ring/base-device-accessory.ts b/packages/homebridge-ring/base-device-accessory.ts index 56025f0b..1e3793b5 100644 --- a/packages/homebridge-ring/base-device-accessory.ts +++ b/packages/homebridge-ring/base-device-accessory.ts @@ -80,6 +80,16 @@ export abstract class BaseDeviceAccessory extends BaseDataAccessory serviceType: Service.AccessoryInformation, getValue: (data) => data.serialNumber || 'Unknown', }) + this.registerCharacteristic({ + characteristicType: Characteristic.Name, + serviceType: Service.AccessoryInformation, + getValue: (data) => data.name || 'Unknown', + }) + this.registerCharacteristic({ + characteristicType: Characteristic.ConfiguredName, + serviceType: Service.AccessoryInformation, + getValue: (data) => data.name || 'Unknown', + }) if ('volume' in initialData && 'setVolume' in device) { this.registerCharacteristic({ diff --git a/packages/homebridge-ring/camera.ts b/packages/homebridge-ring/camera.ts index 01001faa..a17fddc6 100644 --- a/packages/homebridge-ring/camera.ts +++ b/packages/homebridge-ring/camera.ts @@ -175,6 +175,26 @@ export class Camera extends BaseDataAccessory { serviceType: Service.AccessoryInformation, getValue: (data) => data.device_id, }) + this.registerCharacteristic({ + characteristicType: Characteristic.Name, + serviceType: Service.AccessoryInformation, + getValue: (data) => { + if ('metadata' in data && 'third_party_model' in data.metadata) { + return data.description + } + return device.name ?? 'Unknown' + }, + }) + this.registerCharacteristic({ + characteristicType: Characteristic.ConfiguredName, + serviceType: Service.AccessoryInformation, + getValue: (data) => { + if ('metadata' in data && 'third_party_model' in data.metadata) { + return data.description + } + return device.name ?? 'Unknown' + }, + }) if (device.hasBattery) { this.registerCharacteristic({ diff --git a/packages/homebridge-ring/chime.ts b/packages/homebridge-ring/chime.ts index 9eec5724..34daf85f 100644 --- a/packages/homebridge-ring/chime.ts +++ b/packages/homebridge-ring/chime.ts @@ -124,5 +124,15 @@ export class Chime extends BaseDataAccessory { serviceType: Service.AccessoryInformation, getValue: (data) => data.device_id || 'Unknown', }) + this.registerCharacteristic({ + characteristicType: Characteristic.Name, + serviceType: Service.AccessoryInformation, + getValue: () => device.name || 'Unknown', + }) + this.registerCharacteristic({ + characteristicType: Characteristic.ConfiguredName, + serviceType: Service.AccessoryInformation, + getValue: () => device.name || 'Unknown', + }) } } diff --git a/packages/homebridge-ring/intercom.ts b/packages/homebridge-ring/intercom.ts index 5dc52bae..ad60ce98 100644 --- a/packages/homebridge-ring/intercom.ts +++ b/packages/homebridge-ring/intercom.ts @@ -142,6 +142,16 @@ export class Intercom extends BaseDataAccessory { serviceType: Service.AccessoryInformation, getValue: (data) => data.device_id || 'Unknown', }) + this.registerCharacteristic({ + characteristicType: Characteristic.Name, + serviceType: Service.AccessoryInformation, + getValue: () => device.name || 'Unknown', + }) + this.registerCharacteristic({ + characteristicType: Characteristic.ConfiguredName, + serviceType: Service.AccessoryInformation, + getValue: () => device.name || 'Unknown', + }) } private getLockState() { diff --git a/packages/homebridge-ring/location-mode-switch.ts b/packages/homebridge-ring/location-mode-switch.ts index 498e3e08..7a68f113 100644 --- a/packages/homebridge-ring/location-mode-switch.ts +++ b/packages/homebridge-ring/location-mode-switch.ts @@ -161,5 +161,15 @@ export class LocationModeSwitch extends BaseAccessory { serviceType: AccessoryInformation, onValue: of('N/A'), }) + this.registerObservableCharacteristic({ + characteristicType: Characteristic.Name, + serviceType: AccessoryInformation, + onValue: of(accessoryName ?? 'Unknown'), + }) + this.registerObservableCharacteristic({ + characteristicType: Characteristic.ConfiguredName, + serviceType: AccessoryInformation, + onValue: of(accessoryName ?? 'Unknown'), + }) } } diff --git a/packages/homebridge-ring/panic-buttons.ts b/packages/homebridge-ring/panic-buttons.ts index d7cc6d8c..b7e7add1 100644 --- a/packages/homebridge-ring/panic-buttons.ts +++ b/packages/homebridge-ring/panic-buttons.ts @@ -87,6 +87,16 @@ export class PanicButtons extends BaseDataAccessory { serviceType: Service.AccessoryInformation, getValue: () => 'None', }) + this.registerCharacteristic({ + characteristicType: Characteristic.Name, + serviceType: Service.AccessoryInformation, + getValue: (data) => data.name || 'Unknown', + }) + this.registerCharacteristic({ + characteristicType: Characteristic.ConfiguredName, + serviceType: Service.AccessoryInformation, + getValue: (data) => data.name || 'Unknown', + }) super.initBase() }