คู่มือเครื่องทำความเย็นสมาร์ทโฮม
action.devices.types.AIRCOOLER
- เครื่องปรับอากาศเป็นอุปกรณ์ที่ควบคุมอุณหภูมิและความเย็นชื้น โดยทั่วไปแล้ว อุปกรณ์เหล่านี้จะเบาและพกพาได้มากกว่าเครื่องปรับอากาศ และมีถังน้ำติดอยู่ด้วย เครื่องปรับอากาศอาจไม่รองรับการทำความร้อนหรือการตั้งค่าอุณหภูมิที่แน่นอน การโต้ตอบกับเครื่องปรับอากาศอาจรวมถึงการเปลี่ยนการตั้งค่าความเร็วพัดลมและความชื้น
ประเภทนี้บ่งบอกว่าอุปกรณ์ได้รับไอคอนเครื่องปรับอากาศและคำพ้องความหมายและคำแทนที่เกี่ยวข้อง
ความสามารถของอุปกรณ์
โปรดดูรายละเอียดการใช้งานในเอกสารประกอบของลักษณะที่เกี่ยวข้อง เช่น แอตทริบิวต์และสถานะที่บริการควรรองรับ และวิธีสร้างการตอบกลับ EXECUTE และ QUERY
ลักษณะที่จำเป็น
คุณต้องใช้ลักษณะและคำสั่งเหล่านี้ หากอุปกรณ์ของคุณรองรับ หากอุปกรณ์ไม่รองรับลักษณะเหล่านี้ ให้ป้อนรหัสข้อผิดพลาดของ functionNotSupported
ในการตอบกลับ QUERY หรือ EXECUTE ดูข้อมูลเพิ่มเติมที่ข้อผิดพลาดและข้อยกเว้น
-
action.devices.traits.FanSpeed
-
action.devices.traits.HumiditySetting
-
action.devices.traits.OnOff
-
action.devices.traits.TemperatureSetting
ข้อกำหนดด้านคุณภาพ
- เวลาในการตอบสนอง: ต้องน้อยกว่าหรือเท่ากับ 1000 มิลลิวินาที
- ความน่าเชื่อถือ: ต้องมากกว่าหรือเท่ากับ 97%
ตัวอย่างอุปกรณ์: เครื่องทำความเย็นอากาศแบบธรรมดา
ส่วนนี้มีตัวอย่างเพย์โหลด Intent ที่แสดง "เครื่องปรับอากาศ" ทั่วไป โดยอิงตามประเภทอุปกรณ์และลักษณะข้างต้น หากคุณเพิ่มหรือนําลักษณะในการนําไปใช้ออก ให้แก้ไขคําตอบให้สอดคล้องกับการเปลี่ยนแปลงเหล่านั้น
ตัวอย่างการตอบกลับ 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
SetFanSpeed
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
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" } } ] } }
SetHumidity
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
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 } } ] } }
OnOff
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
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 } } ] } }
ThermostatTemperatureSetpoint
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
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 } } ] } }
ThermostatSetMode
ดูรายละเอียดเพิ่มเติมเกี่ยวกับพารามิเตอร์คําสั่งได้ที่ข้อมูลอ้างอิง
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 } } ] } }