スマートホーム芝刈り機ガイド
action.devices.types.MOWER
- 芝刈り機の例としては、芝刈りの開始、停止、一時停止、ドッキング、現在のサイクルの確認、芝刈り機の位置の確認、さまざまなモードの調整などがあります。
このタイプのデバイスは、芝刈り機のアイコンと、関連する類義語とエイリアスを持つことを示します。
デバイスの機能
サービスがサポートする属性や状態、EXECUTE レスポンスと QUERY レスポンスの構築方法など、実装の詳細については、対応するトレイトのドキュメントをご覧ください。
必要な特性
これらのトレイトとコマンドは、お使いのデバイスに必須です。
推奨されるトレイト
これらのトレイトは、お客様のデバイスに該当する場合におすすめです。 ただし、既存のプロダクトの機能に合わせて、使用可能なすべてのトレイトを自由に組み合わせて使用できます。
-
action.devices.traits.Dock
-
action.devices.traits.EnergyStorage
-
action.devices.traits.Locator
-
action.devices.traits.OnOff
-
action.devices.traits.RunCycle
品質要件
- レイテンシ: 3000 ミリ秒以下である必要があります。
- 信頼性: 97% 以上を指定します。
デバイス例: シンプルな芝刈り機
このセクションでは、上記のデバイスタイプとトレイトに基づく、一般的な「Mower」を表すインテント ペイロードの例について説明します。実装でトレイトを追加または削除する場合は、その変更を反映するようにレスポンスを変更します。
SYNC レスポンスの例
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.MOWER", "traits": [ "action.devices.traits.Dock", "action.devices.traits.EnergyStorage", "action.devices.traits.StartStop" ], "name": { "name": "Simple mower" }, "willReportState": true, "attributes": { "queryOnlyEnergyStorage": true, "pausable": true, "availableZones": [ "left driveway", "right driveway", "around the hedges" ] }, "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, "isRunning": true, "isPaused": false, "isDocked": false, "activeZones": [ "left driveway" ], "descriptiveCapacityRemaining": "HIGH", "capacityRemaining": [ { "unit": "SECONDS", "rawValue": 36000 }, { "unit": "PERCENTAGE", "rawValue": 90 } ] } } } }
EXECUTE コマンドの例
ホルダー
コマンド パラメータの詳細については、
action.devices.traits.Dock
リファレンスをご覧ください。
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.Dock" } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isDocked": true } } ] } }
StartStop
コマンド パラメータの詳細については、
action.devices.traits.StartStop
リファレンスをご覧ください。
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.StartStop", "params": { "start": true, "zone": "right driveway" } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isRunning": true, "isPaused": false, "activeZones": [ "right driveway" ] } } ] } }