স্মার্ট হোম ফসেট গাইড
action.devices.types.FAUCET - কল বিভিন্ন পরিমাণে এবং প্রিসেটে তরল সরবরাহ করতে পারে। কলের বিভিন্ন মোড থাকতে পারে এবং প্রতিটি মোডের নিজস্ব সেটিংস থাকে। এগুলি কলের জন্য নির্দিষ্ট এবং একটি সাধারণ আকারে ব্যাখ্যা করা হয়।
এই প্রকারটি নির্দেশ করে যে ডিভাইসটি ফসেট আইকন এবং এর সাথে সম্পর্কিত কিছু সমার্থক শব্দ ও বিকল্প নাম পায়।
ডিভাইসের ক্ষমতা
বাস্তবায়নের বিশদ বিবরণের জন্য, যেমন আপনার পরিষেবাতে কোন অ্যাট্রিবিউট ও স্টেটগুলো সমর্থন করা উচিত এবং কীভাবে EXECUTE ও QUERY প্রতিক্রিয়া তৈরি করতে হয়, তার জন্য সংশ্লিষ্ট ট্রেইট ডকুমেন্টেশন দেখুন।
সুপারিশকৃত বৈশিষ্ট্য
আপনার ডিভাইসের জন্য প্রযোজ্য হলে এই বৈশিষ্ট্যগুলি সুপারিশ করা হয়। তবে, আপনার বিদ্যমান পণ্যের কার্যকারিতার সাথে সর্বোত্তমভাবে মেলানোর জন্য আপনি উপলব্ধ সমস্ত বৈশিষ্ট্য থেকে পছন্দমতো সমন্বয় করতে পারেন।
-
action.devices.traits.Dispense -
action.devices.traits.StartStop -
action.devices.traits.TemperatureControl
উদাহরণস্বরূপ যন্ত্র: সাধারণ কল
এই বিভাগে উপরে উল্লিখিত ডিভাইসের ধরন এবং বৈশিষ্ট্যগুলির উপর ভিত্তি করে একটি সাধারণ "ফসেট"-এর প্রতিনিধিত্বকারী উদাহরণ ইন্টেন্ট পেলোড রয়েছে। আপনি যদি আপনার বাস্তবায়নে বৈশিষ্ট্য যোগ বা অপসারণ করেন, তবে সেই পরিবর্তনগুলি প্রতিফলিত করার জন্য আপনার প্রতিক্রিয়াগুলিও সেই অনুযায়ী পরিবর্তন করুন।
নমুনা SYNC প্রতিক্রিয়া
{
"requestId": "6894439706274654512",
"inputs": [
{
"intent": "action.devices.SYNC"
}
]
}{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.FAUCET", "traits": [ "action.devices.traits.Dispense", "action.devices.traits.TemperatureControl", "action.devices.traits.OnOff", "action.devices.traits.StartStop" ], "name": { "name": "Simple faucet" }, "willReportState": true, "attributes": { "supportedDispenseItems": [ { "item_name": "water_key", "item_name_synonyms": [ { "lang": "en", "synonyms": [ "Water" ] }, { "lang": "es", "synonyms": [ "Agua" ] }, { "lang": "fr", "synonyms": [ "Eau" ] } ], "supported_units": [ "TEASPOONS", "TABLESPOONS", "FLUID_OUNCES", "CUPS", "PINTS", "QUARTS", "GALLONS", "MILLILITERS", "LITERS", "DECILITERS" ], "default_portion": { "amount": 2, "unit": "CUPS" } } ], "supportedDispensePresets": [ { "preset_name": "cat_water_bowl_key", "preset_name_synonyms": [ { "lang": "en", "synonyms": [ "Cat water bowl", "Cat water dish", "Cat water cup" ] }, { "lang": "es", "synonyms": [ "Plato de agua para gato", "Bebedero para gato" ] }, { "lang": "fr", "synonyms": [ "Bol d'eau de chat", "Bac \u00e0 eau pour chat", "Tasse d'eau de chat" ] } ] } ], "temperatureRange": { "minThresholdCelsius": 25, "maxThresholdCelsius": 100 }, "temperatureUnitForUX": "F" }, "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": false, "temperatureSetpointCelsius": 30, "isRunning": true, "isPaused": false, "dispenseItems": [ { "itemName": "water_key", "amountLastDispensed": { "amount": 2.5, "unit": "CUPS" }, "isCurrentlyDispensing": false } ] } } } }
নমুনা EXECUTE কমান্ড
বিতরণ করুন
কমান্ড প্যারামিটার সম্পর্কে অতিরিক্ত বিবরণের জন্য, action.devices.traits.Dispense রেফারেন্সটি দেখুন।
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.Dispense", "params": { "amount": 1, "unit": "CUPS", "item": "water_key" } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "PENDING", "states": { "online": true, "dispenseItems": [ { "itemName": "water_key", "amountLastDispensed": { "amount": 1, "unit": "CUPS" }, "isCurrentlyDispensing": true } ] } } ] } }
তাপমাত্রা সেট করুন
কমান্ড প্যারামিটার সম্পর্কে অতিরিক্ত বিবরণের জন্য, action.devices.traits.TemperatureControl রেফারেন্সটি দেখুন।
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.SetTemperature", "params": { "temperature": 65 } } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "temperatureSetpointCelsius": 65 } } ] } }
চালু/বন্ধ
কমান্ড প্যারামিটার সম্পর্কে অতিরিক্ত বিবরণের জন্য, 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 } } ] } }
স্টার্টস্টপ
কমান্ড প্যারামিটার সম্পর্কে অতিরিক্ত বিবরণের জন্য, 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 } } ] } }
বিরতি দিন বিরতিমুক্ত করুন
কমান্ড প্যারামিটার সম্পর্কে অতিরিক্ত বিবরণের জন্য, 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 } } ] } }