Alexa.ThermostatControllerインターフェース3.2
ユーザーがスマートサーモスタットを制御できるように、Alexaスキルに Alexa.ThermostatController
インターフェースを実装しましょう。サーモスタットでは、ヒーター、エアコン、温水器などのデバイスを制御できます。スマートホームスキルの詳細については、スマートホームスキルを理解するを参照してください。
サーモスタットは、温度を感知し、計測温度を所定の設定値や指定された温度範囲内に保持しようとするデバイスです。ThermostatController
インターフェースは、最大2つの設定値と各種サーモスタットモードを備えた、サーモスタットスケジュールのプログラムが可能なデバイスに使用できます。通常、ThermostatController
インターフェースは、Alexa.TemperatureSensor
インターフェースと合わせて使用します。
デバイスがサポートする機能に基づいて、それ以外のAlexa.ThermostatController
インターフェースを実装します。
- Alexaアプリから暖房、換気、空調(HVAC)システムの設定をサーモスタットにダウンロードするには、
Alexa.ThermostatController.Configuration
インターフェースを実装します。 - ユーザーがサーモスタットの温度スケジュールを設定できるようにするには、
Alexa.ThermostatController.Schedule
インターフェースを実装します。 - AlexaがサーモスタットまたはHVACシステムのエネルギー使用量を推測できるようにするには、
Alexa.ThermostatController.HVAC.Components
インターフェースを実装します。
ThermostatController
インターフェースがサポートする言語については、Alexaインターフェースとサポートしている言語の一覧を参照してください。メッセージプロパティの定義については、Alexaインターフェースのメッセージとプロパティを参照してください。
このバージョンでの変更箇所
このバージョンでは、緊急暖房と呼ばれる新しいサーモスタットモードと状況に応じた復旧のサポートが追加されています。
発話
Alexa.ThermostatController
インターフェースを使用する場合、Alexaサービスが開発者に代わって音声対話モデルを提供します。ユーザーがこのような発話をすると、Alexaがそれに対応するディレクティブまたは状態レポートリクエストをスキルに送信します。
以下に、ユーザーの発話の例を示します。
Alexa, set thermostat to twenty.
Alexa, set the AC to seventy-five.
Alexa, make it warmer in here.
Alexa, make it cooler in here.
Alexa, set thermostat to automatic.
Alexa, turn off the heat.
Alexa, what mode is my thermostat set to?
Alexa, what's the temperature in here?
Alexa, what is the temperature of the house?
Alexa, resume thermostat schedule.
Alexa, règle le thermostat sur vingt.
Alexa, règle la climatisation sur soixante-quinze.
Alexa, rends plus chaud ici.
Alexa, rends moins chaud ici.
Alexa, mets le thermostat en mode automatique.
Alexa, éteins le chauffage.
Alexa, sur quel mode est réglé mon thermostat?
Alexa, quelle est la température ici?
Alexa, quelle est la température de la maison?
Alexa, stelle Thermostat auf zwanzig.
Alexa, stelle die Klimaanlage auf fünfundsiebzig.
Alexa, mache es hier drin wärmer.
Alexa, mache es hier drin kühler.
Alexa, stelle Thermostat auf Automatik.
Alexa, schalte die Heizung aus.
Alexa, auf welchen Modus ist mein Thermostat eingestellt?
Alexa, wie ist die Temperatur hier drin?
Alexa, was ist die Temperatur von dem Haus?
Alexa, थर्मोस्टेट को बीस पर सेट करो।
Alexa, AC को पचहत्तर पर सेट करो।
Alexa, इसे यहाँ गर्म करो।
Alexa, इसे यहाँ ठंडा करो।
Alexa, थर्मोस्टैट को स्वचालित पर सेट करें।
Alexa, आँच बंद कर दो।
Alexa, मेरा थर्मोस्टेट किस मोड पर सेट है?
Alexa, यहाँ का तापमान क्या है?
Alexa, घर का तापमान क्या है?
Alexa, imposta il termostato su venti.
Alexa, imposta il conditionatore a settantacinque.
Alexa, alza la temperatura nel soggiorno.
Alexa, abbassa la temperatura nel soggiorno.
Alexa, imposta il termostato su automatico.
Alexa, spegni il riscaldamento.
Alexa, su quale modalità è impostato il mio termostato?
Alexa, qual è la temperatura qui?
Alexa, qual è la temperatura della casa?
アレクサ、サーモスタットを20度にして
アレクサ、エアコンを25度にして
アレクサ、この部屋を暖かくして
アレクサ、この部屋を涼しくして
アレクサ、サーモスタットを自動にして
アレクサ、暖房を消して
アレクサ、サーモスタットのモードはなに?
アレクサ、ここの温度は?
アレクサ、家の温度は?
Alexa, muda o termostato para vinte.
Alexa, muda o ar condicionado para setenta e cinco.
Alexa, torne mais quente aqui.
Alexa, torne mais fresco aqui.
Alexa, muda o termostato para automático.
Alexa, desligue o aquecimento.
Alexa, apague o calor.
Alexa, a que modo está ajustado o meu termostato?
Alexa, qual é a temperatura aqui?
Alexa, qual é a temperatura da casa?
Alexa, pon el termostato a veinte.
Alexa, pon el aire acondicionado a setenta y cinco.
Alexa, haz más cálido aquí.
Alexa, haz más fresco aquí.
Alexa, pon el termostato en automático.
Alexa, apaga la calefacción.
Alexa, ¿en qué modo está mi termostato?
Alexa, ¿cuál es la temperatura aquí?
Alexa, ¿cuál es la temperatura de la casa?
Alexa, zet de thermostaat op twintig.
Alexa, zet de airco op vijfenzeventig.
Alexa, maak het hier warmer.
Alexa, maak het hier koeler.
Alexa, zet de thermostaat op automatisch.
Alexa, zet de verwarming uit.
Alexa, wat is de modus van mijn thermostaat?
Alexa, wat is de temparatuur hier?
Alexa, wat is de temparatuur van het huis?.
Alexa, hervat het thermostaatschema.
サーモスタットの設定値の種類
Alexaは、1つまたは2つの温度値を設定できるサーモスタットをサポートします。
- 設定値が1つのサーモスタット
- 設定値が1つのサーモスタットの場合、サーモスタットが保持しようとする温度設定は1つです。たとえば、設定値が1つのサーモスタットは、温度が設定値よりも低くなると暖房をオンにし、温度が設定値よりも高くなると暖房をオフにします。
- 設定値が2つのサーモスタット
- 設定値が2つのサーモスタットには、上限と下限の設定値があります。サーモスタットは、この設定値の範囲内に温度を保持します。
サーモスタットは、モードに応じて異なる設定値に対応できます。詳細については、出力可能なプロパティを参照してください。
サーモスタットのスケジューリング
ユーザーが温度を設定する際、その温度の保持時間を指定できます。たとえば、「アレクサ、サーモスタットを30分間、22度に設定して」のように言うことができます。 デバイスが保持時間をサポートしている場合は、そのことを検出応答で示します。
デバイスが週単位で温度やサーモスタットモードを設定するユーザーリクエストをサポートする場合、Alexa.ThermostatController.Schedule
インターフェースを実装します。
状況に応じた復旧
状況に応じた復旧をサポートするサーモスタットは、設定された温度に予定通りに到達できるよう、時間の余裕を持ってHVACシステムを開始します。スキルがAlexa.ThermostatController.Schedule
を実装し、デバイスが状況に応じた復旧をサポートする場合、予熱または予冷が進行中であることをレポートします。温度がターゲットの設定値に到達したら、状況に応じた復旧が非アクティブであることをレポートします。たとえば、ターゲットの暖房温度が午後6時に21度だった場合、サーモスタットは午後5:55に予熱を開始します。状態の変化をレポートした後、Alexaアプリに予熱または予冷が進行中であることを示す視覚的なキューを表示します。
ユーザーは、Alexa.ThermostatController.Schedule
インターフェースで状況に応じた復旧を有効/無効にできます。
レポート可能なプロパティ
Alexa.ThermostatController
インターフェースは次のレポート可能なプロパティを定義します。検出応答で、サポートするプロパティを指定します。すべてのプロパティはオプションです。サーモスタットデバイスのコンポーネントに対応するプロパティのみを含めてください。
プロパティ | 説明 | 型 |
---|---|---|
targetSetpoint |
サーモスタットは、温度をこの設定値に保持しようとします。このプロパティは、設定値が1つのサーモスタットで使用します。 | Temperature オブジェクト |
lowerSetpoint |
サーモスタットは、温度をこの設定値より上に保持しようとします。このプロパティは、設定値が2つのサーモスタットで使用します。 | Temperature オブジェクト |
upperSetpoint |
サーモスタットは、温度をこの設定値より下に保持しようとします。このプロパティは、設定値が2つのサーモスタットで使用します。 | Temperature オブジェクト |
thermostatMode |
サーモスタットの現在のモードです。 | ThermostatMode オブジェクト |
adaptiveRecoveryStatus |
予熱または予冷の現在のステータスです。 有効な値は、 PREHEATING 、PRECOOLING 、INACTIVE です。 |
文字列 |
サーモスタットは、モードに応じて異なる設定値に対応できます。たとえば、HEAT
またはCOOL
モードでサポートするのは目標値のみ、AUTO
またはECO
モードでサポートするのは下限値と上限値です。
ThermostatModeの値
次の表にサーモスタットのモード値を示します。サーモスタットによっては、すべてのモードがサポートされていない場合があります。
値 | 説明 |
---|---|
|
現在の温度と設定値に基づく自動暖房/冷房モード。 |
|
冷房モード。 |
|
エコノミーモード。 |
|
緊急暖房モード。 |
|
暖房モード。 |
|
暖房・冷房はオフですが、デバイスの電源が入っている可能性があります。 |
検出
Alexa.ThermostatController
をサポートするエンドポイントは、Alexa.Discovery
の標準検出メカニズムを使用して表します。
Alexaからスキルに状態レポートリクエストが送信されたら、レポートするプロパティのretrievable
をtrue
に設定します。変更レポートでAlexaにプロアクティブにレポートするプロパティのproactivelyReported
をtrue
に設定します。
表示カテゴリーにはTHERMOSTAT
を使用します。表示カテゴリーの一覧は、表示カテゴリーを参照してください。
Alexaにデバイスの健全性を通知する場合、Alexa.EndpointHealth
インターフェースも実装してください。
configurationオブジェクト
Alexa.ThermostatController
には、標準の検出応答フィールドのほかに、次のフィールドを含むconfigurationオブジェクトを含めます。
supportsScheduling
プロパティを含めてください。一週間のスケジュールをサポートする場合は、代わりにAlexa.ThermostatController.Schedule
インターフェースを実装します。フィールド | 説明 | 型 | 必須 |
---|---|---|---|
supportedModes |
デバイスがサポートするモード。HEAT またはCOOL のサーモスタットモードを1つ以上含める必要があります。 |
ThermostatMode 文字列の配列 |
◯ |
supportsScheduling |
期間を示す設定値をユーザーが指定できる場合はtrue です。たとえば、ユーザーは温度を30分間、21度に設定できます。デフォルトはfalse です。 |
ブール値 | × |
検出応答の例
以下は、サーモスタットを制御し、Alexa.ThermostatController
インターフェースとAlexa.TemperatureSensor
インターフェースをサポートするAlexaスキルのDiscover.Response
メッセージの例です。この例のエンドポイントは、設定値が2つ、モードが3つのサーモスタットです。
エアコン用の検出応答の例
通常、エアコンがサポートする設定値は1つで、モードは冷房のみです。サーモスタットは一般的に常時オンですが、エアコンはユーザーがオンとオフを切り替えます。エアコンの場合、Amazonでは、Alexa.PowerController
インターフェースも実装し、次のリストのようにPowerController
とThermostatController
を同期することをお勧めします。
- サーモスタットのコントローラーモードが
COOL
に設定されたら、電源コントローラーの電源状態をON
にする。 - サーモスタットのコントローラーモードが
OFF
に設定されたら、電源コントローラーの電源状態をOFF
にする。
以下は、エアコンを制御し、ThermostatController
インターフェースとAlexa.PowerController
インターフェースをサポートするAlexaスキルのDiscover.Response
メッセージの例です。応答には、温度を表示するエアコン用のAlexa.TemperatureSensor
インターフェースが含まれています。
ディレクティブ
Alexaは次のAlexa.ThermostatController
インターフェースディレクティブをスキルに送信します。
SetTargetTemperatureディレクティブ
SetTargetTemperature
ディレクティブをサポートすると、サーモスタットに保持させたい温度をユーザーが設定できます。ユーザーは、オプションで新たな温度設定の期間を指定できます。
以下に、ユーザーの発話の例を示します。
Alexa, set bedroom thermostat to twenty.
Alexa, set living room air conditioner to seventy-five.
Alexa, règle le thermostat de la chambre sur vingt.
Alexa, règle le climatiseur du salon sur soixante-quinze.
Alexa, stelle Schlafzimmerthermostat auf zwanzig.
Alexa, stelle die Wohnzimmerklimaanlage auf fünfundsiebzig.
Alexa, बेडरूम थर्मोस्टेट को बीस पर सेट करो
Alexa, लिविंग रूम के एयर कंडीशनर को पचहत्तर पर सेट करो
Alexa, imposta il termostato della camera da letto su venti.
Alexa, imposta il condizionatore d'aria del soggiorno a settantacinque.
アレクサ、寝室のサーモスタットを20度にして
アレクサ、リビングのエアコンを25度にして
Alexa, muda o termostato do quarto para vinte.
Alexa, muda o ar condicionado da sala de estar para setenta e cinco.
Alexa, pon el termostato del dormitorio a veinte.
Alexa, pon el aire acondicionado de la sala a setenta y cinco.
Alexa, zet de thermostaat in de slaapkamer op twintig.
Alexa, zet de airco in de woonkamer op vierentwintig.
SetTargetTemperatureディレクティブの例
次の例は、設定値が1つのサーモスタット用にAlexaがスキルに送信するSetTargetTemperature
ディレクティブを示しています。
次の例は、設定値が2つのサーモスタット用にAlexaがスキルに送信するSetTargetTemperature
ディレクティブを示しています。
SetTargetTemperatureディレクティブのペイロード
プロパティ | 説明 | 型 | 必須 |
---|---|---|---|
|
サーモスタットは、温度をこの設定値に保持しようとします。設定値が1つのサーモスタットの場合、Alexaはこのフィールドを追加します。 |
|
× |
|
サーモスタットは、温度をこの設定値より上に保持しようとします。設定値が2つのサーモスタットの場合、Alexaはこのフィールドを追加します。 |
|
× |
|
サーモスタットは、温度をこの設定値より下に保持しようとします。設定値が2つのサーモスタットの場合、Alexaはこのフィールドを追加します。 |
|
× |
|
サーモスタットが指定された設定値を保持する時間。指定された時間、新しい設定値が適用されます。このフィールドは、ユーザーが指定した場合に含まれます(スキルの検出応答でサポートを示している必要があります)。 |
|
× |
SetTargetTemperature応答
SetTargetTemperature
ディレクティブを正しく処理したら、Alexa.Response
イベントを使用して応答します。contextオブジェクトに、関連するすべてのプロパティの値を含めます。
以下は、設定値が1つのサーモスタット用のSetTargetTemperature
応答の例です。
以下は、設定値が2つのサーモスタット用のSetTargetTemperature
応答の例です。
SetTargetTemperatureディレクティブのエラー処理
SetTargetTemperature
ディレクティブを正しく処理できなかった場合は、Alexa.ThermostatController.ErrorResponse
イベントを使用して応答します。温度やサーモスタット特有のエラーではない場合は、汎用のAlexa.ErrorResponse
イベントを使用して応答することもできます。
AdjustTargetTemperatureディレクティブ
AdjustTargetTemperature
ディレクティブをサポートすると、サーモスタットに保持させたい温度をユーザーが調整できます。
以下に、ユーザーの発話の例を示します。
Alexa, increase the thermostat temperature by 3 degrees.
Alexa, decrease the thermostat temperature by 3 degrees.
Alexa, increase the AC temperature.
Alexa, decrease the AC temperature.
Alexa, augmente la température du thermostat de trois degrés.
Alexa, diminue la température du thermostat de trois degrés.
Alexa, augmente la température du climatiseur.
Alexa, diminue la température du climatiseur.
Alexa, erhöhe die Thermostattemperatur um 3 Grad.
Alexa, senke die Thermostattemperatur um 3 Grad.
Alexa, erhöhe die AC-Temperatur.
Alexa, senke die AC-Temperatur.
Alexa, थर्मोस्टेट का तापमान 3 डिग्री बढ़ा दें
Alexa, थर्मोस्टेट का तापमान 3 डिग्री कम करें
Alexa,एसी का तापमान बढ़ाओ
Alexa,एसी का तापमान कम करो
Alexa, aumenta la temperatura del termostato di 3 gradi.
Alexa, diminuisci la temperatura del termostato di 3 gradi.
Alexa, aumenta la temperatura dell'aria condizionata.
Alexa, abbassa la temperatura dell'aria condizionata.
アレクサ、エアコンの温度を3度上げて
アレクサ、エアコンの温度を3度下げて
アレクサ、エアコンの温度を上げて
アレクサ、エアコンの温度を下げて
Alexa, aumentar a temperatura do termostato em três graus.
Alexa, diminuir a temperatura do termostato em três graus.
Alexa, aumentar a temperatura do ar condicionado.
Alexa, diminuir a temperatura do ar condicionado.
Alexa, sube la temperatura del termostato 3 grados.
Alexa, baja la temperatura del termostato 3 grados.
Alexa, aumenta la temperatura del aire acondicionado.
Alexa, disminuye la temperatura del aire acondicionado.
Alexa, verhoog de temparatuur van de thermostaat met 3 graden.
Alexa, verlaag de temparatuur van de thermostaat met 3 graden.
Alexa, verhoog de temperatuur van de airco.
Alexa, verlaag de temperatuur van de airco.
AdjustTargetTemperatureディレクティブの例
以下の例は、Alexaがスキルに送信するAdjustTargetTemperature
ディレクティブを示しています。
{
"directive": {
"header": {
"namespace": "Alexa.ThermostatController",
"name": "AdjustTargetTemperature",
"messageId": "一意のバージョン4 UUID",
"correlationToken": "opaque相関トークン",
"payloadVersion": "3.2"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2ベアラートークン"
},
"endpointId": "エンドポイントID",
"cookie": {}
},
"payload": {
"targetSetpointDelta": {
"value": -2.0,
"scale": "CELSIUS"
}
}
}
}
AdjustTargetTemperatureディレクティブのペイロード
フィールド | 説明 | 型 |
---|---|---|
targetSetpointDelta |
温度の変化量です。変化量は正でも負でもかまいません。 | Temperature オブジェクト |
AdjustTargetTemperature応答
AdjustTargetTemperature
ディレクティブを正しく処理したら、Alexa.Response
イベントを使用して応答します。contextオブジェクトに、関連するすべてのプロパティの値を含めます。
以下は、設定値が1つのサーモスタット用のAdjustTargetTemperature
応答の例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "Response",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"correlationToken": "リクエストに一致するopaque相関トークン",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "エンドポイントID"
},
"payload": {}
},
"context": {
"properties": [
{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "HEAT",
"timeOfSample": "2024-01-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 18.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-01-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": 20.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 1000
}
]
}
}
AdjustTargetTemperatureディレクティブのエラー処理
AdjustTargetTemperature
ディレクティブを正しく処理できなかった場合は、Alexa.ThermostatController.ErrorResponse
イベントを使用して応答します。温度やサーモスタット特有のエラーではない場合は、汎用のAlexa.ErrorResponse
イベントを使用して応答することもできます。
SetThermostatModeディレクティブ
SetThermostatMode
ディレクティブをサポートすると、ユーザーがデバイスのモードを設定できます。ユーザーは、「アレクサ、[ユーザーのサーモスタットデバイス名]を[利用可能なモード]にして」のように言う必要があります。
SetThermostatModeディレクティブの例
次の例は、Alexaがスキルに送信するSetThermostatMode
ディレクティブを示しています。
{
"directive": {
"header": {
"namespace": "Alexa.ThermostatController",
"name": "SetThermostatMode",
"messageId": "一意のバージョン4 UUID",
"correlationToken": "opaque相関トークン",
"payloadVersion": "3.2"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2ベアラートークン"
},
"endpointId": "エンドポイントID",
"cookie": {}
},
"payload": {
"thermostatMode" : {
"value": "COOL"
}
}
}
}
SetThermostatModeディレクティブのペイロード
フィールド | 説明 | 型 |
---|---|---|
thermostatMode |
サーモスタットのモード(暖房および冷房)。 | オブジェクト |
thermostatMode.value |
サーモスタットに設定するモード。 有効な値については、 ThermostatMode を参照してください。 |
文字列 |
SetThermostatMode応答イベント
SetThermostatMode
ディレクティブを正しく処理したら、Alexa.Response
イベントを使用して応答します。contextオブジェクトに、関連するすべてのプロパティの値を含めます。
以下は、SetThermostatMode
応答の例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "Response",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"correlationToken": "リクエストに一致するopaque相関トークン",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "エンドポイントID"
},
"payload": {}
},
"context": {
"properties": [
{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "COOL",
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 17.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": 19.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 1000
}
]
}
}
SetThermostatModeディレクティブのエラー処理
SetThermostatMode
ディレクティブを正しく処理できなかった場合は、Alexa.ThermostatController.ErrorResponse
イベントを使用して応答します。温度やサーモスタット特有のエラーではない場合は、汎用のAlexa.ErrorResponse
イベントを使用して応答することもできます。
ResumeScheduleディレクティブ
ResumeSchedule
ディレクティブをサポートすると、ユーザーは、別のスケジュールを適用した後、再びサーモスタットでプログラムされているスケジュールに戻すことができます。たとえば、家を空けている間は休暇用の上書き設定を使用し、帰ってきたら通常のプログラムを再開する、という使い方ができます。
ResumeSchedule
ディレクティブのみです。以下は、ユーザーの発話の例です。
Alexa, resume thermostat schedule.
ResumeScheduleディレクティブの例
次の例は、サーモスタットのスケジュールを再開するためにAlexaがスキルに送信するResumeSchedule
ディレクティブを示しています。
{
"directive": {
"header": {
"namespace": "Alexa.ThermostatController",
"name": "ResumeSchedule",
"messageId": "一意のバージョン4 UUID",
"correlationToken": "opaque相関トークン",
"payloadVersion": "3.2"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2ベアラートークン"
},
"endpointId": "エンドポイントID",
"cookie": {}
},
"payload": {}
}
}
ResumeScheduleディレクティブのペイロード
ResumeSchedule
ディレクティブのペイロードは定義されていません。
ResumeSchedule応答
ResumeSchedule
ディレクティブを正しく処理したら、Alexa.Response
イベントを使用して応答します。contextオブジェクトに、関連するすべてのプロパティの値を含めます。
以下は、ResumeSchedule
応答の例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "Response",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"correlationToken": "リクエストに一致するopaque相関トークン",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "エンドポイントID"
},
"payload": {}
},
"context": {
"properties": [
{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "HEAT",
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 18.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-02-03T16:20:50.52Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": 17.9,
"scale": "CELSIUS"
},
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 1000
}
]
}
}
ResumeScheduleディレクティブのエラー処理
ResumeSchedule
ディレクティブを正しく処理できなかった場合は、Alexa.ThermostatController.ErrorResponse
イベントを使用して応答します。温度やサーモスタット特有のエラーではない場合は、汎用のAlexa.ErrorResponse
イベントを使用して応答することもできます。
状態レポート
Alexaはエンドポイントの状態についての情報をリクエストするために、ReportState
ディレクティブを送信します。AlexaがReportState
ディレクティブを送信したら、それに対する応答としてStateReport
イベントを送信します。応答には、contextオブジェクトのすべてのretrievableプロパティの現在の状態を含めます。retrievableプロパティは検出応答で特定します。状態レポートの詳細については、状態および変更レポートについてを参照してください。
StateReport応答の例
以下は、StateReport
ディレクティブ応答の例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "StateReport",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"correlationToken": "リクエストに一致するopaque相関トークン",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2ベアラートークン"
},
"endpointId": "エンドポイントID"
},
"payload": {}
},
"context": {
"properties": [{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "HEAT",
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 20.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": 19.9,
"scale": "CELSIUS"
},
"timeOfSample": "2024-07-06T15:02:00.12Z",
"uncertaintyInMilliseconds": 1000
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2024-07-06T15:00:00.12Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
エアコン用のStateReport応答の例
以下は、エアコンのStateReport
応答の例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "StateReport",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"correlationToken": "リクエストに一致するopaque相関トークン",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2ベアラートークン"
},
"endpointId": "エンドポイントID"
},
"payload": {}
},
"context": {
"properties": [
{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "COOL",
"timeOfSample": "2020-02-26T18:20:00.00Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 20.0,
"scale": "CELSIUS"
},
"timeOfSample": "2020-02-26T18:20:00.00Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "adaptiveRecoveryStatus",
"value": "INACTIVE",
"timeOfSample": "2020-02-26T18:20:00.00Z",
"uncertaintyInMilliseconds": 1000
},
{
"namespace": "Alexa.PowerController",
"name": "powerState",
"value": "ON",
"timeOfSample": "2020-02-26T18:20:00.00Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2020-02-26T18:20:00.00Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
変更レポート
エンドポイントの状態の変化をプロアクティブにレポートするために、ChangeReport
イベントを送信します。プロアクティブにレポートするプロパティは検出応答で特定します。変更レポートの詳細については、状態および変更レポートについてを参照してください。
ChangeReportイベントの例
以下は、ChangeReport
イベントの例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "ChangeReport",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0ベアラートークン"
},
"endpointId": "エンドポイントID"
},
"payload": {
"change": {
"cause": {
"type": "PHYSICAL_INTERACTION"
},
"properties": [
{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "EM_HEAT",
"timeOfSample": "2024-01-01T08:00:00.05Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 18.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-01-01T08:00:00.05Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": 19.1,
"scale": "CELSIUS"
},
"timeOfSample": "2024-01-01T08:00:00.05Z",
"uncertaintyInMilliseconds": 1000
}
]
}
}
},
"context": {
"properties": [{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2024-01-01T07:50:00.00Z",
"uncertaintyInMilliseconds": 0
}]
}
}
エアコンのChangeReportイベントの例
以下は、エアコンのChangeReport
イベントの例です。
{
"event": {
"header": {
"namespace": "Alexa",
"name": "ChangeReport",
"messageId": "一意の識別子、バージョン4 UUIDが望ましい",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0ベアラートークン"
},
"endpointId": "エンドポイントID"
},
"payload": {
"change": {
"cause": {
"type": "RULE_TRIGGER"
},
"properties": [{
"namespace": "Alexa.ThermostatController",
"name": "thermostatMode",
"value": "COOL",
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "targetSetpoint",
"value": {
"value": 18.0,
"scale": "CELSIUS"
},
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.ThermostatController",
"name": "adaptiveRecoveryStatus",
"value": "PRECOOLING",
"timeOfSample": "2024-07-01T08:00:00.12Z",
"uncertaintyInMilliseconds": 1000
},
{
"namespace": "Alexa.TemperatureSensor",
"name": "temperature",
"value": {
"value": 19.1,
"scale": "CELSIUS"
},
"timeOfSample": "2024-07-01T08:01:00.00Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
},
"context": {
"properties": [{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2024-06-30T23:59:00.32Z",
"uncertaintyInMilliseconds": 0
}]
}
}
ユーザー確認の要求
ja-JP
ロケールでのみサポートされています。ユーザーが温度を設定したり、サーモスタットのモード変更を指示した場合に、必要に応じてAlexaが実行する前にアクションを確認するようユーザーに要求できます。ユーザー確認を求めるには、Discover.Response
で確認を要求するディレクティブを指定します。詳細については、 verificationsRequiredオブジェクトとユーザー確認を求めるサーモスタットの例を参照してください。
次に、ユーザー確認が必要な場合の会話の例を示します。
Alexa, set the temperature to sixty-five degrees on the living room air conditioner.
Set living room air conditioner to sixty-five degrees?
Yes.
OK, living room air conditioner is set to sixty-five degrees.
アレクサ、リビングのエアコンを25度にして。
リビングのエアコンで、設定温度を25度にするんですね?
はい。
リビングのエアコンを冷房25度に設定しました。
関連トピック
- Alexa.ThermostatController.Configuration
- Alexa.ThermostatController.HVAC.Components
- Alexa.ThermostatController.Schedule
最終更新日: 2025 年 08 月 05 日