検出応答の例
Alexa.Discoveryインターフェースを実装して、Alexaにユーザーのコネクテッドデバイスの機能について通知します。まず、検出応答の例を確認し、デバイスタイプに合ったものを見つけてください。これらのDiscover.Responseメッセージの例をスキルコードで使用できます。デバイスのニーズに合わせてインターフェースの追加・削除を行い、これらの例を変更してください。ほかの機能での検出応答の例を確認するには、各インターフェースのドキュメントを参照してください。
Alexaスキルでさまざまなインターフェースを組み合わせる方法の詳細については、スマートホームスキル用のデバイステンプレートを参照してください。
パン、チルト、ズームをサポートするカメラの例
以下は、玄関のカメラや子ども部屋のカメラといったセキュリティカメラを制御するAlexaスキルでDiscover.Responseイベントを使った例です。カメラは、Alexaデバイスとカメラの間の通信にAlexa.RTCSessionControllerインターフェースをサポートしています。また、カメラは、物理的に左右にパンしたり、上下にチルトしたり、ズームイン/ズームアウトしたりできます。スキルには、パン、チルト、ズームをサポートするAlexa.RangeControllerインターフェースを実装しています。
カメラはどのようなパン、チルト、ズームの機能もサポートできます。パンとチルトには、カメラの実視野(FOV)のパーセンテージとして範囲を指定します。たとえば、カメラが90度の水平FOVを持ち、合計360度回転できる場合、可動範囲は400%となります。合計サポート範囲は0~400や-200~200などのように定義できます。パンの範囲を-200~200として定義し、0が中央を表すようにします。チルトの範囲は-50~50で、ズーム範囲は0~200です。
クリップボードにコピーされました。
{
"event":{
"header":{
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [
{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "Alexaアプリに表示される説明",
"friendlyName": "玄関のカメラ",
"displayCategories": ["CAMERA"],
"additionalAttributes": {
"manufacturer" : "サンプルメーカー",
"model" : "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion" : "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.RTCSessionController",
"version": "3",
"configuration": {
"isFullDuplexAudioSupported": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"version": "3",
"instance": "Camera.Pan",
"capabilityResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "カメラのパン",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "カメラの回転",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "回転",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [
{
"name": "rangeValue"
}
],
"retrievable": true,
"proactivelyReported": true
},
"configuration": {
"supportedRange": {
"minimumValue": -200,
"maximumValue": 200,
"precision": 1
},
"presets": [
{
"rangeValue": -200,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "一番左",
"locale": "ja-JP"
}
}
]
}
},
{
"rangeValue": 0,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "中央",
"locale": "ja-JP"
}
}
]
}
},
{
"rangeValue": 200,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "一番右",
"locale": "ja-JP"
}
}
]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"version": "3",
"instance": "Camera.Tilt",
"capabilityResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "カメラのチルト",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "チルト",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [
{
"name": "rangeValue"
}
],
"retrievable": true,
"proactivelyReported": true
},
"configuration": {
"supportedRange": {
"minimumValue": -50,
"maximumValue": 50,
"precision": 1
},
"presets": [
{
"rangeValue": -50,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "下",
"locale": "ja-JP"
}
}
]
}
},
{
"rangeValue": 0,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "中央",
"locale": "ja-JP"
}
}
]
}
},
{
"rangeValue": 50,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "上",
"locale": "ja-JP"
}
}
]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"version": "3",
"instance": "Camera.Zoom",
"capabilityResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "カメラのズーム",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "ズーム",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [
{
"name": "rangeValue"
}
],
"retrievable": true,
"proactivelyReported": true
},
"configuration": {
"supportedRange": {
"minimumValue": 0,
"maximumValue": 200,
"precision": 50
},
"presets": [
{
"rangeValue": 0,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "ズームアウト",
"locale": "ja-JP"
}
},
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Minimum"
}
}
]
}
},
{
"rangeValue": 200,
"presetResources": {
"friendlyNames": [
{
"@type": "text",
"value": {
"text": "ズームイン",
"locale": "ja-JP"
}
},
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Maximum"
}
}
]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}
]
}
}
}
エンターテイメントデバイスの例
以下は、エンターテイメントデバイスを制御するAlexaスキルでのDiscover.Responseイベントの例です。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "サンプルメーカーのブランド名",
"friendlyName": "エンターテイメントシステム",
"displayCategories": ["TV"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"cookie": {},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ChannelController",
"version": "3",
"properties": {
"supported": [{
"name": "channel"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.InputController",
"version": "3",
"properties": {
"supported": [{
"name": "input"
}],
"proactivelyReported": true,
"retrievable": true
},
"inputs": [{
"name": "HDMI1"
},
{
"name": "HDMI2"
}
]
},
{
"type": "AlexaInterface",
"interface": "Alexa.PlaybackController",
"version": "3",
"properties": {},
"supportedOperations": [
"Play",
"Pause",
"Stop"
]
},
{
"type": "AlexaInterface",
"interface": "Alexa.Speaker",
"version": "3",
"properties": {
"supported": [{
"name": "volume"
},
{
"name": "muted"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
暖炉の例
以下は、暖炉を制御するAlexaスキルでのDiscover.Responseイベントの例です。この暖炉は、次のインターフェースを使用します。
Alexa.PowerControllerで暖炉のオン/オフを切り替えます。Alexa.ColorControllerで炎の色を変更します。Alexa.RangeControllerで、オンになっているバーナーの数を変更します。Alexa.ModeControllerで、キャンプファイヤー、キャンドル、氷の炎の各モードを提供します。
この例は、スマートホームバーチャル暖炉スキルを作成するチュートリアルの一部です。詳細については、GitHubのSkill Sample: Smart Home Fireplace (Python)を参照してください。
ユーザーがより自由な言葉でAlexaに話しかけられるように、フレンドリー名を指定します。詳細については、フレンドリー名のリソースとアセットを参照してください。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "サンプルメーカーの暖炉",
"friendlyName": "リビングの暖炉",
"displayCategories": ["OTHER"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"cookie": {},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ColorController",
"version": "3",
"properties": {
"supported": [{
"name": "color"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"instance": "Fireplace.Burners",
"version": "3",
"properties": {
"supported": [{
"name": "rangeValue"
}],
"proactivelyReported": true,
"retrievable": true,
"nonControllable": false
},
"capabilityResources": {
"friendlyNames": [{
"@type": "asset",
"value": {
"assetId": "Alexa.Setting.Preset"
}
}]
},
"configuration": {
"supportedRange": {
"minimumValue": 1,
"maximumValue": 3,
"precision": 1
},
"presets": [{
"rangeValue": 1,
"presetResources": {
"friendlyNames": [{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Low"
}
},
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Minimum"
}
},
{
"@type": "text",
"value": {
"text": "最小",
"locale": "ja-JP"
}
}
]
}
},
{
"rangeValue": 2,
"presetResources": {
"friendlyNames": [{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Medium"
}
},
{
"@type": "text",
"value": {
"text": "標準",
"locale": "ja-JP"
}
}
]
}
},
{
"rangeValue": 3,
"presetResources": {
"friendlyNames": [{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.Maximum"
}
},
{
"@type": "asset",
"value": {
"assetId": "Alexa.Value.High"
}
},
{
"@type": "text",
"value": {
"text": "最大",
"locale": "ja-JP"
}
}
]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ModeController",
"instance": "Fireplace.FlameType",
"version": "3",
"properties": {
"supported": [{
"name": "mode"
}],
"retrievable": true,
"proactivelyReported": true,
"nonControllable": false
},
"capabilityResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "炎のタイプ",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "炎",
"locale": "ja-JP"
}
}
]
},
"configuration": {
"ordered": false,
"supportedModes": [{
"value": "FlameType.Campfire",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "標準",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "キャンプファイヤー",
"locale": "ja-JP"
}
}
]
}
},
{
"value": "FlameType.Candle",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "キャンドル",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "キャンドルライト",
"locale": "ja-JP"
}
}
]
}
},
{
"value": "FlameType.IceFlame",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "氷モード",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "氷の炎",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "氷",
"locale": "ja-JP"
}
}
]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ModeController",
"instance": "Fireplace.CurrentFlameType",
"version": "3",
"properties": {
"supported": [{
"name": "mode"
}],
"retrievable": true,
"proactivelyReported": true,
"nonControllable": true
},
"capabilityResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "現在の炎のタイプ",
"locale": "ja-JP"
}
}]
},
"configuration": {
"ordered": false,
"supportedModes": [{
"value": "CurrentFlameType.Campfire",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "キャンプファイヤー",
"locale": "ja-JP"
}
}]
}
},
{
"value": "CurrentFlameType.Candle",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "キャンドル",
"locale": "ja-JP"
}
}]
}
},
{
"value": "CurrentFlameType.Ice",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "氷",
"locale": "ja-JP"
}
}]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
ギターアンプの例
以下は、ギターアンプを制御するAlexaスキルでのDiscover.Responseイベントの例です。
この例では、ユーザーがより自由な言葉でAlexaに話しかけられるように、フレンドリー名を指定します。詳細については、フレンドリー名のリソースとアセットを参照してください。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "サンプルメーカーのスマートアンプ",
"friendlyName": "ギターアンプ",
"displayCategories": ["OTHER"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.Speaker",
"version": "3",
"properties": {
"supported": [{
"name": "volume"
},
{
"name": "muted"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EqualizerController",
"version": "3",
"properties": {
"supported": [{
"name": "bands"
}],
"proactivelyReported": true,
"retrievable": true
},
"configurations": {
"bands": {
"supported": [{
"name": "BASS"
},
{
"name": "MIDRANGE"
},
{
"name": "TREBLE"
}
],
"range": {
"minimum": 1,
"maximum": 10
}
}
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ToggleController",
"version": "3",
"instance": "SampleManufacturer.Amp.OverDrive",
"capabilityResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "Overdrive",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "オーバードライブ",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [{
"name": "toggleState"
}],
"proactivelyReported": true,
"retrievable": true,
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"version": "3",
"instance": "SampleManufacturer.Amp.Gain",
"capabilityResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "ゲイン",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "ドライブ",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [{
"name": "rangeValue"
}],
"proactivelyReported": true,
"retrievable": true
},
"configuration": {
"supportedRange": {
"minimumValue": 1,
"maximumValue": 10,
"precision": 1
},
"presets": []
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ModeController",
"version": "3",
"instance": "SampleManufacturer.Amp.Presets",
"capabilityResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "プリセット",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "エフェクト",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [{
"name": "mode"
}],
"retrievable": true,
"proactivelyReported": true
},
"configuration": {
"ordered": false,
"supportedModes": [{
"value": "Preset.Normal",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "Normal",
"locale": "en-US"
}
},
{
"@type": "text",
"value": {
"text": "Standard",
"locale": "en-US"
}
}
]
}
},
{
"value": " Preset.LowGain",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "ローゲイン",
"locale": "ja-JP"
}
}]
}
},
{
"value": " Preset.LeadBoost",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "リードブースト",
"locale": "ja-JP"
}
}]
}
},
{
"value": " Preset.Metal",
"modeResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "メタル",
"locale": "ja-JP"
}
}]
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
アクションの確認を求めるサーモスタットの例
以下は、サーモスタットを制御するAlexaスキルでのDiscover.Responseイベントの例です。このスキルは、Alexa.PowerControllerインターフェースを使用してサーモスタットのオン/オフを切り替え、Alexa.ThermostatControllerインターフェースを使用して温度とモードを制御します。
このスキルでは、Alexaがアクションを実行する前にこのエンドポイントに対するアクションの確認を求めます。そのため、Discover.Responseには、アクションの確認をサポートするインターフェースごとにverificationsRequiredオブジェクトが含まれています。詳細については、VerificationsRequiredオブジェクトを参照してください。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "サーモスタットメーカー製のスマートサーモスタット",
"friendlyName": "廊下のサーモスタット",
"displayCategories": ["THERMOSTAT", "TEMPERATURE_SENSOR"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"cookie": {},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.ThermostatController",
"version": "3.1",
"properties": {
"supported": [{
"name": "targetSetpoint"
},
{
"name": "thermostatMode"
}
],
"proactivelyReported": true,
"retrievable": true
},
"configuration": {
"supportedModes": ["OFF", "COOL"],
"supportsScheduling": false
},
"verificationsRequired": [{
"directive": "SetTargetTemperature",
"methods": [{
"@type": "Confirmation"
}]
},
{
"directive": "SetThermostatMode",
"methods": [{
"@type": "Confirmation"
}]
}
]
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
},
"verificationsRequired": [{
"directive": "TurnOn",
"methods": [{
"@type": "Confirmation"
}]
},
{
"directive": "TurnOff",
"methods": [{
"@type": "Confirmation"
}]
}
]
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
ビデオデバイスの例
以下は、ビデオデバイスを制御するAlexaスキルでのDiscover.Responseイベントの例です。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "Alexaアプリに表示される説明",
"friendlyName": "2階のテレビ",
"displayCategories": ["TV"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.RemoteVideoPlayer",
"version": "3.1",
"properties": {},
"configurations": {
"operations": ["SearchAndPlay"],
"entityTypes": ["MediaType", "League", "Sport", "SportsTeam"],
"catalogs": [{
"type": "VIDEO_INGESTION_IDENTIFIER",
"sourceId": "ABCD"
},
{
"type": "VIDEO_PUBLIC_CATALOG_IDENTIFIER",
"sourceId": "imdb"
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.ChannelController",
"version": "3",
"properties": {
"supported": [{
"name": "channel"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"interface": "Alexa.PlaybackController ",
"type": "AlexaInterface",
"version": "3",
"supportedOperations": ["Play", "Pause", "Stop"]
},
{
"type": "AlexaInterface",
"interface": "Alexa.PlaybackStateReporter",
"version": "3",
"properties": {
"supported": [{
"name": "playbackState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.VideoRecorder",
"version": "3",
"properties": {
"supported": [{
"name": "isExtendedRecordingGUIShown"
},
{
"name": "storageLevel"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.Launcher",
"version": "3",
"properties": {
"supported": [{
"name": "target"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
給湯器の例
以下は、給湯器で説明されている給湯器を制御するAlexaスキルでのDiscover.Responseイベントの例です。
この例ではAlexa.ToggleControllerインターフェースを使用してAlexa Hunches(日本未対応)をサポートします。Alexa Hunchesの詳細については、What Are Alexa Hunches?およびEnable Alexa to Proactively Act on Hunches Without Customers Needing to Askを参照してください。
この例ではまた、Alexa.DeviceUsage.Meterインターフェースを使用して、ユーザーがAlexaエネルギーダッシュボードでエネルギー使用量を管理できるようにもしています。詳細については、Smart Home Energy Overviewを参照してください。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "Alexaアプリに表示される説明",
"friendlyName": "給湯器",
"displayCategories": ["WATER_HEATER"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.ToggleController",
"version": "3",
"instance": "EnergySaverMode",
"capabilityResources": {
"friendlyNames": [{
"@type": "text",
"value": {
"text": "省エネモード",
"locale": "ja-JP"
}
}]
},
"properties": {
"supported": [{
"name": "toggleState"
}],
"proactivelyReported": true,
"retrievable": true
},
"semantics": {
"actionMappings": [{
"@type": "ActionsToDirective",
"actions": ["Alexa.Actions.SetEcoOff"],
"directive": {
"name": "TurnOff",
"payload": {}
}
},
{
"@type": "ActionsToDirective",
"actions": ["Alexa.Actions.SetEcoOn"],
"directive": {
"name": "TurnOn",
"payload": {}
}
}
],
"stateMappings": [{
"@type": "StatesToValue",
"states": ["Alexa.States.EcoOff"],
"value": "OFF"
},
{
"@type": "StatesToValue",
"states": ["Alexa.States.EcoOn"],
"value": "ON"
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.DeviceUsage.Meter",
"version": "1.0",
"configurations": {
"energySources": {
"electricity": {
"unit": "MILLIWATT_HOUR",
"measuringMethod": "ESTIMATED",
"defaultResolution": 3600
}
}
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [{
"name": "powerState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
Wi-Fiルーターの例
以下は、Wi-Fiルーターで説明されているWi-Fiルーターを制御するAlexaスキルでのDiscover.Responseイベントの例です。
この例では、ユーザーがより自由な言葉でAlexaに話しかけられるように、フレンドリー名を指定します。詳細については、フレンドリー名のリソースとアセットを参照してください。
クリップボードにコピーされました。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい"
},
"payload": {
"endpoints": [{
"endpointId": "エンドポイントの一意のID",
"manufacturerName": "サンプルメーカー",
"description": "サンプルメーカーのWi-Fiルーター",
"friendlyName": "ゲストWi-Fi",
"displayCategories": ["OTHER"],
"additionalAttributes": {
"manufacturer": "サンプルメーカー",
"model": "サンプルモデル",
"serialNumber": "デバイスのシリアル番号",
"firmwareVersion": "デバイスのファームウェアバージョン",
"softwareVersion": "デバイスのソフトウェアバージョン",
"customIdentifier": "<デバイスのカスタム識別子>"
},
"cookie": {},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.ToggleController",
"version": "3",
"instance": "GuestWiFi",
"capabilityResources": {
"friendlyNames": [{
"@type": "asset",
"value": {
"assetId": "Alexa.Setting.GuestWiFi"
}
},
{
"@type": "text",
"value": {
"text": "ゲスト",
"locale": "ja-JP"
}
},
{
"@type": "text",
"value": {
"text": "ゲストアクセス",
"locale": "ja-JP"
}
}
]
},
"properties": {
"supported": [{
"name": "toggleState"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
関連トピック
最終更新日: 2024 年 12 月 06 日