स्मार्ट होम साउंडबार गाइड
action.devices.types.SOUNDBAR - यह एक ऑल-इन-वन ऑडियो डिवाइस है. इसका इस्तेमाल अक्सर टीवी के साथ किया जाता है. यह बार के आकार का होता है.
इस टाइप से पता चलता है कि डिवाइस को साउंडबार का आइकॉन और इससे जुड़े कुछ मिलते-जुलते शब्द और उपनाम मिलते हैं.
डिवाइस की क्षमताएं
इन्हें लागू करने के बारे में ज़्यादा जानकारी के लिए, इनसे जुड़ी खासियत के दस्तावेज़ देखें. जैसे, एट्रिब्यूट और स्थितियां जिनकी मदद से आपकी सेवा काम करती है. साथ ही, EXECUTE और QUERY के जवाब कैसे तैयार किए जाते हैं.
ज़रूरी खासियतें
अगर ये खासियतें और निर्देश आपके डिवाइस पर लागू होते हैं, तो इनका इस्तेमाल करना ज़रूरी है. अगर आपका डिवाइस इन खासियतों के साथ काम नहीं करता है, तो QUERY या EXECUTE के जवाब में, functionNotSupported का गड़बड़ी कोड डालें. ज़्यादा जानकारी के लिए,
गड़बड़ियां और अपवाद देखें.
-
action.devices.traits.MediaState -
action.devices.traits.OnOff -
action.devices.traits.TransportControl -
action.devices.traits.Volume
सुझाई गई खासियतें
अगर ये खासियतें आपके डिवाइस पर लागू होती हैं, तो इनका इस्तेमाल करने का सुझाव दिया जाता है. हालांकि, अपने मौजूदा प्रॉडक्ट की सुविधाओं के हिसाब से, उपलब्ध सभी खासियतों को मिलाकर इस्तेमाल किया जा सकता है.
डिवाइस का उदाहरण: सामान्य साउंडबार
इस सेक्शन में, डिवाइस के टाइप और ऊपर बताई गई खासियतों के आधार पर, सामान्य "साउंडबार" को दिखाने वाले इंटेंट पेलोड के उदाहरण दिए गए हैं. अगर आपने अपनी सेवा में कोई खासियत जोड़ी है या हटाई है, उन बदलावों को दिखाने के लिए, अपने जवाबों में बदलाव करें.
SYNC के जवाब का उदाहरण
{
"requestId": "6894439706274654512",
"inputs": [
{
"intent": "action.devices.SYNC"
}
]
}{ "requestId": "6894439706274654512", "payload": { "agentUserId": "user123", "devices": [ { "id": "123", "type": "action.devices.types.SOUNDBAR", "traits": [ "action.devices.traits.OnOff", "action.devices.traits.MediaState", "action.devices.traits.Volume", "action.devices.traits.TransportControl" ], "name": { "name": "Simple soundbar" }, "willReportState": true, "attributes": { "transportControlSupportedCommands": [ "NEXT", "PREVIOUS", "PAUSE", "STOP", "RESUME" ], "volumeMaxLevel": 11, "volumeCanMuteAndUnmute": true, "supportActivityState": true, "supportPlaybackState": 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, "currentVolume": 10, "isMuted": false, "activityState": "ACTIVE", "playbackState": "PAUSED" } } } }
EXECUTE कमांड के उदाहरण
OnOff
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.OnOff
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654516", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.OnOff", "params": { "on": true } } ] } ] } } ] }
{ "requestId": "6894439706274654516", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "on": true } } ] } }
म्यूट करें
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Volume
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654534", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mute", "params": { "mute": true } } ] } ] } } ] }
{ "requestId": "6894439706274654534", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentVolume": 10, "isMuted": true } } ] } }
setVolume
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.Volume
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654532", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.setVolume", "params": { "volumeLevel": 11 } } ] } ] } } ] }
{ "requestId": "6894439706274654532", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "currentVolume": 11, "isMuted": false } } ] } }
mediaClosedCaptioningOff
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654518", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaClosedCaptioningOff" } ] } ] } } ] }
{ "requestId": "6894439706274654518", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PLAYING" } } ] } }
mediaClosedCaptioningOn
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654520", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaClosedCaptioningOn", "params": { "closedCaptioningLanguage": "en" } } ] } ] } } ] }
{ "requestId": "6894439706274654520", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PLAYING" } } ] } }
mediaNext
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654522", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaNext" } ] } ] } } ] }
{ "requestId": "6894439706274654522", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "FAST_FORWARDING" } } ] } }
mediaPause
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654524", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaPause" } ] } ] } } ] }
{ "requestId": "6894439706274654524", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PAUSED" } } ] } }
mediaPrevious
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654526", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaPrevious" } ] } ] } } ] }
{ "requestId": "6894439706274654526", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "REWINDING" } } ] } }
mediaResume
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654528", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaResume" } ] } ] } } ] }
{ "requestId": "6894439706274654528", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "PLAYING" } } ] } }
mediaStop
कमांड के पैरामीटर के बारे में ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
के बारे में जानकारी देखें.
{ "requestId": "6894439706274654530", "inputs": [ { "intent": "action.devices.EXECUTE", "payload": { "commands": [ { "devices": [ { "id": "123" } ], "execution": [ { "command": "action.devices.commands.mediaStop" } ] } ] } } ] }
{ "requestId": "6894439706274654530", "payload": { "commands": [ { "ids": [ "123" ], "status": "SUCCESS", "states": { "online": true, "playbackState": "STOPPED" } } ] } }