action.devices.types.REMOTECONTROL
- मीडिया रिमोट का इस्तेमाल मीडिया डिवाइसों को कंट्रोल करने के लिए किया जाता है. इस तरह के डिवाइस के उदाहरणों में हब, यूनिवर्सल रिमोट, और मीडिया कंट्रोलर शामिल हैं.
यह तरीका बताता है कि डिवाइस को मीडिया रिमोट आइकॉन के साथ-साथ कुछ और समानार्थी शब्द और उपनाम भी मिलते हैं.
डिवाइस की क्षमताएं
लागू करने से जुड़ी विशेषताओं के दस्तावेज़ देखें, जैसे कि
एट्रिब्यूट और स्थितियां जिनमें आपकी सेवा को काम करना चाहिए और EXECUTE और QUERY रिस्पॉन्स बनाने का तरीका भी देखें.
ज़रूरी विशेषताएं
अगर ये एट्रिब्यूट और निर्देश आपके डिवाइस पर लागू होते हैं, तो वे ज़रूरी हैं.
ध्यान दें: मीडिया सेवा के लिए, आपकी सेवा को रिपोर्ट की स्थिति के ज़रिए, activityState
और playbackState
का स्टेटस Google को भेजना होगा.
सुझाए गए लक्षण
अगर ये एट्रिब्यूट डिवाइस पर लागू होते हैं, तो इनका सुझाव दिया जाता है.
हालांकि, आप अपने प्रॉडक्ट की मौजूदा सुविधाओं के हिसाब से, काम करने के लिए मौजूद सभी एट्रिब्यूट को मिलाकर उनका मिलान कर सकते हैं.
क्वालिटी के लिए ज़रूरी शर्तें
इंतज़ार का समय: 3,000 मि॰से॰ से कम या उसके बराबर होना चाहिए.
विश्वसनीयता: 97% से ज़्यादा या उसके बराबर होना चाहिए.
इस सेक्शन में, उदाहरण के तौर पर ऐसे इंटेंट पेलोड शामिल हैं जो ऊपर दिए गए डिवाइस टाइप और विशेषताओं के आधार पर, एक सामान्य "मीडिया रिमोट" का प्रतिनिधित्व करते हैं. अगर लागू करने की प्रक्रिया में विशेषताओं को जोड़ा या हटाया जाता है,
तो उसी हिसाब से अपने जवाबों में बदलाव करें.
SYNC जवाब का नमूना
{
"requestId": "6894439706274654512",
"inputs": [
{
"intent": "action.devices.SYNC"
}
]
}
{
"requestId": "6894439706274654512",
"payload": {
"agentUserId": "user123",
"devices": [
{
"id": "123",
"type": "action.devices.types.REMOTECONTROL",
"traits": [
"action.devices.traits.Channel",
"action.devices.traits.AppSelector",
"action.devices.traits.InputSelector",
"action.devices.traits.MediaState",
"action.devices.traits.OnOff",
"action.devices.traits.TransportControl",
"action.devices.traits.Volume"
],
"name": {
"name": "Simple media remote"
},
"willReportState": true,
"attributes": {
"transportControlSupportedCommands": [
"NEXT",
"PREVIOUS",
"PAUSE",
"STOP",
"RESUME",
"CAPTION_CONTROL"
],
"availableApplications": [
{
"key": "youtube",
"names": [
{
"name_synonym": [
"Youtube",
"Youtube_en"
],
"lang": "en"
}
]
}
],
"availableChannels": [
{
"key": "ktvu2",
"names": [
"Fox",
"KTVU"
],
"number": "2"
},
{
"key": "abc1",
"names": [
"ABC",
"ABC East"
],
"number": "702.4-11"
}
],
"availableInputs": [
{
"key": "hdmi_1",
"names": [
{
"name_synonym": [
"HDMI 1",
"DVD Player"
],
"lang": "en"
}
]
},
{
"key": "hdmi_2",
"names": [
{
"name_synonym": [
"HDMI 2",
"TV"
],
"lang": "en"
}
]
}
],
"orderedInputs": false,
"volumeMaxLevel": 11,
"volumeCanMuteAndUnmute": true,
"volumeDefaultPercentage": 6,
"levelStepSize": 2,
"commandOnlyVolume": false,
"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,
"currentApplication": "youtube",
"currentInput": "hdmi_1",
"currentVolume": 10,
"isMuted": false,
"activityState": "ACTIVE",
"playbackState": "PAUSED"
}
}
}
}
EXECUTE निर्देशों का नमूना
ऐप्लिकेशन इंस्टॉल
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.AppSelector
रेफ़रंस देखें.
{
"requestId": "6894439706274654522",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.appInstall",
"params": {
"newApplication": "youtube"
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654522",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentApplication": "youtube"
}
}
]
}
}
ऐप्लिकेशन खोज
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.AppSelector
रेफ़रंस देखें.
{
"requestId": "6894439706274654524",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.appSearch",
"params": {
"newApplication": "youtube"
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654524",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentApplication": "youtube"
}
}
]
}
}
ऐप्लिकेशन चुनें
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.AppSelector
रेफ़रंस देखें.
{
"requestId": "6894439706274654526",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.appSelect",
"params": {
"newApplication": "youtube"
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654526",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentApplication": "youtube"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.InputSelector
रेफ़रंस देखें.
{
"requestId": "6894439706274654528",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.SetInput",
"params": {
"newInput": "hdmi_2"
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654528",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentInput": "hdmi_2"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.InputSelector
रेफ़रंस देखें.
{
"requestId": "6894439706274654532",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.PreviousInput"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654532",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentInput": "hdmi_2"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.InputSelector
रेफ़रंस देखें.
{
"requestId": "6894439706274654530",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.NextInput"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654530",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentInput": "hdmi_2"
}
}
]
}
}
बंद है
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.OnOff
रेफ़रंस देखें.
{
"requestId": "6894439706274654534",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.OnOff",
"params": {
"on": true
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654534",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"on": true
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654536",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaClosedCaptioningOff"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654536",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "PLAYING"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654538",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaClosedCaptioningOn",
"params": {
"closedCaptioningLanguage": "en"
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654538",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "PLAYING"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654540",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaNext"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654540",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "FAST_FORWARDING"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654542",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaPause"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654542",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "PAUSED"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654544",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaPrevious"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654544",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "REWINDING"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654546",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaResume"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654546",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "PLAYING"
}
}
]
}
}
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.TransportControl
रेफ़रंस देखें.
{
"requestId": "6894439706274654548",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mediaStop"
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654548",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"playbackState": "STOPPED"
}
}
]
}
}
म्यूट करें
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.Volume
रेफ़रंस देखें.
{
"requestId": "6894439706274654552",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.mute",
"params": {
"mute": true
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654552",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentVolume": 10,
"isMuted": true
}
}
]
}
}
सेट वॉल्यूम
कमांड पैरामीटर से जुड़ी ज़्यादा जानकारी के लिए,
action.devices.traits.Volume
रेफ़रंस देखें.
{
"requestId": "6894439706274654550",
"inputs": [
{
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "123"
}
],
"execution": [
{
"command": "action.devices.commands.setVolume",
"params": {
"volumeLevel": 11
}
}
]
}
]
}
}
]
}
{
"requestId": "6894439706274654550",
"payload": {
"commands": [
{
"ids": [
"123"
],
"status": "SUCCESS",
"states": {
"online": true,
"currentVolume": 11,
"isMuted": false
}
}
]
}
}
डिवाइस की गड़बड़ियां
गड़बड़ियों और अपवादों की पूरी सूची देखें.