Device Access - Sample App

Help Hover over each tip to learn more!

Account Linking

? 1 - Account Linking is the first step for Device Access integration. The app will follow OAuth flow to retrieve user consent.

Client Id and Client Secret can be obtained from Google Cloud Platform.

Project Id is the identifier of the project created in Device Access Console.

The dropdown controls the target API, which will determine the endpoints used for account linking and execution.

Completing OAuth flow and correctly signing in will enable the other controls.




Pending... Pending... Pending...
OAuth Code Access Token Refresh Token

Device Access

? 2 - Device Access panel provides controls for subscribing to events, accessing Resource Picker, as well as calling ListDevices and ListStructures methods.

Each time the page page is refreshed, the app will issue a ListDevices automatically.

Device Events

? 3 - Events (Optional) allow you to receive asynchronous activity associated with target devices. To subscribe to events, you need to provide a Service Account Key and a Subscription Id.

Your Service Account Key is used locally to sign the pub-sub requests. It does not leave the browser.




Device Control

? 4 - Device Control panel provides controls for devices linked to the user. You can chose the device from the dropdown.

Currently devices supported are Nest Thermostat, Camera and Doorbell.


Analytics

Initialize WebRTC =>
setLocalDescription

Send SDP Offer =>
Receive SDP Answer

Receive SDP Answer =>
Connected

Connected =>
Playback started

-

-

-

-

Application Logs

? 5 - Application Logs provide logs for each interaction captured by this application.

Logs are categorized into three groups: actions happened within the app, HTTP requests and pub-sub events.