[Cloud-to-cloud](https://developers.home.google.com/cloud-to-cloud/tools/home-playground) [Local Home SDK](https://developers.home.google.com/cloud-to-cloud/tools/home-playground) [Home APIs](https://developers.home.google.com/apis/android/tools/home-playground)

The Google Home Playground is a web application that simulates a smart
home project with configurable device types and traits. You can create virtual
devices, modify the device attributes and states, view these devices in
Google Home Graph, and import or export device configurations.

## Complete account linking

To use Google Home Playground, it is recommended that you first link the
tool to your account. Open the Google Home app (GHA) on your phone, and go
through the account linking process outlined at
[Connect third-party smart home devices in the Google Home app](https://support.google.com/googlenest/answer/9159862).

1. Search for the integration titled **Google Home Playground**.
2. Select the integration, and the GHA will direct you to the sign-in page. Click **Sign in with Google** and select your account to sign in.
3. Click the **Authorize** button to authorize account linking.

![This figure shows the Google Home app account linking flow for
connecting Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-app-login-flow.png)

> [!NOTE]
> **Note:** Make sure you sign in with the same account used in the GHA. If not, click the **Sign Out** button at the top-right corner and then click the **Sign in** button to select the same account.

Once you complete account linking, a set of default virtual devices will show on
the GHA for you to interact with.
![This figure shows the default device list that populates when a user
successfully links the Google Home Playground to their account.](https://developers.home.google.com/static/tools/images/playground-default-devices.png)

## Sign in

Launch Google Home Playground by clicking the button below:

[Launch Playground](https://home-playground.withgoogle.com/)

Click **Sign in with Google** . Make sure to sign in with the same account you
used in the GHA to complete account linking.
![This figure shows the initial state of the Google Home Playground,
and highlights the sign-in button in the upper right-hand corner.](https://developers.home.google.com/static/tools/images/playground-signin.png)

After you sign in, Google Home Playground will show the virtual devices
stored in Home Graph.
![This figure shows the device list, device info, and log area of the
default view of Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-sections.png)

The web UI consists of three panels:

- **Device list** shows all your virtual devices. You can select a certain virtual device to view its information and create virtual devices via this panel.
- **Device info** presents the information of the selected virtual device. You can also edit this information and remove the selected virtual device via the panel.
- **Log area** displays the interaction logs between Google Home Playground and Home Graph. You can expand the logs to inspect the request and response payloads for troubleshooting.

> [!NOTE]
>
> **Note:** If you have not completed account linking,
> Google Home Playground will still show virtual devices so that you
> can interact with them. The information of these virtual devices is not
> stored in Home Graph though and
> Google Home Playground will indicate that you need to complete
> account linking in order to sync virtual devices from and to
> Home Graph.
> ![This figure shows how Google Home Playground will indicate how to
> complete account linking in order to sync virtual devices from and
> to Home Graph](https://developers.home.google.com/static/tools/images/playground-complete-account-linking.png)

## Virtual device

### View virtual device info

In the **Device list** panel, select the virtual device that you wish to view.
In the **Device list** panel, select the virtual device that you wish to view.
The **Device info** panel will show its information categorized into five tabs:

- **Basic information:** top-level properties of the device, including device type, id, and name.
- **Traits:** supported traits of the device.
- **Attributes:** trait-specific attributes of the device.
- **States:** all device states.
- **SUV:** [Secondary User Verification](https://developers.home.google.com/cloud-to-cloud/enhancements/secondary-user-verification) configuration of the device.

### Edit virtual device info

Besides viewing a virtual device's information, you can also directly edit its
information stored in Home Graph via the **Device info**
panel.

### Modify supported traits

> [!NOTE]
> **Note:** The Google Home Playground may not list all available and supported smart home [traits](https://developers.home.google.com/cloud-to-cloud/traits) - support supported smart home [traits](https://developers.home.google.com/cloud-to-cloud/traits) - support for existing traits will be added with new releases of the tool.

1. Select the **Traits** tab; click the **Edit** button.
2. In the pop-up panel, you can see the device's currently supported traits, and available traits to add. Use the **arrow** (arrow_forward/arrow_back) buttons to add or remove supported traits for the device.
3. When you've finished updating the supported traits, click **Save** , and the updated traits will be applied to Home Graph.
4. You can view these trait updates in the **Log area**.

![This figure shows the UX tool for adding or deleting supported
traits on a selected device in the Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-modify-traits.png)

### Modify device attributes

1. Select the **Attributes** tab, and edit the attribute for the traits supported by the device.
2. Once you've finished editing, press **Enter** and your attribute changes will be applied to Home Graph.
3. You can view these updated attributes in the **Log area**.

### Modify device states

1. Select the **States** tab and edit the state directly. The state changes will be applied to Home Graph.
2. You can view these state modifications in the **Log area**.

### Add a secondary user verification to virtual device

You can add an SUV to virtual devices and configure its challenge type and
corresponding behavior on each device.
You can add an SUV to virtual devices and configure its challenge type and
corresponding behavior on each device.

#### Configure SUV on device

1. In the **Device list** panel, select the virtual device that you wish to configure.
2. In the **Device info** panel, select the **SUV** tab and configure the following:
   - **Enabled:** whether SUV is enabled or disabled ([no challenge](https://developers.home.google.com/cloud-to-cloud/enhancements/secondary-user-verification#no-challenge)) on the device.
   - **Challenge type:** whether SUV requires explicit acknowledgment ([ackNeeded](https://developers.home.google.com/cloud-to-cloud/enhancements/secondary-user-verification#ackneeded)) or personal identification number ([pinNeeded](https://developers.home.google.com/cloud-to-cloud/enhancements/secondary-user-verification#pinneeded)).
   - **PIN:** The valid PIN.
   - **Handling of incorrect PIN:** when the PIN is wrong, whether to ask the user again and, if not, the error to respond.

![This figure shows the UX tool for enabling secondary user
verification traits on a selected device in the Google Home
Playground.](https://developers.home.google.com/static/tools/images/playground-SUV.png)

### Identify devices that enable SUV

In the **Device list** panel, a **key icon**
key displays next to
each SUV-enabled device.
![This figure shows devices that are recommended to enable secondary
user verification.](https://developers.home.google.com/static/tools/images/playground-enable-SUV.png)

The following list of traits require SUV:

- [ArmDisarm](https://developers.home.google.com/cloud-to-cloud/traits/armdisarm)
- [LockUnlock](https://developers.home.google.com/cloud-to-cloud/traits/lockunlock)
- [OpenClose](https://developers.home.google.com/cloud-to-cloud/traits/openclose)
- [Reboot](https://developers.home.google.com/cloud-to-cloud/traits/reboot)
- [SoftwareUpdate](https://developers.home.google.com/cloud-to-cloud/traits/softwareupdate)

## Create a new virtual device

1. In the **Device list** panel, click **Add a device**.
2. In the pop-up panel, select the device type and input the device name for your new device. Alternatively, you can select a predefined set of devices to add.
3. Once you complete all the steps, the new device will be added to Home Graph.

![This figure shows the UX tool for adding a new device type in
Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-add-device.png)

## Remove a virtual device

1. In the **Device list** panel, select the device that you wish to remove. Then, in the **Device info** panel, select the **Basic Information** tab and Then, in the **Device info** panel, select the **Basic Information** tab and click ![Trash icon](https://developers.home.google.com/static/tools/images/trash-icon.svg)**Remove device** at the bottom.
2. Confirm the device removal in the pop-up alert.
3. Once you confirm the device's removal, the device will be removed from Home Graph.

![This figure shows the UX tool for removing a virtual device type in
Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-remove-device.png)

> [!WARNING]
> **Warning:** If you have only one virtual device, Google Home Playground will prevent you from removing it to avoid an empty `SYNC` response being sent, which can cause issues attempting to relink accounts.

## Sync Response Editor

You can validate or update your sync response in Google Home Playground.
Click **Sync Response Editor** to open an embedded IDE.
![This figure shows the button to open the sync response editor.](https://developers.home.google.com/static/tools/images/playground-sync-response-editor.png)

Edit, or copy and paste, your sync response and click **Save** to apply changes
to see how it works in the Google Home ecosystem.
![This figure shows the window to edit the sync response.](https://developers.home.google.com/static/tools/images/playground-sync-response-window.png)

## Import and Export virtual devices

For troubleshooting or reproducing issues, you can export your virtual devices
with their states to a file, and share with others the file to import and
replicate your virtual devices.
![This figure shows the UX tool for importing and exporting virtual
devices in Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-import-export.png)

### Export virtual devices to a file

1. Click to export virtual devices to a file.
2. Enter the file name you want to export, and click **OK**.
3. Once you've input the file name, the browser will download the file of exported virtual devices.

### Import virtual devices from a file

1. Click to import virtual devices from a file.
2. Select the file you want to import, and click **OK**.
3. Once you confirm the file to import, Google Home Playground will import virtual devices with states from the file, and update the imported devices' information and states in Home Graph.

> [!WARNING]
> **Warning:** Importing devices will overwrite the current Google Home Playground configuration.

## Inspect interaction logs

When you interact with the virtual devices, Google Home Playground
automatically applies your change to Home Graph. The
interactions with Home Graph are recorded to the **Log area**
panel, where you can expand each entry to inspect the
Home Graph API request and response payloads.

Each log entry is a JSON array, containing elements of the following structure:

    {
      "uri": string,
      "request": object,
      "response": object
    }

| Fields | Type | Description |
|---|---|---|
| `uri` | `string` | URL of the Home Graph API call. |
| `request` | `object` | Request body of the Home Graph API call. See the [reference documentation](https://developers.home.google.com/cloud-to-cloud/reference/home-graph/rest/v1/devices) [reference documentation](https://developers.home.google.com/reference/home-graph/rest/v1/devices) for the format of each method. |
| `response` | `object` | Response body of the Home Graph API call. See the [reference documentation](https://developers.home.google.com/cloud-to-cloud/reference/home-graph/rest/v1/devices) [reference documentation](https://developers.home.google.com/reference/home-graph/rest/v1/devices) for the format of each method. |

## View supported device types and traits

The **question mark** help
icon in the top right will display the current device type and trait list
supported by Google Home Playground.
![This figure shows the UX tool for adding a new device type in
Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-supported-devices.png)

## Report issues

We would like to hear from you! Report encountered issues using the
**exclamation mark icon**
feedback on the
top right.
![This figure shows the icons for providing feedback and reporting
issues in Google Home Playground.](https://developers.home.google.com/static/tools/images/playground-feedback.png)