BT

InfoQ Homepage News Google Local Home SDK Live as a Developer Preview

Google Local Home SDK Live as a Developer Preview

Bookmarks

Announced at Google I/O 2019, the new Local Home SDK aims to make it easier for developers to connect their home devices to Google Assistant and improve their responsiveness by running their actions locally. It is now available as a developer preview.

Based on Google Smart Home, the Local Home SDK creates a local path of execution for smart home intents. Instead of relying on Google Functions or other remote execution mechanisms, developers can now create local execution apps that can be run on Google Home smart speakers or on Nest smart displays without ever leaving a user's local network. The remote execution path remains available as a backup in case the local execution path fails for whatever reason.

At the heart of the new Local Home SDK are two new intents, identify and reachable devices. The former is used whenever a new device is detected in the user's home network using mDNS, UDP, or UPnP. The device will send back a device ID that will be compared to the IDs returned by the sync intent. This will let the platform determine which devices can be controlled and thus connect them to any local Google Home speaker or Nest display. In case the device is a hub or bridge, the reachable devices intent will be sent to connect to all devices reachable through that hub or bridge.

The mechanism underlying the execution of an intent is largely transparent to whether execution is local or remote, so devices do not need to be modified to support a local execution path. They must implement, though, the identify and/or the reachable devices intents in addition to the sync and execute intents.

To write local execution apps, Google suggests using TypeScript, given the availability of strongly typed bindings that help programmers ensure the data they use match those expected by the platform, but plain JavaScript is also an option. Chrome DevTools can be used for debugging purposes, since a Local Home app is just another HTML app.

With the availability of the preview SDK, Google has made available the API reference, a developer guide, and samples.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.