स्मार्ट होम स्प्रिंक्लर गाइड
action.devices.types.SPRINKLER
- स्प्रिंक्लर चालू और बंद कर सकते हैं या चालू और बंद कर सकते हैं. शायद इन ऐप्लिकेशन में टाइमर और/या शेड्यूल भी काम कर सकता है.
इस टाइप से पता चलता है कि डिवाइस को स्प्रिंक्लर आइकॉन और इससे जुड़े कुछ समानार्थी शब्द और उपनाम मिल चुके हैं.
डिवाइस की क्षमताएं
लागू करने के बारे में जानकारी के लिए, उससे जुड़े 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.SPRINKLER", "traits": [ "action.devices.traits.Timer", "action.devices.traits.StartStop" ], "name": { "name": "Simple sprinkler" }, "willReportState": true, "attributes": { "availableZones": [ "front", "back" ], "maxTimerLimitSec": 3600 }, "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, "isRunning": true, "activeZones": [ "front" ], "timerRemainingSec": 300 } } } }
EXECUTE के निर्देशों का उदाहरण
टाइमरस्टार्ट
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerStart", "params": { "timerTimeSec": 300 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300 } } ] } }
टाइमर में बदलाव करें
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerAdjust", "params": { "timerTimeSec": -10 } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 290 } } ] } }
टाइमर रोकें
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerPause" } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300, "timerPaused": true } } ] } }
टाइमर फिर से शुरू करें
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerResume" } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": 300, "timerPaused": false } } ] } }
टाइमर रद्द करें
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Timer
रेफ़रंस देखें.
{ "requestId": "6894439706274654526", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.TimerCancel" } ] } ] } } ] }
{ "requestId": "6894439706274654526", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "timerRemainingSec": -1 } } ] } }
शुरू करना बंद करें
कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.StartStop
रेफ़रंस देखें.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.StartStop", "params": { "start": true, "zone": "back" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "isRunning": true, "activeZones": [ "back" ] } } ] } }