Smart Home Speaker Guide

action.devices.types.SPEAKER - This device is a connected speaker that does not split audio into separate channels (for example, between two left and right devices).

This type indicates that the device gets the Speaker icon and some related synonyms and aliases.

Device capabilities

Refer to the corresponding trait documentation for implementation details, such as attributes and states that your service should support, and how to build EXECUTE and QUERY responses.

Required TRAITS

These traits and commands are required, if applicable to your device. These traits are recommended, if applicable to your device. However, you are free to mix and match from all available traits to best match your existing product functionality.

Sample SYNC Request and Response

This is an example using the device type and traits above. It is intended to give an idea of how to build a SYNC response. If you add or remove traits, this will need to be modified to reflect those changes.
    "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
    "inputs": [{
      "intent": "action.devices.SYNC"
'use strict';

const { smarthome } = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onSync((body, headers) => {
  return {
    requestId: "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
    payload: {
      agentUserId: "1836.15267389",
      devices: [{
        id: "123",
        type: "action.devices.types.SPEAKER",
        traits: [
        name: {
          defaultNames: ["Speaker"],
          name: "Smart speaker",
          nicknames: ["Living room speaker"]
        willReportState: true,
        attributes: {
          transportControlSupportedCommands: [
          volumeMaxLevel: 11,
          volumeCanMuteAndUnmute: true,
          supportActivityState: true,
          supportPlaybackState: true
        deviceInfo: {
          manufacturer: "Sirius Cybernetics Corporation",
          model: "492134",
          hwVersion: "3.2",
          swVersion: "11.4"
        customData: {
          fooValue: 74,
          barValue: true,
          bazValue: "lambtwirl"

// ...

exports.smarthome = functions.https.onRequest(app);
public SyncResponse onSync(@NotNull SyncRequest syncRequest, @Nullable Map<?, ?> headers) {
  Payload payload = new Payload();

      new Device[] {
        new Device.Builder()
                "Smart speaker",
                Collections.singletonList("Living room speaker"))
                new JSONObject()
                        new String[] {"NEXT", "PREVIOUS", "PAUSE", "STOP", "RESUME"})
                    .put("volumeMaxLevel", 11)
                    .put("volumeCanMuteAndUnmute", true)
                    .put("supportActivityState", true)
                    .put("supportPlaybackState", true))
            .setDeviceInfo("Sirius Cybernetics Corporation", "492134", "3.2", "11.4")
                new JSONObject()
                    .put("fooValue", 74)
                    .put("barValue", true)
                    .put("bazValue", "lambtwirl"))

  return new SyncResponse(syncRequest.getRequestId(), payload);
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "agentUserId": "1836.15267389",
    "devices": [
        "id": "123",
        "type": "action.devices.types.SPEAKER",
        "traits": [
        "name": {
          "defaultNames": [
          "name": "Smart speaker",
          "nicknames": [
            "Living room speaker"
        "willReportState": true,
        "attributes": {
          "transportControlSupportedCommands": [
          "volumeMaxLevel": 11,
          "volumeCanMuteAndUnmute": true,
          "supportActivityState": true,
          "supportPlaybackState": true
        "deviceInfo": {
          "manufacturer": "Sirius Cybernetics Corporation",
          "model": "492134",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        "customData": {
          "fooValue": 74,
          "barValue": true,
          "bazValue": "lambtwirl"



See the full list of errors and exceptions.