調光式電球をAlexaに接続する
調光式電球をAlexaに接続する
機能インターフェースを使用して調光式電球をAlexaに接続する方法の例を以下に示します。
機能
調光式電球は次の機能を提供します。
機能 | 目的 | サンプル発話 |
---|---|---|
ユーザーがデバイスをオンまたはオフにできます。 |
「寝室の明かりをつけて」 |
|
ユーザーが照明の明るさを制御できます。 |
「寝室の明かりの明るさを30パーセントにして」 |
|
ユーザーがAlexaアプリなどのエクスペリエンスを使用してデバイスの状態の詳細なレポートを確認できます。 |
ありません。 |
|
状態とエラーのレポートに関するディレクティブとイベントを含んでいます。検出に応答する際には、このインターフェースとサポートしているバージョンを明示的に示してください。 |
ありません。 |
検出
調光式電球は次のAddOrUpdateReportを提供します。
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "AddOrUpdateReport",
"payloadVersion": "3",
"messageId": "00000000-0000-0000-0000-000000000000"
},
"payload": {
"endpoints": [
{
"endpointId": "light-001",
"friendlyName": "寝室の照明",
"description": "サンプルメーカーの調光式照明",
"manufacturerName": "サンプルメーカー",
"displayCategories": [
"LIGHT"
],
"cookie": {},
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.PowerController",
"version": "3",
"properties": {
"supported": [
{
"name": "powerState"
}
],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.BrightnessController",
"version": "3",
"properties": {
"supported": [
{
"name": "brightness"
}
],
"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"
}
]
}
]
}
}
}
関連リソース
照明を制御するスイッチ向けのスマートホームスキルの作成の詳細については、照明用のスマートホームスキルを作成するを参照してください。
状態レポートの詳細については、スマートホームスキルの状態レポートについてを参照してください。
デバイスにその他の機能がある場合は、他の機能インターフェースを追加できます。