Akıllı Ev Medya Uzaktan Kumandası Rehberi

action.devices.types.REMOTECONTROL: Medya uzaktan kumandaları, medya cihazlarını kontrol etmek için kullanılır. Bu cihaz türüne örnek olarak hub'lar, evrensel uzaktan kumandalar ve medya denetleyicileri verilebilir.

Bu tür, cihazın Medya Uzaktan Kumandası simgesini ve ilgili bazı eş anlamlıları ve takma adları aldığını belirtir.

Cihaz özellikleri

Hizmetinizin desteklemesi gereken özellikler ve durumlar ile EXECUTE ve QUERY yanıtlarının nasıl oluşturulacağı gibi uygulama ayrıntıları için ilgili özellik belgelerine bakın.

Gerekli özellikler

Bu özellikler ve komutlar, cihazınız için geçerliyse gereklidir. Cihazınız bu özellikleri desteklemiyorsa bir QUERY veya EXECUTE yanıtına functionNotSupported hata kodunu girin. Daha fazla bilgi için Hatalar ve istisnalar bölümüne bakın.

Özellik Komutlar
action.devices.traits.AppSelector
  • action.devices.commands.appSelect
action.devices.traits.InputSelector
  • action.devices.commands.setInput
action.devices.traits.MediaState
  • Yok
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

Cihazınız için geçerliyse bu özellikler önerilir. Bununla birlikte, mevcut ürün işlevselliğinize en iyi şekilde uyması için mevcut tüm özellikleri bir arada kullanabilirsiniz.

Kalite gereksinimleri

  • Gecikme: En fazla 3000 ms olmalıdır.
  • Güvenilirlik: En az %97 olmalıdır.

Örnek cihaz: Basit medya uzaktan kumandası

Bu bölümde, cihaz türüne ve yukarıdaki özelliklere göre ortak bir "Medya Uzaktan Kumandası"nı temsil eden örnek amaç yükleri yer alır. Uygulamanızda özellik ekler veya kaldırırsanız yanıtlarınızı bu değişiklikleri yansıtacak şekilde değiştirin.

Örnek Senkronizasyon yanıtı

İstek
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
Yanıt
{
  "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"
        }
      }
    ]
  }
}

Örnek QUERY yanıtı

İstek
{
  "requestId": "6894439706274654514",
  "inputs": [
    {
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [
          {
            "id": "123"
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654514",
  "payload": {
    "devices": {
      "123": {
        "status": "SUCCESS",
        "online": true,
        "on": true,
        "currentApplication": "youtube",
        "currentInput": "hdmi_1",
        "currentVolume": 10,
        "isMuted": false,
        "activityState": "ACTIVE",
        "playbackState": "PAUSED"
      }
    }
  }
}

Örnek EXECUTE komutları

appInstall

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.AppSelector referansına bakın.

İstek
{
  "requestId": "6894439706274654522",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.appInstall",
                "params": {
                  "newApplication": "youtube"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654522",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentApplication": "youtube"
        }
      }
    ]
  }
}

appSearch

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.AppSelector referansına bakın.

İstek
{
  "requestId": "6894439706274654524",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.appSearch",
                "params": {
                  "newApplication": "youtube"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654524",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentApplication": "youtube"
        }
      }
    ]
  }
}

appSelect

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.AppSelector referansına bakın.

İstek
{
  "requestId": "6894439706274654526",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.appSelect",
                "params": {
                  "newApplication": "youtube"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654526",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentApplication": "youtube"
        }
      }
    ]
  }
}

SetInput

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.InputSelector referansına bakın.

İstek
{
  "requestId": "6894439706274654528",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.SetInput",
                "params": {
                  "newInput": "hdmi_2"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654528",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentInput": "hdmi_2"
        }
      }
    ]
  }
}

PreviousInput

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.InputSelector referansına bakın.

İstek
{
  "requestId": "6894439706274654532",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.PreviousInput"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654532",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentInput": "hdmi_2"
        }
      }
    ]
  }
}

NextInput

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.InputSelector referansına bakın.

İstek
{
  "requestId": "6894439706274654530",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.NextInput"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654530",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentInput": "hdmi_2"
        }
      }
    ]
  }
}

OnOff

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.OnOff referansına bakın.

İstek
{
  "requestId": "6894439706274654534",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.OnOff",
                "params": {
                  "on": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654534",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "on": true
        }
      }
    ]
  }
}

mediaClosedCaptioningOff

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654536",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaClosedCaptioningOff"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654536",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaClosedCaptioningOn

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654538",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaClosedCaptioningOn",
                "params": {
                  "closedCaptioningLanguage": "en"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654538",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaNext

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654540",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaNext"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654540",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "FAST_FORWARDING"
        }
      }
    ]
  }
}

mediaPause

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654542",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaPause"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654542",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PAUSED"
        }
      }
    ]
  }
}

mediaPrevious

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654544",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaPrevious"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654544",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "REWINDING"
        }
      }
    ]
  }
}

mediaResume

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654546",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaResume"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654546",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaStop

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.TransportControl referansına bakın.

İstek
{
  "requestId": "6894439706274654548",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaStop"
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654548",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "STOPPED"
        }
      }
    ]
  }
}

sesi kapat

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.Volume referansına bakın.

İstek
{
  "requestId": "6894439706274654552",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mute",
                "params": {
                  "mute": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654552",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentVolume": 10,
          "isMuted": true
        }
      }
    ]
  }
}

setVolume

Komut parametreleri hakkında daha ayrıntılı bilgi için action.devices.traits.Volume referansına bakın.

İstek
{
  "requestId": "6894439706274654550",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.setVolume",
                "params": {
                  "volumeLevel": 11
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
Yanıt
{
  "requestId": "6894439706274654550",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "currentVolume": 11,
          "isMuted": false
        }
      }
    ]
  }
}

Cihaz ERRORS

Hataların ve istisnaların tam listesini inceleyin.