> Documentation index: https://developers.home.google.com/apis/ios/tools/llms.txt

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.

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

> [!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.
![Default device list populated after linking Google Home Playground](https://developers.home.google.com/static/tools/images/playground-default-devices.png) *Default device list populated after linking Google Home Playground*

## 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.
![Initial state of Google Home Playground highlighting the sign-in button](https://developers.home.google.com/static/tools/images/playground-signin.png) *Initial state of Google Home Playground highlighting the sign-in button*

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

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 using this panel.
- **Device info** presents the information of the selected virtual device. You can also edit this information and remove the selected virtual device using 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.
> ![Account linking prompt in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-complete-account-linking.png) *Account linking prompt in Google Home Playground*

## Virtual device

### View virtual device info

In the **Device list** panel, select the virtual device that you want 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.md.txt) 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 using 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.md.txt) - support supported smart home [traits](https://developers.home.google.com/cloud-to-cloud/traits.md.txt) - 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 dialog, 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**.

![Add or delete supported traits on a selected device in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-modify-traits.png) *Add or delete supported traits on a selected device in Google Home Playground*

### 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 want 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.md.txt#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.md.txt#ackneeded)) or personal identification number ([pinNeeded](https://developers.home.google.com/cloud-to-cloud/enhancements/secondary-user-verification.md.txt#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.

![Enable secondary user verification traits on a device in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-SUV.png) *Enable secondary user verification traits on a device in Google Home Playground*

### Identify devices that enable SUV

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

The following list of traits require SUV:

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

## Create a new virtual device

1. In the **Device list** panel, click **Add a device**.
2. In the dialog, 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.

![Add a new device type in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-add-device.png) *Add a new device type in Google Home Playground*

## Remove a virtual device

1. In the **Device list** panel, select the device that you want to remove. Then, in the **Device info** panel, select the **Basic Information** tab and click ![Remove virtual device 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 confirmation dialog.
3. Once you confirm the device's removal, the device will be removed from Home Graph.

![Remove a virtual device in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-remove-device.png) *Remove a virtual device in Google Home Playground*

> [!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.
![Button to open the sync response editor](https://developers.home.google.com/static/tools/images/playground-sync-response-editor.png) *Button to open the sync response editor*

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

## 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.
![Import and export virtual devices in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-import-export.png) *Import and export virtual devices in Google Home Playground*

### Export virtual devices to a file

1. Click to export virtual devices to a file.
2. Enter the filename you want to export, and click **OK**.
3. Once you've input the filename, 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:

```json
{
  "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.md.txt) 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.md.txt) 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.
![Supported device types and traits list in Google Home Playground](https://developers.home.google.com/static/tools/images/playground-supported-devices.png) *Supported device types and traits list in Google Home Playground*

## Report issues

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