google-device-access: readme

This commit is contained in:
Koushik Dutta
2021-12-28 20:35:31 -08:00
parent 563702d521
commit 75cca4059e
3 changed files with 32 additions and 14 deletions

View File

@@ -1,15 +1,33 @@
# @scrypted/google-device-access
# Google Device Access Plugin for Scrypted
## npm commands
* npm run scrypted-webpack
* npm run scrypted-deploy <ipaddress>
* npm run scrypted-debug <ipaddress>
The Google Device Access Plugin allows you to import and control your Nest and Google devices from Scrypted.
## scrypted distribution via npm
1. Ensure package.json is set up properly for publishing on npm.
2. npm publish
## Setup
## Visual Studio Code configuration
Fllow steps at the link below to create your personal Google Device Access developer account Google Cloud developer account:
* If using a remote server, edit [.vscode/settings.json](blob/master/.vscode/settings.json) to specify the IP Address of the Scrypted server.
* Launch Scrypted Debugger from the launch menu.
* Google Device Access Project aka GDA ($5)
* Google Cloud Project aka GCP (might be within the free tier)
https://developers.google.com/nest/device-access/get-started
## Google Cloud Setup
1. Create a API & Services -> Credentials -> WebApplication with the following redirect URIs:
```
https://home.scrypted.app/web/oauth/callback
https://www.google.com
```
2. Open the API Dashboard -> Enable Cloud Pub/Sub
## Google Device Access Setup
1. Create the project.
2. Add the GCP client id.
3. Note the pub/sub topic.
### Scrypted Plugin Setup
1. Enter the GDA project id, GCP client id, and GCP secret.
2. Login.
3. Note the pubsub url.
## Google Cloud Console PubSub Setup
Create a pubsub *push* subscription and configure it using the previously noted GDA topic and Scrypted pubsub url.

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/google-device-access",
"version": "0.0.41",
"version": "0.0.42",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/google-device-access",
"version": "0.0.41",
"version": "0.0.42",
"dependencies": {
"@googleapis/smartdevicemanagement": "^0.2.0",
"axios": "^0.21.1",

View File

@@ -43,5 +43,5 @@
"@types/node": "^14.17.11",
"@types/url-parse": "^1.4.3"
},
"version": "0.0.41"
"version": "0.0.42"
}