homebridge-ring 11.7.5 → 11.7.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.
- package/CHANGELOG.md +22 -0
- package/README.md +6 -0
- package/config.schema.json +1 -1
- package/lib/config.js +4 -3
- package/lib/homebridge-ui/server.js +8 -1
- package/lib/ring-platform.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# homebridge-ring
|
|
2
2
|
|
|
3
|
+
## 11.7.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f3e66fd`](https://github.com/dgreif/ring/commit/f3e66fdbeb960a9ba35ff26289a054c537bac890) Thanks [@dgreif](https://github.com/dgreif)! - Subscribe to ding/motion events every time the user session is refreshed. This currently happens every 12 hours. This is an attempt to fix motion/ding notifications after restarting, but I am unable to reproduce the issue and verify this change fixes it.
|
|
8
|
+
|
|
9
|
+
- [`b9881a7`](https://github.com/dgreif/ring/commit/b9881a7b5ed6684bf6dc0464354af7acf1cc77ea) Thanks [@dgreif](https://github.com/dgreif)! - Prevent a duplicate device named "Device name not found" from being created when logging into homebridge with the homebridge ui.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`f3e66fd`](https://github.com/dgreif/ring/commit/f3e66fdbeb960a9ba35ff26289a054c537bac890), [`af7f44e`](https://github.com/dgreif/ring/commit/af7f44e5f1f97274a8902063b621bde1e94bd08f)]:
|
|
12
|
+
- ring-client-api@11.7.7
|
|
13
|
+
|
|
14
|
+
## 11.7.6
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`8ef4c15`](https://github.com/dgreif/ring/commit/8ef4c15cda4501e60a5ba4a104495ef5013ee92f) Thanks [@dgreif](https://github.com/dgreif)! - Recreate the session every 12 hours. This is intended to fix an ongoing issue with Push Notifications for users outside the US. We believe Ring is deleting session data after ~24 hours for Data Residency reasons, and that recreating the session periodically should allow notifications to work indefinitely. Note, this has not been verified to fix the issue yet. See https://github.com/dgreif/ring/issues/1218 for more details.
|
|
19
|
+
|
|
20
|
+
- [`f2e59aa`](https://github.com/dgreif/ring/commit/f2e59aa27a266c38c20b9ecdc2aa1e0184fb9cae) Thanks [@dgreif](https://github.com/dgreif)! - Update location id placeholder in the homebridge ui to reflect the expected format. Closes #1177
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`8ef4c15`](https://github.com/dgreif/ring/commit/8ef4c15cda4501e60a5ba4a104495ef5013ee92f)]:
|
|
23
|
+
- ring-client-api@11.7.6
|
|
24
|
+
|
|
3
25
|
## 11.7.5
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -18,6 +18,10 @@ the [Ring Alarm System](https://shop.ring.com/pages/security-system),
|
|
|
18
18
|
[Ring Smart Lighting](https://shop.ring.com/pages/smart-lighting),
|
|
19
19
|
and third party devices that connect to the Ring Alarm System.
|
|
20
20
|
|
|
21
|
+
## Troubleshooting Issues
|
|
22
|
+
|
|
23
|
+
If you are having issues, please look for related articles in the [wiki](https://github.com/dgreif/ring/wiki) and search existing [Issues](https://github.com/dgreif/ring/issues) before opening a new Issue/Discussion
|
|
24
|
+
|
|
21
25
|
## Installation
|
|
22
26
|
|
|
23
27
|
Assuming a global installation of `homebridge`:
|
|
@@ -124,6 +128,8 @@ HomeKit with a snapshot from the camera
|
|
|
124
128
|
|
|
125
129
|
If you are having issues with your cameras in the Home app, please see the [Camera Troubleshooting Wiki](https://github.com/dgreif/ring/wiki/Camera-Troubleshooting)
|
|
126
130
|
|
|
131
|
+
If you are having issues with Notifications, please see the [Notification Troubleshooting Wiki](https://github.com/dgreif/ring/wiki/Notification-Troubleshooting)
|
|
132
|
+
|
|
127
133
|
Note: Although homebridge has support for HomeKit Secure Video (HKSV), I will not be adding it to this plugin. Please see [this issue](https://github.com/dgreif/ring/issues/860#issuecomment-1021584211) for more details.
|
|
128
134
|
|
|
129
135
|
### Supported Devices via Ring Alarm and Ring Smart Lighting Hubs
|
package/config.schema.json
CHANGED
package/lib/config.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.debug = exports.getSystemId = exports.updateHomebridgeConfig = void 0;
|
|
3
|
+
exports.debug = exports.getSystemId = exports.updateHomebridgeConfig = exports.controlCenterDisplayName = void 0;
|
|
4
4
|
const fs_1 = require("fs");
|
|
5
5
|
const crypto_1 = require("crypto");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
const systemIdFileName = '.ring.json';
|
|
8
|
+
exports.controlCenterDisplayName = 'homebridge-ring';
|
|
8
9
|
function updateHomebridgeConfig(homebridge, update) {
|
|
9
10
|
const configPath = homebridge.user.configPath(), config = (0, fs_1.readFileSync)(configPath).toString(), updatedConfig = update(config);
|
|
10
11
|
if (config !== updatedConfig) {
|
|
@@ -17,8 +18,8 @@ exports.updateHomebridgeConfig = updateHomebridgeConfig;
|
|
|
17
18
|
function createSystemId() {
|
|
18
19
|
return (0, crypto_1.createHash)('sha256').update((0, crypto_1.randomBytes)(32)).digest('hex');
|
|
19
20
|
}
|
|
20
|
-
function getSystemId(
|
|
21
|
-
const
|
|
21
|
+
function getSystemId(homebridgeStoragePath) {
|
|
22
|
+
const filePath = (0, path_1.join)(homebridgeStoragePath, systemIdFileName);
|
|
22
23
|
try {
|
|
23
24
|
const ringContext = JSON.parse((0, fs_1.readFileSync)(filePath).toString());
|
|
24
25
|
if (ringContext.systemId) {
|
|
@@ -3,12 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
/* eslint-disable no-console */
|
|
4
4
|
const plugin_ui_utils_1 = require("@homebridge/plugin-ui-utils");
|
|
5
5
|
const rest_client_1 = require("ring-client-api/rest-client");
|
|
6
|
+
const config_1 = require("../config");
|
|
6
7
|
class PluginUiServer extends plugin_ui_utils_1.HomebridgePluginUiServer {
|
|
7
8
|
constructor() {
|
|
8
9
|
super();
|
|
9
10
|
this.generateCode = async ({ email, password }) => {
|
|
10
11
|
console.log(`Logging in with email '${email}'`);
|
|
11
|
-
|
|
12
|
+
const storagePath = this.homebridgeStoragePath;
|
|
13
|
+
this.restClient = new rest_client_1.RingRestClient({
|
|
14
|
+
email,
|
|
15
|
+
password,
|
|
16
|
+
controlCenterDisplayName: config_1.controlCenterDisplayName,
|
|
17
|
+
systemId: storagePath ? (0, config_1.getSystemId)(storagePath) : undefined,
|
|
18
|
+
});
|
|
12
19
|
try {
|
|
13
20
|
const { refresh_token } = await this.restClient.getCurrentAuth();
|
|
14
21
|
// If we get here, 2fa was not required. I'm not sure this is possible anymore, but it's here just in case
|
package/lib/ring-platform.js
CHANGED
|
@@ -152,8 +152,8 @@ class RingPlatform {
|
|
|
152
152
|
this.homebridgeAccessories[accessory.UUID] = accessory;
|
|
153
153
|
}
|
|
154
154
|
async connectToApi() {
|
|
155
|
-
const { api, config } = this, systemId = (0, config_1.getSystemId)(api), ringApi = new ring_client_api_1.RingApi({
|
|
156
|
-
controlCenterDisplayName:
|
|
155
|
+
const { api, config } = this, systemId = (0, config_1.getSystemId)(api.user.storagePath()), ringApi = new ring_client_api_1.RingApi({
|
|
156
|
+
controlCenterDisplayName: config_1.controlCenterDisplayName,
|
|
157
157
|
...config,
|
|
158
158
|
systemId,
|
|
159
159
|
}), locations = await ringApi.getLocations(), cachedAccessoryIds = Object.keys(this.homebridgeAccessories), platformAccessories = [], externalAccessories = [], activeAccessoryIds = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-ring",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.7",
|
|
4
4
|
"description": "Homebridge plugin for Ring doorbells, cameras, security alarm system and smart lighting",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@homebridge/camera-utils": "^2.2.0",
|
|
15
15
|
"@homebridge/plugin-ui-utils": "^0.0.19",
|
|
16
|
-
"ring-client-api": "11.7.
|
|
16
|
+
"ring-client-api": "11.7.7"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"concurrently": "^7.6.0",
|