स्मार्ट होम मीडिया रिमोट गाइड

action.devices.types.REMOTECONTROL - मीडिया डिवाइस को कंट्रोल करने के लिए, मीडिया रिमोट का इस्तेमाल किया जाता है. इस तरह के डिवाइस के उदाहरणों में हब, यूनिवर्सल रिमोट, और मीडिया कंट्रोलर शामिल हैं.

इस टाइप से पता चलता है कि डिवाइस को 'मीडिया रिमोट' का आइकॉन और इससे जुड़े कुछ समानार्थी शब्द और उपनाम मिले हैं.

डिवाइस की काबिलियत

लागू करने से जुड़ी जानकारी के लिए, उससे जुड़े एट्रिब्यूट देखें. जैसे, एट्रिब्यूट और स्थितियां, जिन्हें आपकी सेवा को इस्तेमाल करने की अनुमति देनी चाहिए. साथ ही, EXECUTE और QUERY रिस्पॉन्स बनाने का तरीका भी बताएं.

ज़रूरी बातें

अगर ये सुविधाएं और निर्देश आपके डिवाइस पर लागू होते हैं, तो ये सुविधाएं और निर्देश ज़रूरी हैं. अगर आपके डिवाइस में इन एट्रिब्यूट के लिए सहायता उपलब्ध नहीं है, तो QUERY या EXECUTE के जवाब में functionNotSupported का गड़बड़ी कोड डालें. ज़्यादा जानकारी के लिए, गड़बड़ियां और अपवाद देखें.

विशेषता निर्देश
action.devices.traits.AppSelector
  • action.devices.commands.appSelect
action.devices.traits.InputSelector
  • action.devices.commands.setInput
action.devices.traits.MediaState
  • लागू नहीं
action.devices.traits.OnOff
  • action.devices.commands.OnOff
action.devices.traits.TransportControl
  • action.devices.commands.mediaClosedCaptioningOff
  • action.devices.commands.mediaClosedCaptioningOn
  • action.devices.commands.mediaNext
  • action.devices.commands.mediaPause
  • action.devices.commands.mediaPrevious
  • action.devices.commands.mediaResume
  • action.devices.commands.mediaStop
action.devices.traits.Volume
  • action.devices.commands.mute
  • action.devices.commands.setVolume

अगर ये विशेषताएं आपके डिवाइस पर लागू होती हैं, तो उनका सुझाव दिया जाता है. हालांकि, आपके पास प्रॉडक्ट की सभी उपलब्ध सुविधाओं को मिलाने और उनसे मिलान करने का विकल्प है. हालांकि, इसके लिए ज़रूरी है कि वे आपकी मौजूदा प्रॉडक्ट सुविधाओं से पूरी तरह मेल खाते हों.

क्वालिटी के लिए ज़रूरी शर्तें

  • इंतज़ार का समय: 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"
        }
      }
    ]
  }
}

NextInput

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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
        }
      }
    ]
  }
}

MediaClosedCingबंद है

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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"
        }
      }
    ]
  }
}

MediaClosedCingOn

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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"
        }
      }
    ]
  }
}

mediaNext

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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"
        }
      }
    ]
  }
}

MediaPause

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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"
        }
      }
    ]
  }
}

MediaResume

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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"
        }
      }
    ]
  }
}

MediaStop

कमांड पैरामीटर के बारे में ज़्यादा जानने के लिए, 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
        }
      }
    ]
  }
}

डिवाइस में गड़बड़ी

गड़बड़ियों और अपवादों की पूरी सूची देखें.