google-device-access: fix readme, remove bad defaults

This commit is contained in:
Koushik Dutta
2022-04-25 10:45:00 -07:00
parent 9e76e2e2de
commit eae264fce1
4 changed files with 13 additions and 11 deletions

View File

@@ -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.

View File

@@ -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",

View File

@@ -50,5 +50,5 @@
"@types/node": "^14.17.11",
"@types/url-parse": "^1.4.3"
},
"version": "0.0.94"
"version": "0.0.95"
}

View File

@@ -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,