Smart Home Soundbar Guide

action.devices.types.SOUNDBAR - An all-in-one audio device that is often used in conjunction with a TV and has a bar form factor.

This type indicates that the device gets the Soundbar 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.SOUNDBAR",
                traits: [
                name: {
                    defaultNames: ["Soundbar"],
                    name: "Smart soundbar",
                    nicknames: ["Living room soundbar"]
                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 soundbar",
                Collections.singletonList("Living room soundbar"))
                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.SOUNDBAR",
        "traits": [
        "name": {
          "defaultNames": [
          "name": "Smart soundbar",
          "nicknames": [
            "Living room soundbar"
        "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.