คู่มือเครื่องชงกาแฟสำหรับบ้านอัจฉริยะ
action.devices.types.COFFEE_MAKER
- การโต้ตอบกับเครื่องชงกาแฟอาจรวมถึงการเปิดและปิดเครื่องทำกาแฟ การปรับโหมดการทำอาหารและค่าที่กำหนดล่วงหน้าของอาหาร การปรับอุณหภูมิเป้าหมาย และการปรับการตั้งค่าโหมดที่ไม่ใช่การทำอาหารแบบต่างๆ
ประเภทนี้บ่งบอกว่าอุปกรณ์มีไอคอนเครื่องชงกาแฟ รวมถึงคำพ้องและชื่อแทนที่เกี่ยวข้อง
ความสามารถของอุปกรณ์
โปรดดูเอกสารลักษณะที่เกี่ยวข้องเพื่อดูรายละเอียดการนำไปใช้งาน เช่น แอตทริบิวต์และสถานะของบริการที่ควรรองรับ รวมถึงวิธีสร้างการตอบสนอง EXECUTE และ QUERY
ลักษณะที่จำเป็น
ลักษณะและคำสั่งเหล่านี้จำเป็น หากเกี่ยวข้องกับอุปกรณ์ของคุณ หากอุปกรณ์ของคุณไม่รองรับลักษณะเหล่านี้ ให้ป้อนรหัสข้อผิดพลาด functionNotSupported
ในคำตอบ QUERY หรือ EXECUTE ดูข้อมูลเพิ่มเติมได้ที่ข้อผิดพลาดและข้อยกเว้น
ลักษณะที่แนะนำ
เราขอแนะนำให้ใช้ลักษณะเหล่านี้ หากเกี่ยวข้องกับอุปกรณ์ของคุณ อย่างไรก็ตาม คุณสามารถผสมผสานลักษณะที่มีอยู่ทั้งหมดให้ตรงกับฟังก์ชันการทำงานของผลิตภัณฑ์ที่มีอยู่มากที่สุดได้อย่างอิสระ
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 800 มิลลิวินาที
- ความเสถียร: ต้องมากกว่าหรือเท่ากับ 97%
อุปกรณ์ตัวอย่าง: เครื่องชงกาแฟธรรมดา
ส่วนนี้ประกอบด้วยตัวอย่างเพย์โหลด Intent ที่แสดงถึง "Coffee Maker" ทั่วไปโดยอิงตามประเภทอุปกรณ์และลักษณะข้างต้น หากคุณเพิ่มหรือนำลักษณะในการใช้งานออก ให้แก้ไขคำตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบสนองของ SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.COFFEE_MAKER", "traits": [ "action.devices.traits.Cook", "action.devices.traits.TemperatureControl", "action.devices.traits.OnOff" ], "name": { "name": "Simple coffee maker" }, "willReportState": true, "attributes": { "temperatureRange": { "minThresholdCelsius": 0, "maxThresholdCelsius": 100 }, "temperatureUnitForUX": "F", "supportedCookingModes": [ "BREW" ], "foodPresets": [ { "food_preset_name": "coffee_key", "supported_units": [ "NO_UNITS", "CUPS" ], "food_synonyms": [ { "synonym": [ "Coffee" ], "lang": "en" } ] } ] }, "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, "temperatureSetpointCelsius": 70, "currentCookingMode": "BREW", "currentFoodPreset": "coffee_key", "currentFoodQuantity": 2, "currentFoodUnit": "CUPS" } } } }
ตัวอย่างคำสั่ง 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": "BREW" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentCookingMode": "NONE", "currentFoodPreset": "NONE" } } ] } }
SetTemperature
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
action.devices.traits.TemperatureControl
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetTemperature", "params": { "temperature": 85 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "temperatureSetpointCelsius": 85 } } ] } }
OnOff
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
action.devices.traits.OnOff
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }