Google Assistant Smart Home Part 2: API Implementation

Daniel Myers
Google Developers
Published in
11 min readSep 25, 2019

--

This is part 2 of a two-part series on building voice-controlled devices with Google Assistant. If you haven’t read part 1, please do so here! Specific things I’ll be covering here include:

  1. Incoming calls: SYNC, QUERY, EXECUTE, and DISCONNECT
  2. Outgoing calls: Report State and Request Sync
  3. Error types and concepts

Quick Primer:

From part 1, we learned that your IoT device needs to function independently of Google Assistant with its own app and cloud service. The Assistant communicates with your cloud service and augments your service with voice, allowing users to control your devices using a more natural interface.

This separation of developer responsibility is shown below:

In part 2, we need to understand the sequence of API calls, why they exist, and how they are structured. In order to fully understand what’s happening in each intent, we need to understand attributes, states, and commands.

--

--