diff --git a/plugins/google-device-access/README.md b/plugins/google-device-access/README.md index a30850a0b..0f0fe4dde 100644 --- a/plugins/google-device-access/README.md +++ b/plugins/google-device-access/README.md @@ -1,15 +1,33 @@ -# @scrypted/google-device-access +# Google Device Access Plugin for Scrypted -## npm commands - * npm run scrypted-webpack - * npm run scrypted-deploy - * npm run scrypted-debug +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. diff --git a/plugins/google-device-access/package-lock.json b/plugins/google-device-access/package-lock.json index 6dc8e77ed..131d02e0d 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.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", diff --git a/plugins/google-device-access/package.json b/plugins/google-device-access/package.json index 272218a5d..9dcf2e719 100644 --- a/plugins/google-device-access/package.json +++ b/plugins/google-device-access/package.json @@ -43,5 +43,5 @@ "@types/node": "^14.17.11", "@types/url-parse": "^1.4.3" }, - "version": "0.0.41" + "version": "0.0.42" }