Image for post
Image for post

Missed our weekly video? Don’t worry, watch this week’s #AoGProTips 🎥

Many factors can affect device connectivity in the home, and it’s important to keep users aware when their devices are unreachable or offline. A critical element of your smart home Action is properly maintaining and reporting the reachability of each device to Google Assistant.

The smart home API supports multiple ways to indicate that a device is unreachable, so let’s explore when it’s appropriate to use each one.

Offline status

Each response that your smart home Action provides to a QUERY and EXECUTE intent should include a status code. For most intents, the status value will be SUCCESS. When Google Assistant attempts to QUERY an unreachable device, you should return the device status as OFFLINE. …


Illustration of a home with the Smart Home technology and other tech symbols.
Illustration of a home with the Smart Home technology and other tech symbols.

Missed our weekly video? Don’t worry, watch this week’s #AoGProTips 🎥

The test suite for smart home allows you to self-test your smart home Action and verify that it meets all the necessary criteria before you submit for review. The test suite automatically generates test cases for the supported devices and traits reported by your Action. The test suite cannot verify traits which do not have state (such as Locator) or cannot accept commands (such as RunCycle).

In this post, we’ll explore some of the best practices to ensure that your test suite runs are successful!

Can you hear me now?

The test suite generates text to speech (TTS) audio commands for each device trait reported by your Action. The commands must be heard by a nearby Google Home or Nest device in order to reach your smart home Action. If the device hears the command incorrectly, it will not execute the correct command and the test will fail.


Missed our weekly video? Don’t worry, watch this week’s #AoGProTips 🎥

Google’s Home Graph provides contextual data about the home and its devices, creating a logical map of the home. This enables users to target devices by room or implicitly make commands when you are located in the same room. Most of the data is populated by your smart home Action, and accurate Home Graph data is critical to providing the best user experience through the Assistant.

In addition to the Report State and Request Sync methods that your cloud service invokes, the Home Graph API includes methods that are useful during development to validate the device capabilities and state data reported by your Action. …


Missed our weekly video? Don’t worry, watch this week’s #AoGProTips 🎥

Smart home Actions rely on account linking to authorize the Google Assistant to access a user’s devices, but this is a multi-step process that can be difficult to debug in production. When you encounter an OPEN_AUTH_FAILURE in your StackDriver logs, you need a way to interactively debug each step of the account linking integration to track down the root cause of the issue.

Using Google’s OAuth Playground tool, you can interactively step through the account linking process with your cloud service in a secure way and verify whether Google is able to obtain the necessary authorization tokens. …


In the previous post of this series, we explored using Cloud IoT Core and Firebase to build a device cloud for smart home devices. We saw how Cloud IoT Core enables us to securely connect constrained devices to Google Cloud, while Firebase constructs a user framework around our device data. As a quick review, here is the cloud service architecture we discussed last time.

Image for post
Image for post
Figure 1: Cloud service architecture

Now, let’s look at extending this cloud service to integrate with the Google Assistant through smart home Actions. …


Recently, my colleague Dan Myers wrote a great piece on IoT & Google Assistant, introducing the core concepts of the Smart Home Actions API. This API enables developers to report device state to the Home Graph from their existing cloud service infrastructure and execute commands sent from Assistant-enabled devices.

In the article, Dan mentions that in order to integrate your devices with Google Assistant, “you, as the device creator, develop your own cloud service, which includes its own dashboard, device registration, and device management that functions independently of the Assistant.”

Image for post
Image for post
Figure 1: Assistant Communication Flow

In this post, I’d like to explore what that cloud service might look like if you’re a developer who hasn’t already invested the time and resources into building your own device cloud — or simply don’t want to manage the cloud infrastructure yourself as your device fleet scales. Maybe you’re just looking into getting your existing products connected, and wondering what it takes to build a cloud service for the smart home. …


Over the past year, we’ve had some great conversations with developers about building IoT devices with the Android Things platform. A common question that comes up is whether the platform is suitable for the Internet of Things (IoT) given that the hardware is much more powerful than the microcontrollers typically found in the space today. To answer that question, let’s examine how hardware choice and use case requirements factor into different IoT system architectures.

Image for post
Image for post
“Computer programmer's single microchip” by Brian Kostiuk on Unsplash

You already lost me, what’s a microcontroller?

Microcontrollers (MCUs) are simple, programmable, and fully integrated systems typically used for embedded control. In addition to a processor (CPU), they generally include all of the memory and peripheral interfaces necessary on a single chip. This simplicity and integration means that MCUs are relatively inexpensive and generally consume very little power. …

About

Dave Smith

Android+Embedded. Developer Advocate, IoT @ Google.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store