スマートホーム サーモスタット ガイド
action.devices.types.THERMOSTAT
- サーモスタットは、設定ポイントとモードを備えた温度管理デバイスです。目標温度に対してモードと設定(高/低など)しか用意されていないヒーターやエアコン ユニットとは区別されます。
このタイプは、サーモスタット アイコンと、関連する類義語と別名がデバイスに与えられることを示します。
このタイプのデバイスは温度を制御しますが、一部の暖房/冷房ユニットは異なる制御と高/低モードを備えていますが、温度制御は備えていません。デバイスの機能
サービスがサポートする必要がある属性や状態、EXECUTE および QUERY レスポンスの作成方法など、実装の詳細については、対応するトレイトのドキュメントをご覧ください。
必要なトレイト
デバイスに適用可能な場合は、これらのトレイトとコマンドが必要です。デバイスがこれらのトレイトをサポートしていない場合は、QUERY または EXECUTE レスポンスに functionNotSupported
のエラーコードを入力します。詳細については、エラーと例外をご覧ください。
サーモスタットのコマンドは、EXECUTE
インテントで頻繁にチェーンされます。ユーザーが「暖房を 22 度にして」と言うと、モードコマンドが生成され、その後温度が設定されます。
品質要件
- レイテンシ: 700 ミリ秒以下。
- 信頼性: 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
- 暖房 / 冷房範囲の温度ポイントが互いに近すぎます。