מדריך למכשירי חימום לבית חכם
action.devices.types.HEATER
– תנורי חימום דומים לתרמוסטטים, אבל הם לא תומכים בקירור ויכול להיות שהם לא תומכים בהגדרת יעדי טמפרטורה.
הסוג הזה מציין שהמכשיר יקבל את הסמל של תנור החימום וגם כמה שמות נרדפים וכינויים קשורים.
יכולות המכשיר
פרטי ההטמעה, כמו המאפיינים והמצבים שהשירות צריך לתמוך בהם, והאופן שבו יוצרים תגובות EXECUTE ו-QUERY, מפורטים במסמכי העזרה של המאפיינים המתאימים.
מאפיינים נדרשים
המאפיינים והפקודות האלה נדרשים, אם הם רלוונטיים למכשיר שלכם. אם המכשיר לא תומך במאפיינים האלה, מזינים את קוד השגיאה functionNotSupported
בתגובה של QUERY או EXECUTE. מידע נוסף זמין במאמר שגיאות וחריגות.
מאפיינים מומלצים
מומלץ להשתמש במאפיינים האלה אם הם רלוונטיים למכשיר שלכם. עם זאת, אתם יכולים לשלב בין כל המאפיינים הזמינים כדי להתאים את התכונות האלה לפונקציונליות הקיימת של המוצר.
דרישות איכות
- זמן אחזור: חייב להיות קטן מ-1000ms או שווה לו.
- אמינות: הערך חייב להיות שווה ל-97% או גדול ממנו.
דוגמה למכשיר: תנור חימום פשוט
בקטע הזה מופיעות דוגמאות של טעינות משמעותיות של כוונה שמייצגות מכשיר חימום נפוץ, על סמך סוג המכשיר והמאפיינים שמפורטים למעלה. אם מוסיפים או מסירים מאפיינים בהטמעה, צריך לשנות את התשובות בהתאם כדי לשקף את השינויים האלה.
דוגמה לתגובת SYNC
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.HEATER", "traits": [ "action.devices.traits.FanSpeed", "action.devices.traits.TemperatureSetting" ], "name": { "name": "Simple heater" }, "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" ], "lang": "en" } ] } ], "ordered": true }, "availableThermostatModes": [ "off", "heat", "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, "currentFanSpeedSetting": "low_key", "thermostatMode": "heat", "thermostatTemperatureSetpoint": 30, "thermostatTemperatureAmbient": 25 } } } }
דוגמאות לפקודות 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" } } ] } }
ThermostatTemperatureSetpoint
פרטים נוספים על הפרמטרים של הפקודה זמינים במאמר העזרה של
action.devices.traits.TemperatureSetting
.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 28 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "heat", "thermostatTemperatureSetpoint": 28, "thermostatTemperatureAmbient": 25 } } ] } }
ThermostatSetMode
פרטים נוספים על הפרמטרים של הפקודה זמינים במאמר העזרה של
action.devices.traits.TemperatureSetting
.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "heat" } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "thermostatMode": "heat", "thermostatTemperatureSetpoint": 30, "thermostatTemperatureAmbient": 25 } } ] } }