คู่มือตัวรดน้ําต้นไม้อัจฉริยะ
action.devices.types.SPRINKLER
- สปริงเกอร์เริ่มและหยุด (หรือเปิดและปิด) ได้ นอกจากนี้ยังอาจรองรับตัวจับเวลาและ/หรือกําหนดเวลาด้วย
ประเภทนี้บ่งชี้ว่าอุปกรณ์จะได้รับไอคอนสปริงเกอร์ รวมถึงคําพ้องความหมายและชื่อแทนที่เกี่ยวข้องบางส่วน
ความสามารถของอุปกรณ์
โปรดดูเอกสารประกอบที่เกี่ยวข้องสําหรับรายละเอียดการใช้งาน เช่น แอตทริบิวต์และสถานะที่บริการของคุณควรมี และวิธีการสร้างการตอบกลับและคําขอ EXECUTE
ลักษณะเฉพาะที่จําเป็น
ต้องมีคุณลักษณะและคําสั่งเหล่านี้ หากสามารถใช้กับอุปกรณ์ของคุณ
ลักษณะเฉพาะที่แนะนํา
เราขอแนะนําให้มีคุณสมบัติเหล่านี้ (หากใช้ร่วมกับอุปกรณ์ของคุณ) อย่างไรก็ตาม คุณสามารถผสมผสานคุณลักษณะที่มีอยู่ทั้งหมดได้เพื่อจับคู่กับฟังก์ชันการทํางานของผลิตภัณฑ์ที่มีอยู่
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 800 มิลลิวินาที
- ความเสถียร: ต้องมากกว่าหรือเท่ากับ 97%
ตัวอย่างอุปกรณ์: เครื่องรดน้ําต้นไม้
ส่วนนี้ประกอบด้วยเปย์โหลด Intent ตัวอย่างที่แสดง "เครื่องรดน้ําต้นไม้" ที่พบบ่อยตามประเภทอุปกรณ์และลักษณะข้างต้น หากเพิ่มหรือนําลักษณะเฉพาะออกจากการใช้งาน ให้แก้ไขคําตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบสนอง SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.SPRINKLER", "traits": [ "action.devices.traits.Timer", "action.devices.traits.StartStop" ], "name": { "name": "Simple sprinkler" }, "willReportState": true, "attributes": { "availableZones": [ "front", "back" ], "maxTimerLimitSec": 3600 }, "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, "activeZones": [ "front" ], "timerRemainingSec": 300 } } } }
ตัวอย่างคําสั่ง EXECUTE
เริ่มจับเวลา
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerStart", "params": { "timerTimeSec": 300 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300 } } ] } }
ตัวตั้งเวลาปรับ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerAdjust", "params": { "timerTimeSec": -10 } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 290 } } ] } }
หยุดจับเวลาชั่วคราว
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerPause" } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300, "timerPaused": true } } ] } }
จับเวลาต่อ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerResume" } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300, "timerPaused": false } } ] } }
ยกเลิกตัวจับเวลา
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654526", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerCancel" } ] } ] } } ] }
{ "requestId": "6894439706274654526", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": -1 } } ] } }
จุดเริ่มต้น
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.StartStop
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.StartStop", "params": { "start": true, "zone": "back" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isRunning": true, "activeZones": [ "back" ] } } ] } }