スマートホーム除湿器ガイド
action.devices.types.DEHUMIDIFIER
- 除湿機は、空気中の湿気を取り除くデバイスです。スイッチのオン / オフ、目標湿度のレポートと調整のほか、さまざまな調整モードやファン速度設定があります。
このタイプのデバイスは、除湿機のアイコンと、関連する類義語とエイリアスを受け取ります。
デバイスの機能
サービスがサポートする属性や状態、EXECUTE レスポンスと QUERY レスポンスの構築方法など、実装の詳細については、対応するトレイトのドキュメントをご覧ください。
必要な特性
これらのトレイトとコマンドは、お使いのデバイスに必須です。デバイスがこれらのトレイトをサポートしていない場合は、クエリまたは EXECUTE のレスポンスに functionNotSupported
のエラーコードを入力します。詳細については、エラーと例外をご覧ください。
推奨されるトレイト
これらのトレイトは、お客様のデバイスに該当する場合におすすめです。 ただし、既存のプロダクトの機能に合わせて、使用可能なすべてのトレイトを自由に組み合わせて使用できます。
-
action.devices.traits.FanSpeed
-
action.devices.traits.HumiditySetting
-
action.devices.traits.StartStop
品質要件
- レイテンシ: 1,000 ミリ秒以下にする必要があります。
- 信頼性: 97% 以上を指定します。
デバイスの例: シンプルな除湿機
このセクションでは、上記のデバイスタイプとトレイトに基づく、一般的な「除湿機」を表すインテント ペイロードの例について説明します。実装でトレイトを追加または削除する場合は、その変更を反映するようにレスポンスを変更します。
SYNC レスポンスの例
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.DEHUMIDIFIER", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.HumiditySetting", "action.devices.traits.OnOff" ], "name": { "name": "Simple dehumidifier" }, "willReportState": true, "attributes": { "humiditySetpointRange": { "minPercent": 5, "maxPercent": 50 }, "availableFanSpeeds": { "speeds": [ { "speed_name": "low_key", "speed_values": [ { "lang": "en", "speed_synonym": [ "Low", "Slow" ] }, { "lang": "de", "speed_synonym": [ "Niedrig", "Schleppend" ] } ] }, { "speed_name": "high_key", "speed_values": [ { "lang": "en", "speed_synonym": [ "High" ] }, { "lang": "de", "speed_synonym": [ "Hoch" ] } ] } ], "ordered": true } }, "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, "on": true, "currentFanSpeedSetting": "low_key", "humiditySetpointPercent": 10, "humidityAmbientPercent": 20 } } } }
EXECUTE コマンドの例
SetFanSpeed
コマンド パラメータの詳細については、
action.devices.traits.FanSpeed
リファレンスをご覧ください。
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetFanSpeed", "params": { "fanSpeed": "high_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentFanSpeedSetting": "high_key" } } ] } }
SetHumidity
コマンド パラメータの詳細については、
action.devices.traits.HumiditySetting
リファレンスをご覧ください。
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetHumidity", "params": { "humidity": 15 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "humiditySetpointPercent": 15, "humidityAmbientPercent": 20 } } ] } }
オン
コマンド パラメータの詳細については、
action.devices.traits.OnOff
リファレンスをご覧ください。
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }