Huawei TV Box API 一覧
- アプリケーション制御
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=startapp
-H "App-Name: [パッケージ名]"
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=app_control
-H "App: [アプリ名]"
-H "Type: [タイプ]"
-H "Info: [情報]"
curl -X GET http://[IPアドレス]:8080/huawei-remote?cmd=app_info
-H "App: [アプリ名]"
-H "Type: [タイプ]"
- キー入力
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=key_event
-H "Key-Code: [キーコード]"
-H "Action: [アクション番号]"
- マウス・タッチ操作
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=mouse_event
-H "X-Axis: [X座標]"
-H "Y-Axis: [Y座標]"
-H "Action: 2"
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=abs_mouse_event
-H "X-Abs-Axis: [X座標]"
-H "Y-Abs-Axis: [Y座標]"
-H "Action: [アクション番号]"
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=abs_mouse_event
-H "X-Abs-Axis1: [X1座標]"
-H "Y-Abs-Axis1: [Y1座標]"
-H "X-Abs-Axis2: [X2座標]"
-H "Y-Abs-Axis2: [Y2座標]"
-H "Action: [アクション番号]"
- テキスト入力
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=text_event
-H "Input-Mode: [入力モード]"
-H "Content-Type: text/parameters"
-d "[テキスト内容]"
curl -X GET http://[IPアドレス]:8080/huawei-remote?cmd=text
- 音量制御
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=volume
-H "Volume: [音量レベル]"
curl -X GET http://[IPアドレス]:8080/huawei-remote?cmd=volume
- システム機能
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=heartbeat
-H "Live-Time: [時間]"
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=reverse_channel
-H "Ip: [IPアドレス]"
-H "Port: [ポート番号]"
curl -X POST http://[IPアドレス]:8080/huawei-remote?cmd=monitor_system_info
- APKインストール
curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: [ステージ]"
-d "[APKファイルデータ]"
- begin - APKファイル転送の開始
- middle - APKファイル転送の途中(複数回に分けて送信する場合)
- end - APKファイル転送の終了
- full - 一度に全APKファイルを送信
使用例:
curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: full"
-H "Content-Length: [ファイルサイズ]"
--data-binary @app.apk
curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: begin"
-H "Content-Length: [チャンクサイズ]"
--data-binary @chunk1
curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: middle"
-H "Content-Length: [チャンクサイズ]"
--data-binary @chunk2
curl -X PUT http://[IPアドレス]:8080/huawei-remote?cmd=apk_install
-H "Stage: end"
-H "Content-Length: [チャンクサイズ]"
--data-binary @chunk3