Panduan Mesin Pemotong Rumah Cerdas
action.devices.types.MOWER
- Interaksi dengan mesin pemotong rumput dapat mencakup memulai, menghentikan, dan menjeda pemotongan, dok, memeriksa siklus saat ini, menemukan mesin pemotong rumput, dan menyesuaikan berbagai mode.
Jenis ini menunjukkan bahwa perangkat mendapatkan ikon Mesin Pemotong serta beberapa sinonim dan alias yang terkait.
Kemampuan perangkat
Lihat dokumentasi karakteristik yang sesuai untuk detail implementasi, seperti atribut dan status yang harus didukung oleh layanan Anda, serta cara membuat respons EXECUTE dan QUERY.
Sifat yang diperlukan
Sifat dan perintah ini diperlukan, jika berlaku untuk perangkat Anda.
Ciri-ciri yang direkomendasikan
Ciri-ciri ini direkomendasikan, jika berlaku untuk perangkat Anda. Namun, Anda bebas memadupadankan semua ciri yang tersedia agar cocok dengan fungsi produk yang ada.
-
action.devices.traits.Dock
-
action.devices.traits.EnergyStorage
-
action.devices.traits.Locator
-
action.devices.traits.OnOff
-
action.devices.traits.RunCycle
Persyaratan kualitas
- Latensi: harus kurang dari atau sama dengan 3000ms.
- Keandalan: harus lebih dari atau sama dengan 97%.
Contoh perangkat: Mesin pemotong rumput sederhana
Bagian ini berisi contoh payload intent yang merepresentasikan "Mesin pemotong rumput" umum berdasarkan jenis dan karakteristik perangkat di atas. Jika Anda menambahkan atau menghapus karakteristik dalam implementasi, ubah respons agar sesuai dengan perubahan tersebut.
Contoh respons 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" } } ] } }
Contoh respons 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 } ] } } } }
Contoh perintah EXECUTE
Pasang ke dok
Untuk detail tambahan tentang parameter perintah, lihat referensi
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
Untuk detail tambahan tentang parameter perintah, lihat referensi
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" ] } } ] } }