Smart home Actions are structured differently than Conversational Actions. The process for how users trigger Actions and the Actions' conversations are handled for you; all you need to do is handle smart home intents on your service.
For a full end-to-end sample of a Google smart home Action:
If you are not using the end-to-end sample, follow these instructions.
To create a smart home Action:
- Set up an OAuth 2.0 server for account linking.
- Create an Actions on Google developer project.
- Add authentication to your project
Set up an OAuth 2.0 server
You must have a public OAuth 2.0 server for authenticating users.
Authentication allows you to link your users' Google accounts with user accounts in your authentication system. This allows you to identify your users when your fulfillment receives a smart home intent. Google smart home only supports OAuth with an authorization code flow.
For instructions on how to set up your OAuth 2.0 server, see Implement OAuth account linking.
Create an Actions on Google developer project
To create a developer project:
- Go to the Actions console.
- Click New project.
- Enter a name for your project and click Create Project.
- Once your project is created, click Smart Home.
- Click Start building.
- Under Quick Setup, click Name your Smart Home action. Enter the name for your Action and click Save. This is the name of the smart home Action that you can connect to from the Google Home app.
- Click Actions in the left menu.
- In the Fulfillment URL field, enter a URL for the backend server that will provide fulfillment for the smart home intents and then click Save. To learn more about how fulfillment works, see fulfillment and authentication.
- In the upper menu, click Test. In the Simulator page, click
Start Testing to finish your project setup. To learn more about
Test and share smart home Actions.
You have successfully created a smart home Actions project and provided a fulfillment URL. You can now add authentication to your project.
Add authentication to your project
Once you have setup your authentication server and created a project, you need to add authentication to your project. To do this, follow the instructions in the Configure account linking in the console section.
You have successfully added authentication to your smart home Action project. You are now ready to create the logic to process smart home intents. See process intents.