คู่มือระบบปรับอากาศอัจฉริยะสำหรับบ้านอัจฉริยะ
action.devices.types.AC_UNIT
- หน่วยเครื่องปรับอากาศคล้ายกับตัวควบคุมอุณหภูมิ แต่ไม่รองรับการทำความร้อนและอาจไม่รองรับการตั้งเป้าหมายอุณหภูมิ
ประเภทนี้บ่งบอกว่าอุปกรณ์จะมีไอคอน "เครื่องปรับอากาศ" รวมถึงคำพ้องและชื่อแทนที่เกี่ยวข้องบางอย่าง
ความสามารถของอุปกรณ์
โปรดดูเอกสารลักษณะที่เกี่ยวข้องสำหรับรายละเอียดการติดตั้งใช้งาน เช่น แอตทริบิวต์และระบุว่าบริการควรรองรับ และวิธีสร้างการตอบกลับ EXECUTE และ QUERY
ลักษณะที่จำเป็น
คุณลักษณะและคำสั่งเหล่านี้จำเป็น (หากเกี่ยวข้องกับอุปกรณ์ของคุณ) หากอุปกรณ์ไม่รองรับลักษณะเหล่านี้ ให้ป้อนรหัสข้อผิดพลาดของ functionNotSupported
ในการตอบกลับ QUERY หรือ EXECUTE โปรดดูข้อมูลเพิ่มเติมที่ข้อผิดพลาดและข้อยกเว้น
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 1,000 มิลลิวินาที
- ความเสถียร: ต้องมากกว่าหรือเท่ากับ 97%
อุปกรณ์ตัวอย่าง: เครื่องปรับอากาศ AC แบบง่าย
ส่วนนี้ประกอบด้วยเพย์โหลด Intent ตัวอย่างที่แสดง "หน่วยปรับอากาศ" ทั่วไปโดยอิงตามประเภทอุปกรณ์และลักษณะข้างต้น หากคุณเพิ่มหรือนำลักษณะในการใช้งานออก ให้แก้ไขคำตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบสนองการซิงค์
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.AC_UNIT", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.OnOff", "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple AC unit" }, "willReportState": true, "attributes": { "availableFanSpeeds": { "speeds": [ { "speed_name": "low_key", "speed_values": [ { "speed_synonym": [ "Low", "Slow" ], "lang": "en" } ] }, { "speed_name": "high_key", "speed_values": [ { "speed_synonym": [ "High", "Speed 2" ], "lang": "en" } ] } ], "ordered": true }, "availableThermostatModes": [ "off", "cool", "fan-only", "on" ], "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 } } } }
ตัวอย่างคำสั่ง 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.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": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }
โหมดชุดตัวควบคุมอุณหภูมิ
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คำสั่งได้ที่ข้อมูลอ้างอิง
action.devices.traits.TemperatureSetting
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "cool" } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "cool", "thermostatTemperatureSetpoint": 22, "thermostatTemperatureAmbient": 25.1 } } ] } }