คําแนะนําเกี่ยวกับเครื่องทําโยเกิร์ตอัจฉริยะ
action.devices.types.YOGURTMAKER
- การโต้ตอบกับเครื่องทําโยเกิร์ตอาจรวมถึงการเริ่มและการหยุด การตั้งค่าตัวจับเวลา การปรับเปลี่ยนโหมดการทําอาหาร หรือค่าที่กําหนดล่วงหน้าของอาหาร หรือการปรับการตั้งค่าอื่นๆ
ประเภทนี้บ่งชี้ว่าอุปกรณ์จะได้รับไอคอนโยเกิร์ต รวมถึงคําพ้องความหมายและชื่อแทนที่เกี่ยวข้องบางส่วน
ความสามารถของอุปกรณ์
โปรดดูเอกสารประกอบที่เกี่ยวข้องสําหรับรายละเอียดการใช้งาน เช่น แอตทริบิวต์และสถานะที่บริการของคุณควรมี และวิธีการสร้างการตอบกลับและคําขอ EXECUTE
ลักษณะเฉพาะที่จําเป็น
ต้องมีคุณลักษณะและคําสั่งเหล่านี้ หากสามารถใช้กับอุปกรณ์ของคุณ
ลักษณะเฉพาะที่แนะนํา
เราขอแนะนําให้มีคุณสมบัติเหล่านี้ (หากใช้ร่วมกับอุปกรณ์ของคุณ) อย่างไรก็ตาม คุณสามารถผสมผสานคุณลักษณะที่มีอยู่ทั้งหมดได้เพื่อจับคู่กับฟังก์ชันการทํางานของผลิตภัณฑ์ที่มีอยู่
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 800 มิลลิวินาที
- ความเสถียร: ต้องมากกว่าหรือเท่ากับ 97%
อุปกรณ์ตัวอย่าง: เครื่องทําโยเกิร์ตแบบธรรมดา
ส่วนนี้ประกอบด้วยเปย์โหลด Intent ตัวอย่างที่แสดง "Yogurt Maker" ทั่วไปโดยอิงตามประเภทอุปกรณ์และลักษณะข้างต้น หากเพิ่มหรือนําลักษณะเฉพาะออกจากการใช้งาน ให้แก้ไขคําตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบสนอง SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.YOGURTMAKER", "traits": [ "action.devices.traits.Cook", "action.devices.traits.StartStop", "action.devices.traits.Timer", "action.devices.traits.OnOff" ], "name": { "name": "Simple yogurt maker" }, "willReportState": true, "attributes": { "supportedCookingModes": [ "COOK" ], "foodPresets": [ { "food_preset_name": "yogurt_key", "supported_units": [ "CUPS", "OUNCES" ], "food_synonyms": [ { "synonym": [ "Yogurt", "Yoghurt" ], "lang": "en" } ] }, { "food_preset_name": "coconut_yogurt_key", "supported_units": [ "CUPS", "OUNCES" ], "food_synonyms": [ { "synonym": [ "Coconut yogurt", "Vegan yogurt" ], "lang": "en" } ] } ], "maxTimerLimitSec": 30, "pausable": 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, "isRunning": true, "isPaused": false, "timerRemainingSec": 30, "currentCookingMode": "COOK", "currentFoodPreset": "yogurt_key" } } } }
ตัวอย่างคําสั่ง EXECUTE
ทำอาหาร
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Cook
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.Cook", "params": { "start": false, "cookingMode": "COOK" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentCookingMode": "NONE", "currentFoodPreset": "NONE" } } ] } }
จุดเริ่มต้น
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
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 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isRunning": true, "isPaused": false } } ] } }
เริ่มจับเวลา
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerStart", "params": { "timerTimeSec": 30 } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 30 } } ] } }
ตัวตั้งเวลาปรับ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerAdjust", "params": { "timerTimeSec": -10 } } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 20 } } ] } }
หยุดจับเวลาชั่วคราว
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654526", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerPause" } ] } ] } } ] }
{ "requestId": "6894439706274654526", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 30, "timerPaused": true } } ] } }
จับเวลาต่อ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654528", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerResume" } ] } ] } } ] }
{ "requestId": "6894439706274654528", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 30, "timerPaused": false } } ] } }
ยกเลิกตัวจับเวลา
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.Timer
{ "requestId": "6894439706274654530", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerCancel" } ] } ] } } ] }
{ "requestId": "6894439706274654530", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": -1 } } ] } }
ปิด
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่การอ้างอิง
action.devices.traits.OnOff
{ "requestId": "6894439706274654532", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654532", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }