From eae264fce1889c8a6ee636ce18867ddffa88ec30 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 25 Apr 2022 10:45:00 -0700 Subject: [PATCH] google-device-access: fix readme, remove bad defaults --- plugins/google-device-access/README.md | 4 +++- plugins/google-device-access/package-lock.json | 4 ++-- plugins/google-device-access/package.json | 2 +- plugins/google-device-access/src/main.ts | 14 +++++++------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/plugins/google-device-access/README.md b/plugins/google-device-access/README.md index 93b25e3cc..42a4bff86 100644 --- a/plugins/google-device-access/README.md +++ b/plugins/google-device-access/README.md @@ -25,7 +25,9 @@ https://developers.google.com/nest/device-access/get-started https://home.scrypted.app/web/oauth/callback https://www.google.com ``` -2. Open the API Dashboard -> Enable Cloud Pub/Sub. You will come back to this again below. +2. Open the API Dashboard and enable the following APIs: + * Smart Device Management API + * Cloud Pub/Sub: You will come back to this again below. ### Google Device Access Setup 1. Create the project. diff --git a/plugins/google-device-access/package-lock.json b/plugins/google-device-access/package-lock.json index f666b4283..d072943af 100644 --- a/plugins/google-device-access/package-lock.json +++ b/plugins/google-device-access/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/google-device-access", - "version": "0.0.94", + "version": "0.0.95", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/google-device-access", - "version": "0.0.94", + "version": "0.0.95", "dependencies": { "@googleapis/smartdevicemanagement": "^0.2.0", "@scrypted/common": "file:../../common", diff --git a/plugins/google-device-access/package.json b/plugins/google-device-access/package.json index bd7895104..4143ed2c4 100644 --- a/plugins/google-device-access/package.json +++ b/plugins/google-device-access/package.json @@ -50,5 +50,5 @@ "@types/node": "^14.17.11", "@types/url-parse": "^1.4.3" }, - "version": "0.0.94" + "version": "0.0.95" } diff --git a/plugins/google-device-access/src/main.ts b/plugins/google-device-access/src/main.ts index 2ea38226f..e23f3abed 100644 --- a/plugins/google-device-access/src/main.ts +++ b/plugins/google-device-access/src/main.ts @@ -5,7 +5,7 @@ import ClientOAuth2 from 'client-oauth2'; import { URL } from 'url'; import axios from 'axios'; import throttle from 'lodash/throttle'; -import { connectRTCSignalingClients } from '@scrypted/common/src/rtc-connect'; +import { connectRTCSignalingClients } from '@scrypted/common/src/rtc-signaling'; import { sleep } from '@scrypted/common/src/sleep'; import fs from 'fs'; import { randomBytes } from 'crypto'; @@ -636,23 +636,23 @@ export class GoogleSmartDeviceAccess extends ScryptedDeviceBase implements Oauth key: 'projectId', title: 'Project ID', description: 'Google Device Access Project ID', - value: this.storage.getItem('projectId'), // || '778da527-9690-4368-9c96-6872bb29e7a0', + value: this.storage.getItem('projectId'), }, { key: 'clientId', title: 'Google OAuth Client ID', - description: 'Optional: The Google OAuth Client ID to use. The default value will use Scrypted Cloud OAuth login.', - value: this.storage.getItem('clientId') || '827888101440-6jsq0saim1fh1abo6bmd9qlhslemok2t.apps.googleusercontent.com', + description: 'The Google OAuth Client ID from Google Cloud Project.', + value: this.storage.getItem('clientId'), }, { key: 'clientSecret', title: 'Google OAuth Client Secret', - description: 'Optional: The Google OAuth Client Secret to use. The default value will use Scrypted Cloud login.', - value: this.storage.getItem('clientSecret') || 'nXgrebmaHNvZrKV7UDJV3hmg', + description: 'The Google OAuth Client Secret from Google Cloud Project.', + value: this.storage.getItem('clientSecret'), }, { title: "PubSub Address", - description: "The PubSub address to enter in Google Cloud console.", + description: "The PubSub address to enter in Google Cloud Project.", key: 'pubsubAddress', readonly: true, value: endpoint,