スマートホーム サーモスタット ガイド
action.devices.types.THERMOSTAT
- サーモスタットは、設定ポイントとモードを備えた温度管理デバイスです。このタイプでは温度目標が可能です。これに対して、ヒーターやエアコン(AC)ユニットではモードと設定(高/低など)しかない場合があります。
このタイプは、サーモスタット アイコンといくつかの関連する同義語 / 別名がデバイスに与えられることを示します。
このタイプのデバイスは温度を制御します。これに対して、一部の暖房/冷房室内ユニットは高/低モードを備えていますが、温度制御は備えていません。デバイスの機能
サービスがサポートする必要がある属性や状態、EXECUTE レスポンスと QUERY レスポンスを構築する方法など、実装の詳細については、対応するトレイトのドキュメントをご覧ください。
必須のトレイト
これらの特性とコマンドは、デバイスに該当する場合に必要です。デバイスがこれらのトレイトをサポートしていない場合は、QUERY レスポンスまたは EXECUTE レスポンスにエラーコード functionNotSupported
を入力します。詳細については、エラーと例外をご覧ください。
サーモスタット コマンドは、EXECUTE
インテント内でチェーン化されることが多いです。ユーザーが「温度を 72 度に設定」と言うと、モードコマンドが生成され、さらに温度設定が生成されます。
品質要件
- レイテンシ: 700 ms 以下にする必要があります。
- 信頼性: 97% 以上である必要があります。
デバイスの例: シンプルなサーモスタット
このセクションでは、上記のデバイスタイプとトレイトに基づいて一般的な「サーモスタット」を表すインテントのペイロードの例を示します。実装でトレイトを追加または削除する場合は、変更を反映するようにレスポンスを変更します。
SYNC レスポンスの例
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.THERMOSTAT", "traits": [ "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple thermostat" }, "willReportState": true, "attributes": { "availableThermostatModes": [ "off", "heat", "cool", "heatcool", "on" ], "thermostatTemperatureRange": { "minThresholdCelsius": 15, "maxThresholdCelsius": 30 }, "thermostatTemperatureUnit": "F" }, "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" } ] } } ] }
{ "requestId": "6894439706274654514", "payload": { "devices": { "123": { "status": "SUCCESS", "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 23, "thermostatTemperatureAmbient": 25.1, "thermostatHumidityAmbient": 45.3 } } } }
EXECUTE コマンドの例
ThermostatTemperatureSetpoint
コマンド パラメータの詳細については、
action.devices.traits.TemperatureSetting
リファレンスをご覧ください。
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
ThermostatTemperatureSetRange
コマンド パラメータの詳細については、
action.devices.traits.TemperatureSetting
リファレンスをご覧ください。
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetRange", "params": { "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "heatcool", "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
ThermostatSetMode
コマンド パラメータの詳細については、
action.devices.traits.TemperatureSetting
リファレンスをご覧ください。
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "heatcool" } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "heatcool", "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
デバイスエラー
エラーと例外の全リストをご覧ください。inHeatOrCool
- デバイスが明示的な暖房または冷房状態にあるため、Heat / Cool / Range コマンドが失敗しました。inHeatCool
- デバイスが暖房または冷房状態にあるため、Heat または Cool コマンドが失敗しました。lockedToRange
- デバイスは特定の温度範囲またはモードにロックされているので、要求された変更を行うことができません。rangeTooClose
- 暖房 / 冷房範囲の温度ポイントが互いに近すぎます。