Tv - masaru-takano/DeviceConnect-Spec GitHub Wiki

概要

スマートデバイスが持つTV機器を操作する機能を提供するAPI。
※TV:television

目次

API 概要
GET /gotapi/tv スマートデバイスの電源状態を取得する。
PUT /gotapi/tv スマートデバイスの電源をオンにする。
DELETE /gotapi/tv スマートデバイスの電源をオフにする。
PUT /gotapi/tv/broadcastWave スマートデバイスの選択放送波を変更する。
PUT /gotapi/tv/channel スマートデバイスのチャンネルを変更する。
GET /gotapi/tv/enlProperty スマートデバイスがサポートしているECHONET Lite 機器オブジェクトプロパティの設定内容を取得する(必須プロパティのみ)。
PUT /gotapi/tv/enlProperty スマートデバイスがサポートしているECHONET Lite 機器オブジェクトプロパティに設定を行う(必須プロパティのみ)。
PUT /gotapi/tv/mute スマートデバイスのミュートをオンにする。
DELETE /gotapi/tv/mute スマートデバイスのミュートをオフにする。
PUT /gotapi/tv/volume スマートデバイスの音量を変更する。

種別

one-shot

概要

スマートデバイスの電源状態を取得する。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。
powerstatus string Yes 電源状態
ON:電源オン
OFF:電源オフ
UNKNOWN:不明

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスの電源をオンにする。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスの電源をオフにする。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスの選択放送波を変更する。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス
select string Yes 放送波選択。
DTV : 地上波デジタル放送
BS : BS放送波
CS : CS放送波

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスのチャンネルを変更する。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス
tuning string No 選局。1〜12:チャンネル番号
control string No 操作。
next : 次局選局
previous : 前局選局

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスがサポートしているECHONET Lite 機器オブジェクトプロパティの設定内容を取得する(必須プロパティのみ)。

※enlproperty:ECHONET Lite Propertyのこと。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス
epc array(string) No 取得プロパティのEPC。取得するプロパティのEPCをカンマ区切りで列挙。

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
properties array(object) Yes EPCのリスト
指定されたEPCの配列。
epc string Yes ECHONET Property Code
ECHONET Property Code
value string Yes ECHONET Property Codeの設定値。
ECHONET Property Codeの設定値。
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0",
  "properties" : [ {
    "epc" : "OperationStatus",
    "value" : "49"
  }, {
    "epc" : "InstallationLocation",
    "value" : "0"
  } ]
}

種別

one-shot

概要

スマートデバイスがサポートしているECHONET Lite 機器オブジェクトプロパティに設定を行う(必須プロパティのみ)。

※enlproperty:ECHONET Lite Propertyのこと。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス
epc string Yes EPC。
ECHONET Property Code
value string Yes EPCの設定値。

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0",
  "epc" : "OperationStatus",
  "value" : "49"
}

種別

one-shot

概要

スマートデバイスのミュートをオンにする。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスのミュートをオフにする。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}

種別

one-shot

概要

スマートデバイスの音量を変更する。

リクエスト

物理名 データ型 必須 説明
serviceId string Yes サービスID。取得対象スマートデバイス
control string Yes 操作。
up : ボリュームを上げる
down : ボリュームを下げる

レスポンス

物理名 データ型 必須 説明
result integer Yes 処理結果
0: 正常応答
0以外: 異常応答
product string Yes DeviceConnectシステムの名前
version string Yes DeviceConnectシステムのバージョン名
hmac string No レスポンスに対する署名
アプリケーション側から事前にHMACキーを共有されていた場合は必須。

レスポンスサンプル

{
  "result" : 0,
  "product" : "Example System",
  "version" : "1.0.0"
}
⚠️ **GitHub.com Fallback** ⚠️