स्मार्ट होम टेलिविज़न गाइड

action.devices.types.TV - टेलिविज़न डिवाइस में ट्यूनर, डिसप्ले, और लाउडस्पीकर की सुविधा होती है. इनकी मदद से, मीडिया देखने और सुनने में आसानी होती है. उदाहरण के लिए, स्मार्ट टीवी डिवाइस.

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

डिवाइस की क्षमताएं

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

ज़रूरी traits

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

Trait निर्देश
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% से ज़्यादा या इसके बराबर होना चाहिए.

डिवाइस का उदाहरण: सिंपल टीवी

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

सिंक के जवाब का नमूना

अनुरोध करें
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.TV",
        "traits": [
          "action.devices.traits.Channel",
          "action.devices.traits.InputSelector",
          "action.devices.traits.AppSelector",
          "action.devices.traits.MediaState",
          "action.devices.traits.OnOff",
          "action.devices.traits.TransportControl",
          "action.devices.traits.Volume"
        ],
        "name": {
          "name": "Simple TV"
        },
        "willReportState": true,
        "attributes": {
          "transportControlSupportedCommands": [
            "NEXT",
            "PREVIOUS",
            "PAUSE",
            "STOP",
            "RESUME",
            "CAPTION_CONTROL"
          ],
          "availableApplications": [
            {
              "key": "youtube",
              "names": [
                {
                  "name_synonym": [
                    "Youtube",
                    "Youtube_en"
                  ],
                  "lang": "en"
                }
              ]
            }
          ],
          "availableInputs": [
            {
              "key": "hdmi_1",
              "names": [
                {
                  "name_synonym": [
                    "HDMI 1",
                    "DVD player"
                  ],
                  "lang": "en"
                }
              ]
            },
            {
              "key": "hdmi_2",
              "names": [
                {
                  "name_synonym": [
                    "HDMI 2",
                    "TV"
                  ],
                  "lang": "en"
                }
              ]
            }
          ],
          "availableChannels": [
            {
              "key": "ktvu2",
              "names": [
                "Fox",
                "KTVU"
              ],
              "number": "2"
            },
            {
              "key": "abc1",
              "names": [
                "ABC",
                "ABC East"
              ],
              "number": "702.4-11"
            }
          ],
          "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"
        }
      }
    ]
  }
}

क्वेरी के जवाब का उदाहरण

अनुरोध करें
{
  "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 के निर्देशों के उदाहरण

selectChannel

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Channel रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654516",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.selectChannel",
                "params": {
                  "channelCode": "ktvu2"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654516",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true
        }
      }
    ]
  }
}

relativeChannel

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Channel रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654518",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.relativeChannel",
                "params": {
                  "relativeChannelChange": 1
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654518",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true
        }
      }
    ]
  }
}

returnChannel

कमांड पैरामीटर के बारे में ज़्यादा जानकारी के लिए, action.devices.traits.Channel रेफ़रंस देखें.

अनुरोध करें
{
  "requestId": "6894439706274654520",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.returnChannel"
              }
            ]
          }
        ]
      }
    }
  ]
}
जवाब
{
  "requestId": "6894439706274654520",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true
        }
      }
    ]
  }
}

SetInput

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

PreviousInput

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

appInstall

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

appSearch

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

appSelect

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

OnOff

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

mediaClosedCaptioningOff

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

mediaClosedCaptioningOn

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

mediaPrevious

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

setVolume

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

डिवाइस ERRORS

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