دليل وحدة تكييف الهواء في المنزل الذكي
action.devices.types.AC_UNIT
- تشبه وحدات التكييف الترموستات، ولكنها لا تتيح التدفئة وقد لا تتيح ضبط الأهداف الحرارية.
يشير هذا النوع إلى أنّ الجهاز يحصل على رمز وحدة تكييف الهواء وبعض المرادفات والأسماء البديلة ذات الصلة.
إمكانات الجهاز
راجِع مستندات السمة المقابلة للحصول على تفاصيل التنفيذ، مثل السمات والحالات التي يجب أن تتوافق معها خدمتك، وكيفية إنشاء ردود EXECUTE وQUERY.
السمات المطلوبة
هذه السمات والأوامر مطلوبة، إذا كانت قابلة للتطبيق على
جهازك. إذا كان جهازك لا يتيح استخدام هذه السمات، أدخِل رمز الخطأ
functionNotSupported
في استجابة QUERY أو EXECUTE. اطّلِع على الأخطاء والاستثناءات للحصول على مزيد من المعلومات.
متطلبات الجودة
- وقت الاستجابة: يجب أن يكون أقل من أو يساوي 1000 ملي ثانية.
- الموثوقية: يجب أن تكون أكبر من أو تساوي %97.
مثال على الجهاز: وحدة تكييف هواء بسيطة
يتضمّن هذا القسم أمثلة على حمولات بيانات الأهداف التي تمثّل "وحدة تكييف الهواء" شائعة استنادًا إلى نوع الجهاز والسمات المذكورة أعلاه. في حال إضافة سمات أو إزالتها في عملية التنفيذ، عدِّل ردودك وفقًا لذلك لتعكس هذه التغييرات.
مثال على استجابة SYNC
{ "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
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" } } ] } }
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": "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 } } ] } }
ThermostatSetMode
للحصول على تفاصيل إضافية عن مَعلمات الأوامر،
اطّلِع على مرجع
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 } } ] } }