स्मार्ट होम कुकटॉप गाइड
action.devices.types.COOKTOP
- कुकटॉप को चालू और बंद करने, चालू और बंद करने, टाइमर सेट करने, कुकिंग मोड और फ़ूड प्रीसेट में बदलाव करने, और नॉन-कुकिंग मोड से जुड़ी अलग-अलग सेटिंग में बदलाव करने जैसी कार्रवाइयां हो सकती हैं.
इस टाइप से पता चलता है कि डिवाइस को Cooktop आइकॉन और इससे जुड़े कुछ समानार्थी शब्द और उपनाम मिल चुके हैं.
डिवाइस की क्षमताएं
लागू करने के बारे में जानकारी के लिए, Trait से जुड़ा दस्तावेज़ देखें. जैसे, एट्रिब्यूट और यह जानकारी कि आपकी सेवा के साथ काम करना चाहिए. साथ ही, EXECUTE और QUERY रिस्पॉन्स बनाने का तरीका जानें.
ज़रूरी traits
अगर आपके डिवाइस पर लागू हो, तो ये विशेषताएं और निर्देश ज़रूरी हैं. अगर आपके डिवाइस में ये विशेषताएं काम नहीं करती हैं, तो QUERY या EXECUTE जवाब में
functionNotSupported
का गड़बड़ी कोड डालें. ज़्यादा जानकारी के लिए
गड़बड़ियां और अपवाद देखें.
सुझाए गए traits
अगर आपके डिवाइस पर लागू हो, तो इन विशेषताओं के इस्तेमाल का सुझाव दिया जाता है. हालांकि, अपने मौजूदा प्रॉडक्ट की सुविधाओं को अपने हिसाब से बनाने के लिए, आपको सभी उपलब्ध विशेषताओं को एक साथ मिलाने की सुविधा मिलती है.
क्वालिटी के लिए ज़रूरी शर्तें
- इंतज़ार का समय: 800 मि॰से॰ या उससे कम होना चाहिए.
- भरोसेमंद: 97% से ज़्यादा या इसके बराबर होना चाहिए.
डिवाइस का उदाहरण: आसान कुकटॉप
इस सेक्शन में, आम तौर पर इस्तेमाल होने वाले "कुकटॉप" को दिखाने वाले इंटेंट पेलोड के उदाहरण शामिल हैं. ये डिवाइस के टाइप और ऊपर बताई गई विशेषताओं के आधार पर दिखाए जाते हैं. अगर लागू करने की प्रक्रिया में कोई एट्रिब्यूट जोड़ा या हटाया जाता है, तो उन बदलावों को दिखाने के लिए अपने जवाबों में उसके हिसाब से बदलाव करें.
सिंक के जवाब का नमूना
{ "requestId": "6894439706274654512", "inputs": [ { "intent": "action.devices.SYNC" } ] }
{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.COOKTOP", "traits": [ "action.devices.traits.Cook", "action.devices.traits.StartStop", "action.devices.traits.Timer", "action.devices.traits.OnOff" ], "name": { "name": "Simple cooktop" }, "willReportState": true, "attributes": { "supportedCookingModes": [ "COOK", "BOIL", "SAUTE" ], "foodPresets": [ { "food_preset_name": "chicken_key", "supported_units": [ "POUNDS", "OUNCES" ], "food_synonyms": [ { "synonym": [ "Chicken", "Chicken breast", "Chicken thigh" ], "lang": "en" } ] }, { "food_preset_name": "bacon_key", "supported_units": [ "POUNDS", "OUNCES" ], "food_synonyms": [ { "synonym": [ "Bacon", "Bacon strips" ], "lang": "en" } ] } ], "maxTimerLimitSec": 1200, "pausable": true }, "deviceInfo": { "manufacturer": "smart-home-inc", "model": "hs1234", "hwVersion": "3.2", "swVersion": "11.4" } } ] } }
क्वेरी के जवाब का उदाहरण
{ "requestId": "6894439706274654514", "inputs": [ { "intent": "action.devices.QUERY", "payload": { "devices": [ { "id": "123" } ] } } ] }
{ "requestId": "6894439706274654514", "payload": { "devices": { "123": { "status": "SUCCESS", "online": true, "on": true, "isRunning": true, "isPaused": false, "timerRemainingSec": 120, "currentCookingMode": "COOK", "currentFoodPreset": "chicken_key" } } } }
EXECUTE के निर्देशों के उदाहरण
खाना बनाएँ
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Cook
रेफ़रंस देखें.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.Cook", "params": { "start": true, "cookingMode": "BOIL" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentCookingMode": "BOIL", "currentFoodPreset": "NONE" } } ] } }
StartStop
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.StartStop
रेफ़रंस देखें.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.StartStop", "params": { "start": true } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isRunning": true, "isPaused": false } } ] } }
TimerStart
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerStart", "params": { "timerTimeSec": 300 } } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300 } } ] } }
TimerAdjust
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerAdjust", "params": { "timerTimeSec": -10 } } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 110 } } ] } }
TimerPause
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654526", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerPause" } ] } ] } } ] }
{ "requestId": "6894439706274654526", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 120, "timerPaused": true } } ] } }
TimerResume
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654528", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerResume" } ] } ] } } ] }
{ "requestId": "6894439706274654528", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 120, "timerPaused": false } } ] } }
TimerCancel
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654530", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerCancel" } ] } ] } } ] }
{ "requestId": "6894439706274654530", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": -1 } } ] } }
OnOff
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.OnOff
रेफ़रंस देखें.
{ "requestId": "6894439706274654532", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654532", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }