스마트 홈 셋톱 박스 가이드

action.devices.types.SETTOP - 다중 채널 동영상 프로그래밍 유통업체 (MVPD) 및 셋톱 박스 기기와의 상호작용에는 미디어 재생 제어가 포함될 수 있습니다.

이 유형은 기기가 셋톱 박스 아이콘과 일부 관련 동의어와 별칭을 받는 것을 나타냅니다.

기기 기능

서비스에서 지원해야 하는 속성 및 상태, EXECUTE 및 QUERY 응답을 빌드하는 방법과 같은 구현 세부정보는 해당하는 trait 문서를 참고하세요.

필수 trait

기기에 적용되는 경우 이러한 특성과 명령어가 필요합니다. 기기가 이러한 특성을 지원하지 않으면 QUERY 또는 EXECUTE 응답에 functionNotSupported 오류 코드를 입력합니다. 자세한 내용은 오류 및 예외를 참고하세요.

특성 명령어
action.devices.traits.AppSelector
  • action.devices.commands.appSelect
action.devices.traits.InputSelector
  • action.devices.commands.setInput
action.devices.traits.MediaState
  • N/A
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

기기에 적용되는 경우 이러한 특성이 권장됩니다. 하지만 사용 가능한 모든 특성 중에서 기존 제품 기능에 가장 잘 맞는 특성을 자유롭게 조합해도 됩니다.

품질 요구사항

  • 지연 시간: 3000밀리초 이하여야 합니다.
  • 신뢰성: 97% 이상이어야 합니다.

예시 기기: 간단한 셋톱 박스

이 섹션에는 위의 기기 유형 및 특성에 따라 일반적인 '셋톱 박스'를 나타내는 인텐트 페이로드 예시가 포함되어 있습니다. 구현에 특성을 추가하거나 삭제하는 경우 이러한 변경사항을 반영하도록 응답을 적절하게 수정하세요.

샘플 SYNC 응답

요청
{
  "requestId": "6894439706274654512",
  "inputs": [
    {
      "intent": "action.devices.SYNC"
    }
  ]
}
응답
{
  "requestId": "6894439706274654512",
  "payload": {
    "agentUserId": "user123",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.SETTOP",
        "traits": [
          "action.devices.traits.OnOff",
          "action.devices.traits.AppSelector",
          "action.devices.traits.MediaState",
          "action.devices.traits.Channel",
          "action.devices.traits.TransportControl"
        ],
        "name": {
          "name": "Simple set-top box"
        },
        "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"
            }
          ],
          "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",
        "activityState": "ACTIVE",
        "playbackState": "PAUSED"
      }
    }
  }
}

샘플 EXECUTE 명령어

OnOff

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.OnOff 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654528",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.OnOff",
                "params": {
                  "on": true
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654528",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "on": true
        }
      }
    ]
  }
}

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"
        }
      }
    ]
  }
}

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
        }
      }
    ]
  }
}

mediaClosedCaptioningOff

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654530",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaClosedCaptioningOff"
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654530",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaClosedCaptioningOn

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654532",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaClosedCaptioningOn",
                "params": {
                  "closedCaptioningLanguage": "en"
                }
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654532",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaNext

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654534",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaNext"
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654534",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "FAST_FORWARDING"
        }
      }
    ]
  }
}

mediaPause

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654536",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaPause"
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654536",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PAUSED"
        }
      }
    ]
  }
}

mediaPrevious

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654538",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaPrevious"
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654538",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "REWINDING"
        }
      }
    ]
  }
}

mediaResume

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654540",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaResume"
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654540",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "PLAYING"
        }
      }
    ]
  }
}

mediaStop

명령어 매개변수에 관한 자세한 내용은 action.devices.traits.TransportControl 참조를 확인하세요.

요청
{
  "requestId": "6894439706274654542",
  "inputs": [
    {
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "123"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.mediaStop"
              }
            ]
          }
        ]
      }
    }
  ]
}
응답
{
  "requestId": "6894439706274654542",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "online": true,
          "playbackState": "STOPPED"
        }
      }
    ]
  }
}

기기 오류

오류 및 예외의 전체 목록을 참조하세요.