homebridge-ring-secure-video 1.0.2 → 1.0.3
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 +10 -0
- package/README.md +6 -2
- package/lib/ring-logger.js +39 -0
- package/lib/ring-platform.js +2 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# homebridge-ring-secure-video
|
|
2
2
|
|
|
3
|
+
## 1.0.3 (2026-11-14)
|
|
4
|
+
|
|
5
|
+
- README: a doorbell press during a live view (in the Home app, or opened outside the plugin
|
|
6
|
+
through Ring) is now tested to start a recording with `doorbellPressMotion`.
|
|
7
|
+
- A live view or recording no longer logs `UNKNOWN MESSAGE` and a message as errors when Ring sends
|
|
8
|
+
`camera_options` (Ring confirming a setting ring-client-api 14.3.0 sends when a video session
|
|
9
|
+
starts, harmless); it is logged at debug. Any other unknown message is still logged as an error.
|
|
10
|
+
- "Pruning unused service" log lines include the service and device again (only the first words
|
|
11
|
+
were logged).
|
|
12
|
+
|
|
3
13
|
## 1.0.2 (2026-11-14)
|
|
4
14
|
|
|
5
15
|
- The package declares that it publishes accessories over HAP (the `supports-hap` keyword), as
|
package/README.md
CHANGED
|
@@ -179,8 +179,12 @@ no motion event, motion notification or HKSV recording starts during a live view
|
|
|
179
179
|
Protect, Ring may still save the live view itself). Once the live view is closed, motion is
|
|
180
180
|
reported again. Opening a live view doesn't cut off an HKSV recording that is already running
|
|
181
181
|
(both share one Ring connection), but that recording still ends as usual once its motion ends.
|
|
182
|
-
With `doorbellPressMotion` on, a doorbell press during a live view still starts a recording
|
|
183
|
-
|
|
182
|
+
With `doorbellPressMotion` on, a doorbell press during a live view still starts a recording:
|
|
183
|
+
tested with a Ring Video Doorbell 3 Plus, both with a live view open in the Home app and with one
|
|
184
|
+
opened outside the plugin, through Ring (a Brilliant panel's Ring integration). Ring delivered the
|
|
185
|
+
press each time, and HomeKit asked for the recording 2 to 3 seconds after the press reached the
|
|
186
|
+
plugin. The clip starts only once Ring's video arrives, and the plugin keeps no video from before
|
|
187
|
+
an event, so the moment of the press itself isn't in the clip.
|
|
184
188
|
|
|
185
189
|
With recording on, the Home app notifies about a camera's motion only after its home hub has
|
|
186
190
|
analysed the clip, which can be late or never. For a notification as soon as Ring reports
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video session messages Ring sends that ring-client-api 14.3.0 doesn't list, so it logs each as
|
|
3
|
+
* an "UNKNOWN MESSAGE" error followed by the message. camera_options is Ring confirming the
|
|
4
|
+
* stealth_mode setting the library sends when a session starts: harmless, so debug only.
|
|
5
|
+
*/
|
|
6
|
+
const HARMLESS_SESSION_MESSAGES = new Set(['camera_options']);
|
|
7
|
+
/** The logger ring-client-api uses, writing to the Homebridge log. */
|
|
8
|
+
export function createRingLogger(log) {
|
|
9
|
+
// ring-client-api logs "UNKNOWN MESSAGE" and then, right after, the message itself.
|
|
10
|
+
let unknownPending = false;
|
|
11
|
+
const flushUnknown = () => {
|
|
12
|
+
if (unknownPending) {
|
|
13
|
+
unknownPending = false;
|
|
14
|
+
log.error('UNKNOWN MESSAGE');
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
// Variadic, as ring-client-api's logInfo is (e.g. "Pruning unused service" with its details).
|
|
19
|
+
logInfo(...message) {
|
|
20
|
+
flushUnknown();
|
|
21
|
+
log.info(...message);
|
|
22
|
+
},
|
|
23
|
+
logError(message) {
|
|
24
|
+
if (message === 'UNKNOWN MESSAGE') {
|
|
25
|
+
flushUnknown();
|
|
26
|
+
unknownPending = true;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (unknownPending && HARMLESS_SESSION_MESSAGES.has(message?.method)) {
|
|
30
|
+
unknownPending = false;
|
|
31
|
+
// Not the whole message: its session_id is a session token.
|
|
32
|
+
log.debug(`Ring video session message ignored: ${message.method} (stealth_mode=${message.body?.stealth_mode})`);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
flushUnknown();
|
|
36
|
+
log.error(message);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
package/lib/ring-platform.js
CHANGED
|
@@ -25,6 +25,7 @@ import { readFileSync } from 'fs';
|
|
|
25
25
|
import { getSessionRefreshSensorUuid, SessionRefreshSensor, } from "./session-refresh-sensor.js";
|
|
26
26
|
import { PanicButtons } from "./panic-buttons.js";
|
|
27
27
|
import { logError, logInfo, useLogger } from 'ring-client-api/util';
|
|
28
|
+
import { createRingLogger } from "./ring-logger.js";
|
|
28
29
|
import { FloodFreezeSensor } from "./flood-freeze-sensor.js";
|
|
29
30
|
import { FreezeSensor } from "./freeze-sensor.js";
|
|
30
31
|
import { TemperatureSensor } from "./temperature-sensor.js";
|
|
@@ -319,14 +320,7 @@ export class RingPlatform {
|
|
|
319
320
|
return;
|
|
320
321
|
}
|
|
321
322
|
if (!config.disableLogs) {
|
|
322
|
-
useLogger(
|
|
323
|
-
logInfo(message) {
|
|
324
|
-
log.info(message);
|
|
325
|
-
},
|
|
326
|
-
logError(message) {
|
|
327
|
-
log.error(message);
|
|
328
|
-
},
|
|
329
|
-
});
|
|
323
|
+
useLogger(createRingLogger(log));
|
|
330
324
|
}
|
|
331
325
|
if (pushReceiverFix.result === 'failed') {
|
|
332
326
|
this.log.warn(`Could not fix Ring push notifications (${pushReceiverFix.detail}); instant motion and doorbell events may not arrive`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-ring-secure-video",
|
|
3
3
|
"displayName": "Ring Secure Video",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "Homebridge plugin for Ring devices with HomeKit Secure Video recording, based on homebridge-ring and homebridge-ring-hksv",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./lib/index.js",
|