homebridge-ring-hksv 14.3.2 → 14.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # homebridge-ring-hksv
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 14.3.4
6
+
7
+ ### Patch Changes
8
+
9
+ - Fix Homebridge platform discovery by using the current platform registration API and explicit package entry metadata. This addresses installs where the plugin appeared in Homebridge UI but Homebridge could not resolve the `Homebridge Ring HKSV` platform during boot.
10
+
11
+ ### Minor Changes
12
+
13
+ - Add `homeKitAccessoryTag` to append a custom tag to Ring accessory names and generated HomeKit identities. This helps expose the same physical camera/accessory as a distinct HomeKit device for debugging or multi-home testing.
14
+
3
15
  ## 14.3.2
4
16
 
5
17
  ### Main Changes
package/README.md CHANGED
@@ -31,6 +31,7 @@ Big thanks to Dustin and all upstream contributors. This fork reuses and extends
31
31
  | `hksvPrebufferLengthMs` | HKSV prebuffer duration (minimum 4000ms) |
32
32
  | `hksvFragmentLengthMs` | HKSV fragment duration target |
33
33
  | `hksvMaxRecordingSeconds` | Optional safety cap for a recording session |
34
+ | `homeKitAccessoryTag` | Appends a tag to accessory names and HomeKit IDs so the same Ring device can be exposed as a distinct HomeKit accessory for debugging/testing |
34
35
  | `cameraVideoCodec` | Preferred H.264 encoder (`h264_videotoolbox` or `libx264`) |
35
36
  | `hideDoorbellSwitch` / `hideCameraMotionSensor` / `hideCameraSirenSwitch` | Hides specific HomeKit-exposed services |
36
37
  | `showPanicButtons` | Adds panic switches (use with caution) |
@@ -61,11 +62,23 @@ Add a platform block with your Ring refresh token:
61
62
 
62
63
  ```json
63
64
  {
64
- "platform": "RingHKSV",
65
+ "platform": "Homebridge Ring HKSV",
65
66
  "refreshToken": "your-refresh-token"
66
67
  }
67
68
  ```
68
69
 
70
+ If you need Home app to treat the same physical Ring device as a different HomeKit accessory, add a `homeKitAccessoryTag`:
71
+
72
+ ```json
73
+ {
74
+ "platform": "Homebridge Ring HKSV",
75
+ "refreshToken": "your-refresh-token",
76
+ "homeKitAccessoryTag": "Debug Home A"
77
+ }
78
+ ```
79
+
80
+ Changing `homeKitAccessoryTag` updates both the exposed accessory name and the generated HomeKit identity, which changes the advertised MAC-style identifier shown during manual camera pairing.
81
+
69
82
  ## HKSV Status
70
83
 
71
84
  HKSV support is experimental and actively evolving. Behavior may vary by camera model, wired vs battery power, Ring API changes, and FFmpeg environment.
@@ -53,6 +53,11 @@
53
53
  "maximum": 300,
54
54
  "description": "Optional safety cap for a single HKSV recording stream duration."
55
55
  },
56
+ "homeKitAccessoryTag": {
57
+ "title": "HomeKit Accessory Tag",
58
+ "type": "string",
59
+ "description": "Optional tag appended to Ring accessory names and HomeKit identities. Change this to expose the same Ring devices as distinct accessories in Home app for debugging or multi-home testing."
60
+ },
56
61
  "cameraVideoCodec": {
57
62
  "title": "Camera Video Codec",
58
63
  "type": "string",
@@ -210,6 +215,7 @@
210
215
  "hksvPrebufferLengthMs",
211
216
  "hksvFragmentLengthMs",
212
217
  "hksvMaxRecordingSeconds",
218
+ "homeKitAccessoryTag",
213
219
  "cameraVideoCodec",
214
220
  "hideLightGroups",
215
221
  "hideDoorbellSwitch",
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { platformName, pluginName, RingPlatform } from "./ring-platform.js";
1
+ import { platformName, RingPlatform } from "./ring-platform.js";
2
2
  import { setHap } from "./hap.js";
3
- export default function (homebridge) {
4
- setHap(homebridge.hap);
5
- homebridge.registerPlatform(pluginName, platformName, RingPlatform, true);
3
+ export default function (api) {
4
+ setHap(api.hap);
5
+ api.registerPlatform(platformName, RingPlatform);
6
6
  }
@@ -37,7 +37,7 @@ const ignoreHiddenDeviceTypes = [
37
37
  RingDeviceType.BeamsDevice,
38
38
  RingDeviceType.PanicButton,
39
39
  ];
40
- export const platformName = 'RingHKSV';
40
+ export const platformName = 'Homebridge Ring HKSV';
41
41
  export const pluginName = 'homebridge-ring-hksv';
42
42
  function getAccessoryClass(device) {
43
43
  const { deviceType } = device;
@@ -130,7 +130,7 @@ export class RingPlatform {
130
130
  });
131
131
  }
132
132
  if (!config) {
133
- logInfo('No configuration found for platform RingHKSV');
133
+ logInfo('No configuration found for platform Homebridge Ring HKSV');
134
134
  return;
135
135
  }
136
136
  config.cameraStatusPollingSeconds = config.cameraStatusPollingSeconds ?? 20;
@@ -155,7 +155,11 @@ export class RingPlatform {
155
155
  this.homebridgeAccessories[accessory.UUID] = accessory;
156
156
  }
157
157
  async connectToApi() {
158
- const { api, config } = this, systemId = getSystemId(api.user.storagePath()), ringApi = new RingApi({
158
+ const { api, config } = this, systemId = getSystemId(api.user.storagePath()), configuredHomeKitAccessoryTag = config.homeKitAccessoryTag?.trim(), accessoryIdSuffix = configuredHomeKitAccessoryTag
159
+ ? `-${configuredHomeKitAccessoryTag}`
160
+ : '', accessoryNameSuffix = configuredHomeKitAccessoryTag
161
+ ? ` (${configuredHomeKitAccessoryTag})`
162
+ : '', ringApi = new RingApi({
159
163
  controlCenterDisplayName,
160
164
  ...config,
161
165
  systemId,
@@ -182,8 +186,9 @@ export class RingPlatform {
182
186
  isCamera,
183
187
  id: device.id.toString() +
184
188
  cameraIdDifferentiator +
185
- cameraIdentitySalt,
186
- name: device.name,
189
+ cameraIdentitySalt +
190
+ accessoryIdSuffix,
191
+ name: device.name + accessoryNameSuffix,
187
192
  AccessoryClass,
188
193
  };
189
194
  }), hideDeviceIds = config.hideDeviceIds || [], onlyDeviceTypes = config.onlyDeviceTypes?.length
@@ -194,8 +199,8 @@ export class RingPlatform {
194
199
  deviceType: securityPanel.deviceType,
195
200
  device: securityPanel,
196
201
  isCamera: false,
197
- id: securityPanel.id.toString() + 'panic',
198
- name: 'Panic Buttons',
202
+ id: securityPanel.id.toString() + 'panic' + accessoryIdSuffix,
203
+ name: 'Panic Buttons' + accessoryNameSuffix,
199
204
  AccessoryClass: PanicButtons,
200
205
  });
201
206
  }
@@ -205,8 +210,8 @@ export class RingPlatform {
205
210
  deviceType: 'location.mode',
206
211
  device: location,
207
212
  isCamera: false,
208
- id: location.id + 'mode',
209
- name: location.name + ' Mode',
213
+ id: location.id + 'mode' + accessoryIdSuffix,
214
+ name: location.name + ' Mode' + accessoryNameSuffix,
210
215
  AccessoryClass: LocationModeSwitch,
211
216
  });
212
217
  }
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "homebridge-ring-hksv",
3
3
  "displayName": "Homebridge Ring HKSV",
4
- "version": "14.3.2",
4
+ "version": "14.3.4",
5
5
  "description": "Homebridge plugin for Ring devices with HomeKit Secure Video support",
6
6
  "type": "module",
7
- "main": "lib/index.js",
7
+ "main": "./lib/index.js",
8
+ "exports": "./lib/index.js",
8
9
  "scripts": {
9
- "build": "rm -rf lib && tsc && cp -r ./homebridge-ui/public ./lib/homebridge-ui/public/",
10
+ "build": "node -e \"require('fs').rmSync('lib', { recursive: true, force: true })\" && tsc && node -e \"require('fs').cpSync('./homebridge-ui/public', './lib/homebridge-ui/public', { recursive: true })\"",
10
11
  "lint": "eslint .",
12
+ "prepack": "npm run build",
11
13
  "dev": "concurrently -c yellow,blue --kill-others \"npm:dev:build\" \"npm:dev:run\" ",
12
14
  "dev:build": "tsc --watch --preserveWatchOutput",
13
15
  "dev:run": "RING_DEBUG=true node --watch ./node_modules/.bin/homebridge -U ./.homebridge -P ./node_modules"
@@ -32,6 +34,10 @@
32
34
  "node": "^20 || ^22 || ^24",
33
35
  "homebridge": ">=1.4.0 || ^2.0.0-beta.0"
34
36
  },
37
+ "homebridge": {
38
+ "pluginAlias": "Homebridge Ring HKSV",
39
+ "pluginType": "platform"
40
+ },
35
41
  "author": "trinityhades",
36
42
  "license": "MIT",
37
43
  "repository": {