homebridge-ring-hksv 14.3.3 → 14.3.5

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
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ### Patch Changes
6
+
7
+ - Prevent lock accessories from reporting invalid `LockTargetState` values when Ring reports a jammed or unknown current state. This removes repeated Homebridge warnings while preserving the correct current lock state in HomeKit.
8
+
9
+ ## 14.3.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 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.
14
+
5
15
  ### Minor Changes
6
16
 
7
17
  - 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.
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
  }
package/lib/lock.js CHANGED
@@ -55,6 +55,15 @@ export class Lock extends BaseDeviceAccessory {
55
55
  return this.device.sendCommand(`lock.${command}`);
56
56
  }
57
57
  getTargetState(data) {
58
- return this.targetState || getCurrentState(data);
58
+ if (this.targetState !== undefined) {
59
+ return this.targetState;
60
+ }
61
+ const { Characteristic: { LockCurrentState, LockTargetState }, } = hap;
62
+ const currentState = getCurrentState(data);
63
+ if (currentState === LockCurrentState.JAMMED ||
64
+ currentState === LockCurrentState.UNKNOWN) {
65
+ return LockTargetState.SECURED;
66
+ }
67
+ return currentState;
59
68
  }
60
69
  }
@@ -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;
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.3",
4
+ "version": "14.3.5",
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": {