スマートホーム ストリーミング スティック ガイド

action.devices.types.STREAMING_STICK - このデバイスは、棒状の小さなフォーム ファクタで、通常は、テレビなどのディスプレイに接続された USB または HDMI ケーブルによって電源が供給されます。

このタイプのデバイスにはストリーミング スティックのアイコンと関連するアイコンが与えられます。 類義語と別名を使用します。

デバイスの機能

詳しくは、対応するトレイトのドキュメントをご覧ください。 実装の詳細(サービスがサポートする必要がある属性と状態、 EXECUTE レスポンスと QUERY レスポンスを作成します。

必要なトレイト

以下のトレイトとコマンドは必須です( ダウンロードしますデバイスがこれらのトレイトをサポートしていない場合は、次のエラーコードを入力してください。 QUERY または EXECUTE レスポンスの functionNotSupported。詳しくは、 エラーと例外をご覧ください。

お使いのデバイスに応じて、以下のトレイトを使用することをおすすめします。 ただし、利用可能なすべてのトレイトの中から、既存のテクノロジーに合わせて自由に組み合わせて使用することができます。 提供します。

で確認できます。

品質要件

  • レイテンシ: 3,000 ミリ秒以下
  • 信頼性: 97% 以上にする必要があります。

デバイスの例: シンプルなストリーミング スティック

このセクションでは、一般的な「Streaming Stick」を表すインテント ペイロードの例を示します。 デバイスは上記のデバイスタイプとトレイトに基づきます。実装でトレイトを追加または削除すると、 変更に合わせて回答を修正してください。

SYNC レスポンスの例

リクエスト
で確認できます。
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.STREAMING_STICK",
        "traits": [
          "action.devices.traits.AppSelector",
          "action.devices.traits.MediaState",
          "action.devices.traits.TransportControl",
          "action.devices.traits.Volume"
        ],
        "name": {
          "name": "Simple streaming stick"
        },
        "willReportState": true,
        "attributes": {
          "availableApplications": [
            {
              "key": "youtube",
              "names": [
                {
                  "name_synonym": [
                    "YouTube"
                  ],
                  "lang": "en"
                }
              ]
            }
          ],
          "transportControlSupportedCommands": [
            "NEXT",
            "PREVIOUS",
            "PAUSE",
            "STOP",
            "RESUME"
          ],
          "volumeMaxLevel": 11,
          "volumeCanMuteAndUnmute": true,
          "supportActivityState": true,
          "supportPlaybackState": true
        },
        "deviceInfo": {
          "manufacturer": "smart-home-inc",
          "model": "hs1234",
          "hwVersion": "3.2",
          "swVersion": "11.4"
        }
      }
    ]
  }
}

QUERY レスポンスの例

リクエスト
で確認できます。
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
レスポンス
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "currentApplication": "youtube",
        "currentVolume": 10,
        "isMuted": false,
        "activityState": "ACTIVE",
        "playbackState": "PAUSED"
      }
    }
  }
}

EXECUTE コマンドの例

appInstall

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.AppSelector ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.appInstall",
                "params": {
                  "newApplication": "youtube"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentApplication": "youtube"
        }
      }
    ]
  }
}

appSearch

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.AppSelector ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.appSearch",
                "params": {
                  "newApplication": "youtube"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
レスポンス
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentApplication": "youtube"
        }
      }
    ]
  }
}

appSelect

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.AppSelector ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654520",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.appSelect",
                "params": {
                  "newApplication": "youtube"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentApplication": "youtube"
        }
      }
    ]
  }
}

mediaClosedCaptioningOff

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654522",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaClosedCaptioningOff"
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654522",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaClosedCaptioningOn

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654524",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaClosedCaptioningOn",
                "params": {
                  "closedCaptioningLanguage": "en"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654524",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaNext

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654526",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaNext"
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654526",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "FAST_FORWARDING"
        }
      }
    ]
  }
}

mediaPause

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654528",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaPause"
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654528",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PAUSED"
        }
      }
    ]
  }
}

mediaPrevious

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654530",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaPrevious"
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654530",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "REWINDING"
        }
      }
    ]
  }
}

mediaResume

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654532",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaResume"
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654532",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaStop

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.TransportControl ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654534",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaStop"
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654534",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "STOPPED"
        }
      }
    ]
  }
}

ミュート

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.Volume ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654538",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mute",
                "params": {
                  "mute": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654538",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentVolume": 10,
          "isMuted": true
        }
      }
    ]
  }
}

setVolume

コマンド パラメータの詳細については、 <ph type="x-smartling-placeholder"></ph>をご覧ください action.devices.traits.Volume ご覧ください。

リクエスト
で確認できます。
{
  "requestId": "6894439706274654536",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.setVolume",
                "params": {
                  "volumeLevel": 11
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
<ph type="x-smartling-placeholder">
</ph>
対応
{
  "requestId": "6894439706274654536",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentVolume": 11,
          "isMuted": false
        }
      }
    ]
  }
}

デバイスエラー

詳しくは、 エラーと例外をご覧ください。