Panduan Router Smart Home
action.devices.types.ROUTER
- Router dapat memulai ulang, mengupdate software-nya, memiliki mode untuk menangani kontrol Kualitas Layanan (QoS) dan batasan orang tua, serta melakukan operasi khusus jaringan (seperti mengaktifkan jaringan tamu dan melaporkan informasi khusus jaringan seperti rasio throughput internet saat ini).
Jenis ini menunjukkan bahwa perangkat mendapatkan ikon Router serta beberapa alias 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.
Persyaratan kualitas
- Latensi: harus kurang dari atau sama dengan 300ms.
- Keandalan: harus lebih dari atau sama dengan 97%.
Contoh perangkat: Router sederhana
Bagian ini berisi contoh payload intent yang merepresentasikan "Router" 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.ROUTER", "traits": [ "action.devices.traits.Reboot", "action.devices.traits.NetworkControl" ], "name": { "name": "Simple router" }, "willReportState": true, "attributes": { "supportsEnablingNetworkProfile": true, "supportsDisablingNetworkProfile": true, "supportsNetworkDownloadSpeedTest": true, "supportsNetworkUploadSpeedTest": true, "networkProfiles": [ "kids" ] }, "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, "networkEnabled": true, "networkSettings": { "ssid": "home-network-123" }, "numConnectedDevices": 4, "networkUsageMB": 100.8 } } } }
Contoh perintah EXECUTE
Mulai ulang
Untuk detail tambahan tentang parameter perintah, lihat referensi action.devices.traits.Reboot
.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.Reboot" } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true } } ] } }
AktifkanDisableNetworkProfile
Untuk detail tambahan tentang parameter perintah, lihat referensi action.devices.traits.NetworkControl
.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.EnableDisableNetworkProfile", "params": { "profile": "kids", "enable": false } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "networkEnabled": true, "networkSettings": { "ssid": "home-network-123" } } } ] } }
KecepatanTestNetwork
Untuk detail tambahan tentang parameter perintah, lihat referensi action.devices.traits.NetworkControl
.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TestNetworkSpeed", "params": { "testDownloadSpeed": true, "testUploadSpeed": true, "followUpToken": "123" } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true } } ] } }