คู่มือเครื่องทําความเย็นสําหรับบ้านอัจฉริยะ
action.devices.types.AIRCOOLER
- เครื่องทําความเย็นเป็นอุปกรณ์ที่อนุญาตให้ทําความเย็นและการควบคุมความชื้น อุปกรณ์เหล่านี้มักมีน้ําหนักเบาและพกพาสะดวกกว่าเครื่องปรับอากาศ และมีถังเก็บน้ํา เครื่องทําความเย็นอาจไม่รองรับความร้อนหรือการตั้งอุณหภูมิที่แน่นอน การโต้ตอบกับเครื่องทําความเย็นอาจรวมถึงการเปลี่ยนการตั้งค่าความเร็วและความชื้นของพัดลม
ประเภทนี้เป็นการระบุว่าอุปกรณ์จะได้รับไอคอนเครื่องทําความเย็น รวมถึงคําพ้องความหมายและชื่อแทนที่เกี่ยวข้องบางรายการ
ความสามารถของอุปกรณ์
อ่านรายละเอียดเกี่ยวกับลักษณะการใช้งาน เช่น แอตทริบิวต์และรัฐที่บริการควรรองรับ ตลอดจนวิธีสร้างการตอบกลับ "EXECUTE" และ "QUERY"
ลักษณะเฉพาะที่จําเป็น
ต้องมีลักษณะเฉพาะและคําสั่งเหล่านี้ หากเกี่ยวข้องกับอุปกรณ์ของคุณ
-
action.devices.traits.FanSpeed
-
action.devices.traits.HumiditySetting
-
action.devices.traits.OnOff
-
action.devices.traits.TemperatureSetting
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 1,000 มิลลิวินาที
- ความเสถียร: ต้องมากกว่าหรือเท่ากับ 97%
อุปกรณ์ตัวอย่าง: เครื่องทําความเย็นแบบธรรมดา
ส่วนนี้ประกอบด้วยตัวอย่างเพย์โหลดของตัวแทนที่แสดงถึง "เครื่องทําความเย็น" ทั่วไป โดยอิงตามประเภทอุปกรณ์และลักษณะข้างต้น หากคุณเพิ่มหรือนําลักษณะเฉพาะออกจากการใช้งาน ให้แก้ไขคําตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบกลับ SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.AIRCOOLER", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.HumiditySetting", "action.devices.traits.OnOff", "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple air cooler" }, "willReportState": true, "attributes": { "humiditySetpointRange": { "minPercent": 0, "maxPercent": 50 }, "availableFanSpeeds": { "speeds": [ { "speed_name": "off_key", "speed_values": [ { "speed_synonym": [ "Off", "0" ], "lang": "en" } ] }, { "speed_name": "low_key", "speed_values": [ { "speed_synonym": [ "Low", "1" ], "lang": "en" } ] }, { "speed_name": "medium_key", "speed_values": [ { "speed_synonym": [ "Medium", "2" ], "lang": "en" } ] }, { "speed_name": "high_key", "speed_values": [ { "speed_synonym": [ "High", "3" ], "lang": "en" } ] } ], "ordered": true }, "availableThermostatModes": [ "off", "cool", "on", "fan-only", "eco" ], "thermostatTemperatureUnit": "C" }, "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, "currentFanSpeedSetting": "low_key", "thermostatMode": "cool", "thermostatTemperatureAmbient": 25, "thermostatTemperatureSetpoint": 20, "humiditySetpointPercent": 15, "humidityAmbientPercent": 10 } } } }
ตัวอย่างคําสั่ง EXECUTE
ตั้งค่าความเร็วของพัดลม
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.FanSpeed
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetFanSpeed", "params": { "fanSpeed": "high_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentFanSpeedSetting": "high_key" } } ] } }
กําหนดจุดศูนย์กลาง
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.HumiditySetting
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetHumidity", "params": { "humidity": 20 } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "humiditySetpointPercent": 20, "humidityAmbientPercent": 10 } } ] } }
ปิด
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.OnOff
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }
ตัวควบคุมอุณหภูมิอุณหภูมิที่กําหนด
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TemperatureSetting
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
โหมดตัวควบคุมอุณหภูมิ
โปรดดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งในข้อมูลอ้างอิง
action.devices.traits.TemperatureSetting
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "cool" } } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }