دليل أجهزة إزالة الرطوبة الذكية للمنزل
action.devices.types.DEHUMIDIFIER: أجهزة إزالة الرطوبة هي أجهزة تزيل الرطوبة من الهواء. يمكن تشغيلها وإيقافها، والإبلاغ عن الرطوبة المستهدَفة وضبطها، وقد تتضمّن أوضاعًا مختلفة قابلة للضبط أو إعدادات لسرعة المروحة.
يشير هذا النوع إلى أنّ الجهاز يحصل على رمز جهاز إزالة الرطوبة وبعض المرادفات والأسماء المستعارة ذات الصلة.
إمكانيات الجهاز
راجِع مستندات السمة ذات الصلة للاطّلاع على تفاصيل التنفيذ، مثل السمات والحالات التي يجب أن تدعمها خدمتك، وكيفية إنشاء ردود EXECUTE وQUERY.
السمات المطلوبة
هذه السمات والأوامر مطلوبة إذا كانت تنطبق على جهازك. إذا كان جهازك لا يتوافق مع هذه السمات، أدخِل رمز الخطأ functionNotSupported في استجابة QUERY أو EXECUTE. لمزيد من المعلومات، راجِع مقالة الأخطاء والاستثناءات.
السمات المقترَحة
يُنصح باستخدام هذه السمات إذا كانت تنطبق على جهازك. ومع ذلك، يمكنك المزج بين جميع السمات المتاحة ومطابقتها مع بعضها البعض لتحقيق أفضل تطابق مع وظائف منتجك الحالية.
-
action.devices.traits.FanSpeed -
action.devices.traits.HumiditySetting -
action.devices.traits.StartStop
مثال على جهاز: جهاز بسيط لإزالة الرطوبة
يحتوي هذا القسم على أمثلة على حمولات intent التي تمثّل "جهاز إزالة الرطوبة" شائعًا استنادًا إلى نوع الأجهزة وسماته المذكورة أعلاه. في حال إضافة سمات أو إزالتها في عملية التنفيذ، عدِّل الردود وفقًا لذلك لعكس هذه التغييرات.
نموذج استجابة SYNC
{
"requestId": "6894439706274654512",
"inputs": [
{
"intent": "action.devices.SYNC"
}
]
}{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.DEHUMIDIFIER", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.HumiditySetting", "action.devices.traits.OnOff", "action.devices.traits.StartStop" ], "name": { "name": "Simple dehumidifier" }, "willReportState": true, "attributes": { "humiditySetpointRange": { "minPercent": 5, "maxPercent": 50 }, "availableFanSpeeds": { "speeds": [ { "speed_name": "low_key", "speed_values": [ { "lang": "en", "speed_synonym": [ "Low", "Slow" ] }, { "lang": "de", "speed_synonym": [ "Niedrig", "Schleppend" ] } ] }, { "speed_name": "high_key", "speed_values": [ { "lang": "en", "speed_synonym": [ "High" ] }, { "lang": "de", "speed_synonym": [ "Hoch" ] } ] } ], "ordered": true } }, "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", "humiditySetpointPercent": 10, "humidityAmbientPercent": 20, "isRunning": true, "isPaused": false } } } }
أمثلة على أوامر EXECUTE
SetFanSpeed
للحصول على تفاصيل إضافية حول مَعلمات الأمر، يُرجى الاطّلاع على مرجع
action.devices.traits.FanSpeed.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetFanSpeed", "params": { "fanSpeed": "high_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentFanSpeedSetting": "high_key" } } ] } }
SetHumidity
للحصول على تفاصيل إضافية حول مَعلمات الأمر، يُرجى الاطّلاع على مرجع
action.devices.traits.HumiditySetting.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetHumidity", "params": { "humidity": 15 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "humiditySetpointPercent": 15, "humidityAmbientPercent": 20 } } ] } }
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 } } ] } }
StartStop
للحصول على تفاصيل إضافية حول مَعلمات الأمر، يُرجى الاطّلاع على مرجع
action.devices.traits.StartStop.
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.StartStop", "params": { "start": true } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "PENDING", "states": { "online": true, "isRunning": true, "isPaused": false } } ] } }
PauseUnpause
للحصول على تفاصيل إضافية حول مَعلمات الأمر، يُرجى الاطّلاع على مرجع
action.devices.traits.StartStop.
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.PauseUnpause", "params": { "pause": true } } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "PENDING", "states": { "online": true, "isRunning": false, "isPaused": true } } ] } }