見出し画像

【無料公開】HyperDeckでリプレイヤーを自作する(①Telnet・FTP接続でEthernet制御)


まえがき

HyperDeckといえば、
Blackmagic Design社から販売されている収録・再生機。

今回はHyperDeckとラズパイを活用して、
HyperDeckリプレイヤーを作ろう!というお話です。

記事の一部は有料公開としております。

この記事を読んで分かること!!

  1. HyperDeckのEthernetコントロール(TelnetFTP)の紹介

  2. Telnetを用いた再生制御

  3. FTPを用いたデータ管理

  4. Node-redの活用法(telnet/http/ftp/flow変数等)


他にも、ラズパイ×ATEMの便利アイテム作ったりしてます。ぜひそちらもご覧ください。(こちらは全文無料です。)


HyperDeck、どうコントロールする?


HyperDeckにはいくつかコントロール方法があります。

  • 本体から直接操作

  • ATEM SoftewareControl

  • REMOTE端子からシリアルコントロール

  • Ethernet Protcolで制御

今回はこの中でも、ラズパイと相性の良い”Ethernet Protcol”で実装していきます!


Ethernet Protcol でのコントロールとは

名前の通り、Ethernet(LAN接続)で制御できる手法です。

HyperDeckでは、TCPポート9993番に接続することで簡単に遠隔操作が可能です。
Telnet等で接続できます。

詳細は、HyperDeckのマニュアルに記載があります。


Windows & TelnetでHyperDeckに接続・制御

まずは挙動を知るために、WindowsからTelnetで接続してみましょう。

Windows設定からTelnetクライアントを有効にする

コントロールパネル > プログラム をクリック

赤線部 "プログラム"をクリック

Windowsの機能の有効化または無効化 をクリック

Windowsの機能の有効化または無効化

Telnet クライアント に☑ →"OK"

Telnet クライアント

暫く待つと、機能が有効化されます。

コマンドプロンプトからTelnet接続

Telnet <HyperDeck IP Address> 9993

Ex.)192.168.10.151HyperDeckに接続する場合

Telnet 192.168.10.151 9993

上記のコマンドを打ち込みむと、別ウィンドウが起動し接続が成功します。

制御コマンドを送る

何かコマンドを送ってみましょう
いくつか例を挙げます。詳しくはマニュアルをご確認ください。

扱えるコマンド一覧を表示する

commands

読み込んでいるメディア一覧を表示

disk list

再生

play

停止

stop

収録開始

record

収録データの情報取得

clips get

再起動

reboot


実際にコマンドを送った様子

コマンドが正しいと、基本的には"200 ok"と返ってきます。


箸休め

これ以降の記事では、下記の内容を記載しております。

  • Node-redでtelnet接続出来るようにする

  • ラズパイからHyperDeckに対してplay・record・stopを遠隔操作出来るようにする

  • 上記のサンプルプログラム配布

  • (おまけ)FTP接続で収録ファイルを自動ダウンロード


次の記事は別記事として投稿予定です。

②:HyperDeckで任意速度のスロー再生
③:HyperDeckの必要なクリップだけをCLIP LISTに登録
④:IN点・OUT点を任意に決め、その区間だけCLIP LISTに登録
⑤:HyperDeckを2台用い、再生中も収録を継続する

全5記事前後で制作予定です。
尚、こちらのプログラムに改良を加えたリプレイシステムは販売を予定しております。
デモ機貸し出しも致します。お気軽に御御相談ください。


ラズパイ & Node-Red & Telnetで制御

いよいよ本題です。
Node-redを用いて同様に制御システムを考えていきます。
Node-redのインストール・初期設定は過去記事をご参照ください。

Telnet用のノードを追加

WindowsでTelnet接続出来たということは、ラズパイでも出来るはずです。まずはラズパイ&Node-redでTelnet接続できるように準備します。

こちらのノードを利用します。
パレット管理から追加するか、コマンドラインで下記を実行させます。

npm install node-red-contrib-telnet-client

このノードをインストールすると、下記の4つが利用可能になります。

telnet ノード

今回使用するのは"telnet-send"&"telnet-read"です。

ノードは下記のように設定してください。

新規に追加を選ぶ

鉛筆マークを選択

Addoress:接続HyperDeckのアドレス
Port:9993に設定

IP Address / Port 設定

Injectノードはこのように設定

全体としてこのように接続する

サンプルファイル(JSON形式)

下記をコピーし、Node-redに読み込むと、
192.168.10.151 のHyperDeckに接続出来ます。

[{"id":"5822b3fb37e13c70","type":"telnet-send","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":4070,"y":5080,"wires":[]},{"id":"96fc5ca872dae632","type":"telnet-read","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":4070,"y":5120,"wires":[["5ff41f56621a342d"]]},{"id":"5ff41f56621a342d","type":"debug","z":"17f45488e967e63c","name":"debug 126","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":4210,"y":5120,"wires":[]},{"id":"6d9ce4ec1969d210","type":"inject","z":"17f45488e967e63c","name":"play","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"play","payloadType":"str","x":3930,"y":5080,"wires":[["5822b3fb37e13c70"]]},{"id":"63cc04d0894849b9","type":"telnet-connection","name":"192.168.10.151:9993","address":"192.168.10.151","port":"9993","inDelimiter":"","outDelimiter":"","timeOut":"1500","clearOut":"","openTries":"1"}]


動かしてみる

上記サンプルプログラムでは、
msg.payload に"play"という文字列を代入し、
telnet接続先のHyperDeckに送信しました。

その結果、HyperDeckに準備された動画が再生されたかと思います。


他にも試してみましょう
下記は、play に加え、 stop・record を追加しています

[{"id":"3fde21ed145c03a5","type":"inject","z":"17f45488e967e63c","name":"stop","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"stop","payloadType":"str","x":3930,"y":5080,"wires":[["5822b3fb37e13c70"]]},{"id":"5822b3fb37e13c70","type":"telnet-send","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":4070,"y":5080,"wires":[]},{"id":"96fc5ca872dae632","type":"telnet-read","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":4070,"y":5120,"wires":[["5ff41f56621a342d"]]},{"id":"5ff41f56621a342d","type":"debug","z":"17f45488e967e63c","name":"debug 126","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":4210,"y":5120,"wires":[]},{"id":"f30c01decb89e11a","type":"inject","z":"17f45488e967e63c","name":"record","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"record","payloadType":"str","x":3930,"y":5040,"wires":[["5822b3fb37e13c70"]]},{"id":"6d9ce4ec1969d210","type":"inject","z":"17f45488e967e63c","name":"play","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"play","payloadType":"str","x":3930,"y":5000,"wires":[["5822b3fb37e13c70"]]},{"id":"63cc04d0894849b9","type":"telnet-connection","name":"192.168.10.151:9993","address":"192.168.10.151","port":"9993","inDelimiter":"","outDelimiter":"","timeOut":"1500","clearOut":"","openTries":"1"}]


更に下記は、
Spaceキー:再生・停止
Enterキー:収録開始
を行うサンプルコードです。
(必要に応じて、別途" node-red-node-pi-gpio"の追加が必要)

[{"id":"8d68f9f875953c87","type":"rpi-keyboard","z":"17f45488e967e63c","name":"","x":3670,"y":5240,"wires":[["5cdb8f25f720cff0"]]},{"id":"5cdb8f25f720cff0","type":"switch","z":"17f45488e967e63c","name":"UP/DOWN検知","property":"action","propertyType":"msg","rules":[{"t":"eq","v":"down","vt":"str"},{"t":"eq","v":"repeat","vt":"str"},{"t":"eq","v":"up","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":3840,"y":5240,"wires":[["613dcc01f98e3bd2"],[],[]]},{"id":"613dcc01f98e3bd2","type":"switch","z":"17f45488e967e63c","name":"キーコード検出","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"57","vt":"str"},{"t":"eq","v":"28","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":4020,"y":5240,"wires":[["f2cad371488bd97c"],["9464f9f39d457e35"]]},{"id":"f2cad371488bd97c","type":"function","z":"17f45488e967e63c","name":"play / stop","func":"var flag1 = flow.get(\"play_flag\")||0;\nvar flag2 = flow.get(\"rec_flag\")||0;\nif(flag1 == 1 || flag2 == 1){\n    msg.payload = \"stop\";\n    flow.set(\"play_flag\", 0);\n}else{\n    msg.payload = \"play\";\n    flow.set(\"play_flag\", 1);\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4190,"y":5220,"wires":[["8b0ab997df3b1028"]]},{"id":"9464f9f39d457e35","type":"function","z":"17f45488e967e63c","name":"record / stop","func":"var flag1 = flow.get(\"play_flag\")||0;\nvar flag2 = flow.get(\"rec_flag\")||0;\nif(flag2 == 1){\n    msg.payload = \"stop\";\n    flow.set(\"play_flag\", 0);\n}else{\n    msg.payload = \"record\";\n    flow.set(\"rec_flag\", 1);\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":4190,"y":5260,"wires":[["8b0ab997df3b1028"]]},{"id":"8b0ab997df3b1028","type":"telnet-send","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":4330,"y":5240,"wires":[]},{"id":"63cc04d0894849b9","type":"telnet-connection","name":"192.168.10.151:9993","address":"192.168.10.151","port":"9993","inDelimiter":"","outDelimiter":"","timeOut":"1500","clearOut":"","openTries":"1"}]


有料記事販売なので、少し面白いものも作ってみました。
WEB UIにコマンド画面ぽいものを表示できます。

[{"id":"17e2faf705f0c7cd","type":"http in","z":"17f45488e967e63c","name":"","url":"/HyperDeck-Ethernet-Control.html","method":"get","upload":false,"swaggerDoc":"","x":6770,"y":6100,"wires":[["6fe9a05666dcb5fc"]]},{"id":"75752da827c92b4b","type":"http response","z":"17f45488e967e63c","name":"","statusCode":"","headers":{},"x":7430,"y":6100,"wires":[]},{"id":"6fe9a05666dcb5fc","type":"function","z":"17f45488e967e63c","name":"HTML-A","func":"msg.payload = `\n<!DOCTYPE html>\n<html lang=\"ja\">\n\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>HyperDeck Ethernet Control</title>\n    <style>\n        body {\n            margin: 0;\n            background-color: #000000;\n        }\n\n        header {\n            background-color: #d3d3d3;\n            color: #000000;\n            font-size: 70px;\n            text-align: center;\n            padding: 10px;\n        }\n\n        main {\n            background-color: #000000;\n            color: #ffffff;\n            margin: 0 5%;\n            padding: 20px;\n        }\n    </style>\n</head>\n\n<body>\n\n    <header>\n        HyperDeck Ethernet Control\n    </header>\n\n    <main>\n`\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7000,"y":6100,"wires":[["819b679d0de50301"]]},{"id":"e89f001aee91dbf4","type":"function","z":"17f45488e967e63c","name":"HTML-C","func":"msg.payload = msg.payload + `\n\n\n        <script>\n      setInterval(function() {\n        location.reload();\n      }, 500);\n        </script>\n    </main>\n\n</body>\n\n</html>\n`\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7300,"y":6100,"wires":[["75752da827c92b4b"]]},{"id":"819b679d0de50301","type":"function","z":"17f45488e967e63c","name":"HTML-B","func":"var text1 = flow.get(\"cmd\")||\"\";\nvar text2 = flow.get(\"Tohtml\")||\"\";\n\nmsg.payload = msg.payload + \"<div>現在入力:\" + text1 + \"<br><br></div>\" + \"<div>\" + text2 + \"</div>\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7140,"y":6100,"wires":[["e89f001aee91dbf4"]]},{"id":"3c10f395fc9efb64","type":"switch","z":"17f45488e967e63c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"11","vt":"str"},{"t":"eq","v":"12","vt":"str"},{"t":"eq","v":"13","vt":"str"},{"t":"eq","v":"16","vt":"str"},{"t":"eq","v":"17","vt":"str"},{"t":"eq","v":"18","vt":"str"},{"t":"eq","v":"19","vt":"str"},{"t":"eq","v":"20","vt":"str"},{"t":"eq","v":"21","vt":"str"},{"t":"eq","v":"22","vt":"str"},{"t":"eq","v":"23","vt":"str"},{"t":"eq","v":"24","vt":"str"},{"t":"eq","v":"25","vt":"str"},{"t":"eq","v":"26","vt":"str"},{"t":"eq","v":"27","vt":"str"},{"t":"eq","v":"30","vt":"str"},{"t":"eq","v":"31","vt":"str"},{"t":"eq","v":"32","vt":"str"},{"t":"eq","v":"33","vt":"str"},{"t":"eq","v":"34","vt":"str"},{"t":"eq","v":"35","vt":"str"},{"t":"eq","v":"36","vt":"str"},{"t":"eq","v":"37","vt":"str"},{"t":"eq","v":"38","vt":"str"},{"t":"eq","v":"39","vt":"str"},{"t":"eq","v":"40","vt":"str"},{"t":"eq","v":"43","vt":"str"},{"t":"eq","v":"44","vt":"str"},{"t":"eq","v":"45","vt":"str"},{"t":"eq","v":"46","vt":"str"},{"t":"eq","v":"47","vt":"str"},{"t":"eq","v":"48","vt":"str"},{"t":"eq","v":"49","vt":"str"},{"t":"eq","v":"50","vt":"str"},{"t":"eq","v":"51","vt":"str"},{"t":"eq","v":"52","vt":"str"},{"t":"eq","v":"53","vt":"str"},{"t":"eq","v":"89","vt":"str"},{"t":"eq","v":"14","vt":"str"},{"t":"eq","v":"28","vt":"str"}],"checkall":"true","repair":false,"outputs":49,"x":6810,"y":4960,"wires":[["7e7b13c3d3571bd8"],["b67105395a3c1783"],["0c40cd5f95dffcc4"],["a64c818737df8656"],["18fa8dba27439b5d"],["06f1d4a070cbce07"],["5ad6d91c68663291"],["f7186031e67f6ea9"],["a1c69f1108d7a778"],["82ccaebad0d887b8"],["133868dd933c7a8c"],["5499f4717cf2c60c"],["747983ec56079449"],["68a59e7e1abd82b5"],["ba6cec09fa51eb11"],["306232586ac69481"],["aa2cb7954ed2ea7d"],["f219ea798a02f796"],["0309e1dbfe1fbf92"],["d312e2e8d096d260"],["20ae93f825b68825"],["946c2ef88f6f405b"],["6be4e98b2f8ed294"],["a1f11a52cebdca65"],["0c17e929a3f0119c"],["dd51cf253cea9575"],["b6c21e9e344b6552"],["d26a5dbbb466eb52"],["aa3dcc2cc97bd656"],["6604a046d7e1ae3e"],["a0e3907b831eed64"],["fadd00aa7e1ff773"],["085ce66b388e3514"],["5e6ca332fe32df4e"],["57482010687c0635"],["6a314787d00a9bd6"],["33eb451906b92537"],["fceecb903f048d5a"],["56eb79958447cc9d"],["fd1b3756c7a6e5f1"],["4cdd3fd09b859a78"],["1845b14d0b95047e"],["9c90599cacced2b2"],["44eb4a60928d8325"],["c7d17652f7448cbf"],["0afeaed392fcc5f9"],["68ea788af5984b9a"],["18ea52605aca3cf1"],["1a3ea662f62bd3e7"]]},{"id":"7e7b13c3d3571bd8","type":"function","z":"17f45488e967e63c","name":"1","func":"msg.payload = \"1\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4080,"wires":[["4312dc3d9fedefb4"]]},{"id":"b67105395a3c1783","type":"function","z":"17f45488e967e63c","name":"2","func":"msg.payload = \"2\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4120,"wires":[["4312dc3d9fedefb4"]]},{"id":"0c40cd5f95dffcc4","type":"function","z":"17f45488e967e63c","name":"3","func":"msg.payload = \"3\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4160,"wires":[["4312dc3d9fedefb4"]]},{"id":"a64c818737df8656","type":"function","z":"17f45488e967e63c","name":"4","func":"msg.payload = \"4\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4200,"wires":[["4312dc3d9fedefb4"]]},{"id":"18fa8dba27439b5d","type":"function","z":"17f45488e967e63c","name":"5","func":"msg.payload = \"5\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4240,"wires":[["4312dc3d9fedefb4"]]},{"id":"06f1d4a070cbce07","type":"function","z":"17f45488e967e63c","name":"6","func":"msg.payload = \"6\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4280,"wires":[["4312dc3d9fedefb4"]]},{"id":"5ad6d91c68663291","type":"function","z":"17f45488e967e63c","name":"7","func":"msg.payload = \"7\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4320,"wires":[["4312dc3d9fedefb4"]]},{"id":"f7186031e67f6ea9","type":"function","z":"17f45488e967e63c","name":"8","func":"msg.payload = \"8\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4360,"wires":[["4312dc3d9fedefb4"]]},{"id":"a1c69f1108d7a778","type":"function","z":"17f45488e967e63c","name":"9","func":"msg.payload = \"9\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4400,"wires":[["4312dc3d9fedefb4"]]},{"id":"82ccaebad0d887b8","type":"function","z":"17f45488e967e63c","name":"0","func":"msg.payload = \"0\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4440,"wires":[["4312dc3d9fedefb4"]]},{"id":"133868dd933c7a8c","type":"function","z":"17f45488e967e63c","name":"-","func":"msg.payload = \"-\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4480,"wires":[["4312dc3d9fedefb4"]]},{"id":"68a59e7e1abd82b5","type":"function","z":"17f45488e967e63c","name":"w","func":"msg.payload = \"w\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4600,"wires":[["4312dc3d9fedefb4"]]},{"id":"ba6cec09fa51eb11","type":"function","z":"17f45488e967e63c","name":"e","func":"msg.payload = \"e\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4640,"wires":[["4312dc3d9fedefb4"]]},{"id":"306232586ac69481","type":"function","z":"17f45488e967e63c","name":"r","func":"msg.payload = \"r\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4680,"wires":[["4312dc3d9fedefb4"]]},{"id":"5499f4717cf2c60c","type":"function","z":"17f45488e967e63c","name":"^","func":"msg.payload = \"^\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4520,"wires":[["4312dc3d9fedefb4"]]},{"id":"747983ec56079449","type":"function","z":"17f45488e967e63c","name":"q","func":"msg.payload = \"q\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4560,"wires":[["4312dc3d9fedefb4"]]},{"id":"4312dc3d9fedefb4","type":"function","z":"17f45488e967e63c","name":"中継ノード","func":"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7430,"y":5900,"wires":[["dbbcc6035bd580b3"]]},{"id":"876d7311ae11336c","type":"switch","z":"17f45488e967e63c","name":"Downのみ送信","property":"action","propertyType":"msg","rules":[{"t":"eq","v":"down","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":6760,"y":4500,"wires":[["3c10f395fc9efb64"]]},{"id":"aa2cb7954ed2ea7d","type":"function","z":"17f45488e967e63c","name":"t","func":"msg.payload = \"t\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4720,"wires":[["4312dc3d9fedefb4"]]},{"id":"f219ea798a02f796","type":"function","z":"17f45488e967e63c","name":"y","func":"msg.payload = \"y\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4760,"wires":[["4312dc3d9fedefb4"]]},{"id":"0309e1dbfe1fbf92","type":"function","z":"17f45488e967e63c","name":"u","func":"msg.payload = \"u\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4800,"wires":[["4312dc3d9fedefb4"]]},{"id":"d312e2e8d096d260","type":"function","z":"17f45488e967e63c","name":"i","func":"msg.payload = \"i\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4840,"wires":[["4312dc3d9fedefb4"]]},{"id":"20ae93f825b68825","type":"function","z":"17f45488e967e63c","name":"o","func":"msg.payload = \"o\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4880,"wires":[["4312dc3d9fedefb4"]]},{"id":"946c2ef88f6f405b","type":"function","z":"17f45488e967e63c","name":"p","func":"msg.payload = \"p\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4920,"wires":[["4312dc3d9fedefb4"]]},{"id":"6be4e98b2f8ed294","type":"function","z":"17f45488e967e63c","name":"@","func":"msg.payload = \"@\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":4960,"wires":[["4312dc3d9fedefb4"]]},{"id":"a1f11a52cebdca65","type":"function","z":"17f45488e967e63c","name":"[","func":"msg.payload = \"[\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5000,"wires":[["4312dc3d9fedefb4"]]},{"id":"0c17e929a3f0119c","type":"function","z":"17f45488e967e63c","name":"a","func":"msg.payload = \"a\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5040,"wires":[["4312dc3d9fedefb4"]]},{"id":"dd51cf253cea9575","type":"function","z":"17f45488e967e63c","name":"s","func":"msg.payload = \"s\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5080,"wires":[["4312dc3d9fedefb4"]]},{"id":"b6c21e9e344b6552","type":"function","z":"17f45488e967e63c","name":"d","func":"msg.payload = \"d\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5120,"wires":[["4312dc3d9fedefb4"]]},{"id":"d26a5dbbb466eb52","type":"function","z":"17f45488e967e63c","name":"f","func":"msg.payload = \"f\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5160,"wires":[["4312dc3d9fedefb4"]]},{"id":"aa3dcc2cc97bd656","type":"function","z":"17f45488e967e63c","name":"g","func":"msg.payload = \"g\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5200,"wires":[["4312dc3d9fedefb4"]]},{"id":"6604a046d7e1ae3e","type":"function","z":"17f45488e967e63c","name":"h","func":"msg.payload = \"h\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5240,"wires":[["4312dc3d9fedefb4"]]},{"id":"a0e3907b831eed64","type":"function","z":"17f45488e967e63c","name":"j","func":"msg.payload = \"j\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5280,"wires":[["4312dc3d9fedefb4"]]},{"id":"fadd00aa7e1ff773","type":"function","z":"17f45488e967e63c","name":"k","func":"msg.payload = \"k\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5320,"wires":[["4312dc3d9fedefb4"]]},{"id":"085ce66b388e3514","type":"function","z":"17f45488e967e63c","name":"l","func":"msg.payload = \"l\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5360,"wires":[["4312dc3d9fedefb4"]]},{"id":"5e6ca332fe32df4e","type":"function","z":"17f45488e967e63c","name":";","func":"msg.payload = \";\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5400,"wires":[["4312dc3d9fedefb4"]]},{"id":"57482010687c0635","type":"function","z":"17f45488e967e63c","name":":","func":"msg.payload = \":\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5440,"wires":[["4312dc3d9fedefb4"]]},{"id":"6a314787d00a9bd6","type":"function","z":"17f45488e967e63c","name":"]","func":"msg.payload = \"]\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5480,"wires":[["4312dc3d9fedefb4"]]},{"id":"dbbcc6035bd580b3","type":"function","z":"17f45488e967e63c","name":"文字列生成TEMP","func":"var tmp = flow.get(\"cmd\")||\"\";\nvar CMD = tmp + msg.payload;\nflow.set(\"cmd\",CMD);\n\nvar tmp = flow.get(\"Tohtml\")||\"\";\nmsg.payload = tmp + msg.payload;\nflow.set(\"Tohtml\",msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7610,"y":5900,"wires":[[]]},{"id":"33eb451906b92537","type":"function","z":"17f45488e967e63c","name":"z","func":"msg.payload = \"z\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5520,"wires":[["4312dc3d9fedefb4"]]},{"id":"fceecb903f048d5a","type":"function","z":"17f45488e967e63c","name":"x","func":"msg.payload = \"x\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5560,"wires":[["4312dc3d9fedefb4"]]},{"id":"56eb79958447cc9d","type":"function","z":"17f45488e967e63c","name":"c","func":"msg.payload = \"c\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5600,"wires":[["4312dc3d9fedefb4"]]},{"id":"fd1b3756c7a6e5f1","type":"function","z":"17f45488e967e63c","name":"v","func":"msg.payload = \"v\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5640,"wires":[["4312dc3d9fedefb4"]]},{"id":"4cdd3fd09b859a78","type":"function","z":"17f45488e967e63c","name":"b","func":"msg.payload = \"b\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5680,"wires":[["4312dc3d9fedefb4"]]},{"id":"1845b14d0b95047e","type":"function","z":"17f45488e967e63c","name":"n","func":"msg.payload = \"n\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5720,"wires":[["4312dc3d9fedefb4"]]},{"id":"9c90599cacced2b2","type":"function","z":"17f45488e967e63c","name":"m","func":"msg.payload = \"m\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5760,"wires":[["4312dc3d9fedefb4"]]},{"id":"44eb4a60928d8325","type":"function","z":"17f45488e967e63c","name":",","func":"msg.payload = \",\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5800,"wires":[["4312dc3d9fedefb4"]]},{"id":"c7d17652f7448cbf","type":"function","z":"17f45488e967e63c","name":".","func":"msg.payload = \".\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5840,"wires":[["4312dc3d9fedefb4"]]},{"id":"0afeaed392fcc5f9","type":"function","z":"17f45488e967e63c","name":"/","func":"msg.payload = \"/\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5880,"wires":[["4312dc3d9fedefb4"]]},{"id":"18ea52605aca3cf1","type":"function","z":"17f45488e967e63c","name":"BS","func":"var TMP = flow.get(\"cmd\")||\"\";\nTMP = TMP.slice(0, -1);\nflow.set(\"cmd\", TMP);\nmsg.payload = TMP;\n\nvar TMP = flow.get(\"Tohtml\")||\"\";\nTMP = TMP.slice(0, -1);\nflow.set(\"Tohtml\", TMP);\nmsg.payload = TMP;\nreturn msg;\n\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5960,"wires":[[]]},{"id":"68ea788af5984b9a","type":"function","z":"17f45488e967e63c","name":"_","func":"msg.payload = \"_\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":5920,"wires":[["4312dc3d9fedefb4"]]},{"id":"a7df73d2d3fe0d46","type":"rpi-keyboard","z":"17f45488e967e63c","name":"","x":6570,"y":4500,"wires":[["876d7311ae11336c"]]},{"id":"1a3ea662f62bd3e7","type":"function","z":"17f45488e967e63c","name":"Enter","func":"var TMP = flow.get(\"Tohtml\")||\"\";\nflow.set(\"Tohtml\", TMP + \"<br>\");\n\nvar tmp = flow.get(\"cmd\")||\"\";\nmsg.payload = tmp;\nflow.set(\"cmd\",\"\");\nreturn msg;\n\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7150,"y":6000,"wires":[["a2c4f88fe8ad5cdf","0135feef7e8a53e5"]]},{"id":"a2c4f88fe8ad5cdf","type":"telnet-send","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":7290,"y":6040,"wires":[]},{"id":"0135feef7e8a53e5","type":"function","z":"17f45488e967e63c","name":"ALL CLEAR","func":"if(msg.payload == \"allclear\") {\n    flow.set(\"Tohtml\", \"\");\n    flow.set(\"cmd\", \"\");\n}\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7310,"y":6000,"wires":[[]]},{"id":"63cc04d0894849b9","type":"telnet-connection","name":"192.168.10.151:9993","address":"192.168.10.151","port":"9993","inDelimiter":"","outDelimiter":"","timeOut":"1500","clearOut":"","openTries":"1"}]

上記のプログラムをデプロイし、下記アドレスにアクセスしてください。

http://<ラズパイのIPアドレス>:1880/HyperDeck-Ethernet-Control.html

このような画面が表示されるはずです。

Windowsで接続したように、擬似的にコマンドプロンプトっぽい表示が出来ます。

これ自体に大きな価値はないですが、
・ラズパイを用いた文字列入力の扱い方
・flow変数の用途
・htmlノードの活用法
などは生きてくるかと思います。


(おまけ)FTP接続によるファイルダウンロード

HyperDeckには、Telnet接続のほかにFTP接続にも対応しています。

FTP接続では、
HyperDeck内の動画ダウンロード・アップロード・削除などが遠隔で操作可能です。

一見地味なように感じますが、
・SDカードリーダーを忘れた
リモートプロダクションで遠隔地から直接データを扱いたい
・2台のHyperDeckを活用してリプレイヤーを作りたい
みたいな場合に、ファイル転送は役立ちます。

WindowsからFTP接続

こちらも同様、まずはWindowsで試してみましょう。
FTP接続可能なソフトは色々ありますが、今回はWinSCPを使用します。

WinSCP

他にもFFFTPとかでもOK


WinSCPでは、下記のように接続先を設定してください。

転送プロトコル:FTP
暗号化    :なし
ホスト名   :HyperDeckのIPアドレス
ポート番号  :21
ユーザー名  :admin
パスワード  :空白

接続に成功すると、このように表示されます

フォルダ1/2はそれぞれSDカード1/2を指しています。
あと自由にデータダウンロード・アップロードが可能です。


ラズパイ & Node-RedからFTP接続

続いてラズパイ&Node-redで試してみましょう。

FTP用のノードを追加

Telnet同様、FTPノードを追加します。

こちらのノードを利用します。
パレット管理から追加するか、コマンドラインで下記を実行させます。

npm install node-red-contrib-ftp

このノードをインストールすると、下記の4つが利用可能になります。

今回は暗号化なしで接続するため、"ftp in"を使用します。

192.168.10.151のHyperDeckに接続するには、下記のようにノードを設定します。
パスワードは空欄で構いません

Operation(Node-redから操作可能なコマンド)には、下記があります。

list
→指定したディレクトリ内のデータ一覧を取得する。
 ファイル名を取得したい場合などに利用。
get
→ファイル名を指定し、データをダウンロードする。

put
→データをアップロードする

append
→データを追加する。
 HyperDeckとの組み合わせでは使用しない。

delete
→ファイルを削除する。

mkdir
→ディレクトリ(フォルダ)を作る。
 HyperDeckでは下階層のデータは読めないので、基本使用することはない。

動かしてみる

では、サンプルコードを動かしてみましょう。
/1/のデータ一覧を取得してみます。

ファイル名に"/1/"とパスを指定

下記のように接続し、Injectをクリックすることで、/1/のディレクトリ内のデータ一覧が取得できました。

[{"id":"bf265f6ce1882c11","type":"ftp in","z":"17f45488e967e63c","ftp":"224bfb55f6f9d808","operation":"list","filename":"/1/","localFilename":"","name":"","x":4250,"y":6000,"wires":[["2c2c47902770b1fb"]]},{"id":"2c2c47902770b1fb","type":"debug","z":"17f45488e967e63c","name":"debug 126","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":4390,"y":6000,"wires":[]},{"id":"0d1b9641dc490917","type":"inject","z":"17f45488e967e63c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":4100,"y":6000,"wires":[["bf265f6ce1882c11"]]},{"id":"224bfb55f6f9d808","type":"ftp","host":"192.168.10.151","port":"","secureOptions":"","user":"amin","connTimeout":"","pasvTimeout":"","keepalive":""}]


同じように、このように設定するとファイルダウンロードができます。
ローカルファイル名に適切なパスを指定してください。

図ではHyperDeck_0023.mp4をダウンロードする


ファイル名は動的に変更したい

いちいちファイル名・ローカルファイル名を設定するのは大変ですよね。
更に、このままではファイル名を動的に変更することができません。
いつも指定したファイルのダウンロード・アップロードになってしまいます…

そこで、次のように設定します。
ファイル名・ローカルファイル名は空欄のまま

ファイル名・ローカルファイル名は空欄のまま

Injectノードを次のように設定しました。

msg.filename = 本来ftpノードの"ファイル名に記載していたパス"
mag.localFilename = 本来ftpノードの"ローカルファイル名に記載していたパス"

こうすることで、外からファイル名の設定が可能となり、動的な変更が実現します。

それでは、下記はそのサンプルコードです。
HyperDeckから/1/内の最新ファイルを探索し、最新ファイルを/media/pi/tmpというラズパイのディレクトリ内に保存します。

[{"id":"105445e567d01562","type":"ftp in","z":"17f45488e967e63c","ftp":"224bfb55f6f9d808","operation":"list","filename":"","localFilename":"","name":"一覧取得","x":6060,"y":4940,"wires":[["a2409a818df1dd4e"]]},{"id":"85b224949f7e37cc","type":"debug","z":"17f45488e967e63c","name":"結果表示","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":6600,"y":4940,"wires":[]},{"id":"a3249ad2493c9f05","type":"inject","z":"17f45488e967e63c","name":"実行","props":[{"p":"payload"},{"p":"filename","v":"/1/","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"str","x":5930,"y":4940,"wires":[["105445e567d01562"]]},{"id":"a2409a818df1dd4e","type":"function","z":"17f45488e967e63c","name":"最新ファイル名を取得","func":"var file_num = msg.payload.length - 1;\nvar file_number = [];\nvar file_name = [];\n\nfor(var i = 1; i <= file_num; i++){\n    file_name[i - 1] = msg.payload[i].name;\n    file_number[i - 1] = Number(msg.payload[i].name.slice(10, 14));\n}\n\nvar num = 0;\nvar send;\nfor (var i = 1; i <= file_num; i++) {\n    if (num <= file_number[i - 1]) send = file_name[i - 1];\n}\nmsg.payload = 1;\nmsg.filename = \"/1/\" + send;\nmsg.localFilename = \"/media/pi/TMP/\" + send;\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6240,"y":4940,"wires":[["4fdc91699df621f6"]]},{"id":"4fdc91699df621f6","type":"ftp in","z":"17f45488e967e63c","ftp":"224bfb55f6f9d808","operation":"get","filename":"","localFilename":"","name":"ダウンロード","x":6440,"y":4940,"wires":[["85b224949f7e37cc"]]},{"id":"224bfb55f6f9d808","type":"ftp","host":"192.168.10.151","port":"","secureOptions":"","user":"amin","connTimeout":"","pasvTimeout":"","keepalive":""}]

<動作原理>
①一覧取得で、ディレクトリ内のファイル一覧を取得します。

②for文を回し、取得配列からファイル名だけを抽出します。

for(var i = 1; i<=file_num; i++){
    file_name[i - 1] = msg.payload[i].name;
    file_number[i - 1] = Number(msg.payload[i].name.slice(10, 14));
}

③HyperDeckは基本的にファイル名の下4桁が大きいほどファイルが新しい為、下4桁を比較して最新ファイル名を特定します。

var num = 0;
var send;
for (var i = 1; i <= file_num; i++) {
    if (num <= file_number[i - 1]) send = file_name[i - 1];
}

④値をmsg.filename/mag.localfilenameに設定し、データを取得しに行きます。

収録を停止したら自動でダウンロードしたい

今回の総まとめ的なプログラムです。
読み進める前に、是非一度 読者様自身でプログラミングしてみてください。

<要件>
・接続先HypereDeckは192.168.10.151
・"play"とキーボード入力で再生
・"stop"と入力で停止
・"record"と入力で収録開始
・収録を停止させたら、自動で最新ファイルを探索し、/media/pi/tmpにDL
・ダウンロード完了通知をWEB UIに表示する


<答え(一例)>

ノード全景

プログラム

[{"id":"1bf91c7aade7a331","type":"http in","z":"17f45488e967e63c","name":"","url":"/HyperDeck-Ethernet-Control.html","method":"get","upload":false,"swaggerDoc":"","x":5830,"y":6300,"wires":[["ca8d4db906d3a33c"]]},{"id":"af21a4cb592f0b8f","type":"http response","z":"17f45488e967e63c","name":"","statusCode":"","headers":{},"x":6490,"y":6300,"wires":[]},{"id":"ca8d4db906d3a33c","type":"function","z":"17f45488e967e63c","name":"HTML-A","func":"msg.payload = `\n<!DOCTYPE html>\n<html lang=\"ja\">\n\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>HyperDeck Ethernet Control</title>\n    <style>\n        body {\n            margin: 0;\n            background-color: #000000;\n        }\n\n        header {\n            background-color: #d3d3d3;\n            color: #000000;\n            font-size: 70px;\n            text-align: center;\n            padding: 10px;\n        }\n\n        main {\n            background-color: #000000;\n            color: #ffffff;\n            margin: 0 5%;\n            padding: 20px;\n        }\n    </style>\n</head>\n\n<body>\n\n    <header>\n        HyperDeck Ethernet Control\n    </header>\n\n    <main>\n`\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6060,"y":6300,"wires":[["e9ae9f4d03710e93"]]},{"id":"5c8e31187c0d6139","type":"function","z":"17f45488e967e63c","name":"HTML-C","func":"msg.payload = msg.payload + `\n\n\n        <script>\n      setInterval(function() {\n        location.reload();\n      }, 500);\n        </script>\n    </main>\n\n</body>\n\n</html>\n`\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6360,"y":6300,"wires":[["af21a4cb592f0b8f"]]},{"id":"e9ae9f4d03710e93","type":"function","z":"17f45488e967e63c","name":"HTML-B","func":"var text1 = flow.get(\"cmd\")||\"\";\nvar text2 = flow.get(\"Tohtml\")||\"\";\n\nmsg.payload = msg.payload + \"<div>現在入力:\" + text1 + \"<br><br></div>\" + \"<div>\" + text2 + \"</div>\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6200,"y":6300,"wires":[["5c8e31187c0d6139"]]},{"id":"5af6bcdda510ee47","type":"switch","z":"17f45488e967e63c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"str"},{"t":"eq","v":"3","vt":"str"},{"t":"eq","v":"4","vt":"str"},{"t":"eq","v":"5","vt":"str"},{"t":"eq","v":"6","vt":"str"},{"t":"eq","v":"7","vt":"str"},{"t":"eq","v":"8","vt":"str"},{"t":"eq","v":"9","vt":"str"},{"t":"eq","v":"10","vt":"str"},{"t":"eq","v":"11","vt":"str"},{"t":"eq","v":"12","vt":"str"},{"t":"eq","v":"13","vt":"str"},{"t":"eq","v":"16","vt":"str"},{"t":"eq","v":"17","vt":"str"},{"t":"eq","v":"18","vt":"str"},{"t":"eq","v":"19","vt":"str"},{"t":"eq","v":"20","vt":"str"},{"t":"eq","v":"21","vt":"str"},{"t":"eq","v":"22","vt":"str"},{"t":"eq","v":"23","vt":"str"},{"t":"eq","v":"24","vt":"str"},{"t":"eq","v":"25","vt":"str"},{"t":"eq","v":"26","vt":"str"},{"t":"eq","v":"27","vt":"str"},{"t":"eq","v":"30","vt":"str"},{"t":"eq","v":"31","vt":"str"},{"t":"eq","v":"32","vt":"str"},{"t":"eq","v":"33","vt":"str"},{"t":"eq","v":"34","vt":"str"},{"t":"eq","v":"35","vt":"str"},{"t":"eq","v":"36","vt":"str"},{"t":"eq","v":"37","vt":"str"},{"t":"eq","v":"38","vt":"str"},{"t":"eq","v":"39","vt":"str"},{"t":"eq","v":"40","vt":"str"},{"t":"eq","v":"43","vt":"str"},{"t":"eq","v":"44","vt":"str"},{"t":"eq","v":"45","vt":"str"},{"t":"eq","v":"46","vt":"str"},{"t":"eq","v":"47","vt":"str"},{"t":"eq","v":"48","vt":"str"},{"t":"eq","v":"49","vt":"str"},{"t":"eq","v":"50","vt":"str"},{"t":"eq","v":"51","vt":"str"},{"t":"eq","v":"52","vt":"str"},{"t":"eq","v":"53","vt":"str"},{"t":"eq","v":"89","vt":"str"},{"t":"eq","v":"14","vt":"str"},{"t":"eq","v":"28","vt":"str"}],"checkall":"true","repair":false,"outputs":49,"x":5870,"y":5120,"wires":[["c6e2de44e8a0a2c5"],["2f4c384558e26f1b"],["2ba663bece58926f"],["f0401b7912d144fd"],["f6795da57e763d2f"],["901e3993dc109878"],["8d8ec20c77fe67e8"],["1df889911e3ab30a"],["e7933da3a28f7c39"],["d9a72d624e458910"],["e3214e8de890013c"],["5e111e50e10a9337"],["d37f7b061a43029f"],["ac9f7c65b36217a4"],["e987a4f61fbd1c5f"],["eb32bb689af55bff"],["469532cf84402adf"],["36fdbb11088b9ee4"],["0e384f539359bff2"],["17a57734d82ce061"],["4acec323e0f9a5be"],["cacb75ddf4f03ea6"],["9b38403f23e383df"],["b7d05cc8f17dcd3a"],["f870e4b52fa9b2c1"],["b6bda85f8f90d607"],["3797d7bd7501255d"],["11b1d67149b924ed"],["67f3f1a6e766aec5"],["7d9917a917a98e8b"],["b1f41e56ca57e119"],["c05e45bd33619001"],["a4ff5f1211787512"],["60547a48e952317d"],["a33ee7035930e6e0"],["0650ebc0dfd0d70d"],["6be2d3fe4216bacc"],["680faba42fb7b753"],["3f16e15469c57bb2"],["66ac584764536df3"],["deeee00fc97c66c3"],["14ba3e8112855aa2"],["819449a34b172aad"],["af0e15af6b12b336"],["61c9ce35dbce6fa3"],["deea6217c2fd4c21"],["e03a7a5fe090aec1"],["49697ef85f999413"],["7a16ae5237173fe8"]]},{"id":"c6e2de44e8a0a2c5","type":"function","z":"17f45488e967e63c","name":"1","func":"msg.payload = \"1\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4240,"wires":[["ec2d9b3a157318bc"]]},{"id":"2f4c384558e26f1b","type":"function","z":"17f45488e967e63c","name":"2","func":"msg.payload = \"2\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4280,"wires":[["ec2d9b3a157318bc"]]},{"id":"2ba663bece58926f","type":"function","z":"17f45488e967e63c","name":"3","func":"msg.payload = \"3\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4320,"wires":[["ec2d9b3a157318bc"]]},{"id":"f0401b7912d144fd","type":"function","z":"17f45488e967e63c","name":"4","func":"msg.payload = \"4\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4360,"wires":[["ec2d9b3a157318bc"]]},{"id":"f6795da57e763d2f","type":"function","z":"17f45488e967e63c","name":"5","func":"msg.payload = \"5\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4400,"wires":[["ec2d9b3a157318bc"]]},{"id":"901e3993dc109878","type":"function","z":"17f45488e967e63c","name":"6","func":"msg.payload = \"6\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4440,"wires":[["ec2d9b3a157318bc"]]},{"id":"8d8ec20c77fe67e8","type":"function","z":"17f45488e967e63c","name":"7","func":"msg.payload = \"7\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4480,"wires":[["ec2d9b3a157318bc"]]},{"id":"1df889911e3ab30a","type":"function","z":"17f45488e967e63c","name":"8","func":"msg.payload = \"8\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4520,"wires":[["ec2d9b3a157318bc"]]},{"id":"e7933da3a28f7c39","type":"function","z":"17f45488e967e63c","name":"9","func":"msg.payload = \"9\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4560,"wires":[["ec2d9b3a157318bc"]]},{"id":"d9a72d624e458910","type":"function","z":"17f45488e967e63c","name":"0","func":"msg.payload = \"0\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4600,"wires":[["ec2d9b3a157318bc"]]},{"id":"e3214e8de890013c","type":"function","z":"17f45488e967e63c","name":"-","func":"msg.payload = \"-\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4640,"wires":[["ec2d9b3a157318bc"]]},{"id":"ac9f7c65b36217a4","type":"function","z":"17f45488e967e63c","name":"w","func":"msg.payload = \"w\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4760,"wires":[["ec2d9b3a157318bc"]]},{"id":"e987a4f61fbd1c5f","type":"function","z":"17f45488e967e63c","name":"e","func":"msg.payload = \"e\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4800,"wires":[["ec2d9b3a157318bc"]]},{"id":"eb32bb689af55bff","type":"function","z":"17f45488e967e63c","name":"r","func":"msg.payload = \"r\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4840,"wires":[["ec2d9b3a157318bc"]]},{"id":"5e111e50e10a9337","type":"function","z":"17f45488e967e63c","name":"^","func":"msg.payload = \"^\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4680,"wires":[["ec2d9b3a157318bc"]]},{"id":"d37f7b061a43029f","type":"function","z":"17f45488e967e63c","name":"q","func":"msg.payload = \"q\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4720,"wires":[["ec2d9b3a157318bc"]]},{"id":"ec2d9b3a157318bc","type":"function","z":"17f45488e967e63c","name":"中継ノード","func":"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6490,"y":6060,"wires":[["adac478fb10ee2d8"]]},{"id":"ed69a56e3995d44f","type":"switch","z":"17f45488e967e63c","name":"Downのみ送信","property":"action","propertyType":"msg","rules":[{"t":"eq","v":"down","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":5820,"y":4660,"wires":[["5af6bcdda510ee47"]]},{"id":"469532cf84402adf","type":"function","z":"17f45488e967e63c","name":"t","func":"msg.payload = \"t\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4880,"wires":[["ec2d9b3a157318bc"]]},{"id":"36fdbb11088b9ee4","type":"function","z":"17f45488e967e63c","name":"y","func":"msg.payload = \"y\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4920,"wires":[["ec2d9b3a157318bc"]]},{"id":"0e384f539359bff2","type":"function","z":"17f45488e967e63c","name":"u","func":"msg.payload = \"u\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":4960,"wires":[["ec2d9b3a157318bc"]]},{"id":"17a57734d82ce061","type":"function","z":"17f45488e967e63c","name":"i","func":"msg.payload = \"i\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5000,"wires":[["ec2d9b3a157318bc"]]},{"id":"4acec323e0f9a5be","type":"function","z":"17f45488e967e63c","name":"o","func":"msg.payload = \"o\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5040,"wires":[["ec2d9b3a157318bc"]]},{"id":"cacb75ddf4f03ea6","type":"function","z":"17f45488e967e63c","name":"p","func":"msg.payload = \"p\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5080,"wires":[["ec2d9b3a157318bc"]]},{"id":"9b38403f23e383df","type":"function","z":"17f45488e967e63c","name":"@","func":"msg.payload = \"@\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5120,"wires":[["ec2d9b3a157318bc"]]},{"id":"b7d05cc8f17dcd3a","type":"function","z":"17f45488e967e63c","name":"[","func":"msg.payload = \"[\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5160,"wires":[["ec2d9b3a157318bc"]]},{"id":"f870e4b52fa9b2c1","type":"function","z":"17f45488e967e63c","name":"a","func":"msg.payload = \"a\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5200,"wires":[["ec2d9b3a157318bc"]]},{"id":"b6bda85f8f90d607","type":"function","z":"17f45488e967e63c","name":"s","func":"msg.payload = \"s\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5240,"wires":[["ec2d9b3a157318bc"]]},{"id":"3797d7bd7501255d","type":"function","z":"17f45488e967e63c","name":"d","func":"msg.payload = \"d\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5280,"wires":[["ec2d9b3a157318bc"]]},{"id":"11b1d67149b924ed","type":"function","z":"17f45488e967e63c","name":"f","func":"msg.payload = \"f\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5320,"wires":[["ec2d9b3a157318bc"]]},{"id":"67f3f1a6e766aec5","type":"function","z":"17f45488e967e63c","name":"g","func":"msg.payload = \"g\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5360,"wires":[["ec2d9b3a157318bc"]]},{"id":"7d9917a917a98e8b","type":"function","z":"17f45488e967e63c","name":"h","func":"msg.payload = \"h\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5400,"wires":[["ec2d9b3a157318bc"]]},{"id":"b1f41e56ca57e119","type":"function","z":"17f45488e967e63c","name":"j","func":"msg.payload = \"j\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5440,"wires":[["ec2d9b3a157318bc"]]},{"id":"c05e45bd33619001","type":"function","z":"17f45488e967e63c","name":"k","func":"msg.payload = \"k\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5480,"wires":[["ec2d9b3a157318bc"]]},{"id":"a4ff5f1211787512","type":"function","z":"17f45488e967e63c","name":"l","func":"msg.payload = \"l\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5520,"wires":[["ec2d9b3a157318bc"]]},{"id":"60547a48e952317d","type":"function","z":"17f45488e967e63c","name":";","func":"msg.payload = \";\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5560,"wires":[["ec2d9b3a157318bc"]]},{"id":"a33ee7035930e6e0","type":"function","z":"17f45488e967e63c","name":":","func":"msg.payload = \":\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5600,"wires":[["ec2d9b3a157318bc"]]},{"id":"0650ebc0dfd0d70d","type":"function","z":"17f45488e967e63c","name":"]","func":"msg.payload = \"]\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5640,"wires":[["ec2d9b3a157318bc"]]},{"id":"adac478fb10ee2d8","type":"function","z":"17f45488e967e63c","name":"文字列生成TEMP","func":"var tmp = flow.get(\"cmd\")||\"\";\nvar CMD = tmp + msg.payload;\nflow.set(\"cmd\",CMD);\n\nvar tmp = flow.get(\"Tohtml\")||\"\";\nmsg.payload = tmp + msg.payload;\nflow.set(\"Tohtml\",msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6670,"y":6060,"wires":[[]]},{"id":"6be2d3fe4216bacc","type":"function","z":"17f45488e967e63c","name":"z","func":"msg.payload = \"z\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5680,"wires":[["ec2d9b3a157318bc"]]},{"id":"680faba42fb7b753","type":"function","z":"17f45488e967e63c","name":"x","func":"msg.payload = \"x\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5720,"wires":[["ec2d9b3a157318bc"]]},{"id":"3f16e15469c57bb2","type":"function","z":"17f45488e967e63c","name":"c","func":"msg.payload = \"c\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5760,"wires":[["ec2d9b3a157318bc"]]},{"id":"66ac584764536df3","type":"function","z":"17f45488e967e63c","name":"v","func":"msg.payload = \"v\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5800,"wires":[["ec2d9b3a157318bc"]]},{"id":"deeee00fc97c66c3","type":"function","z":"17f45488e967e63c","name":"b","func":"msg.payload = \"b\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5840,"wires":[["ec2d9b3a157318bc"]]},{"id":"14ba3e8112855aa2","type":"function","z":"17f45488e967e63c","name":"n","func":"msg.payload = \"n\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5880,"wires":[["ec2d9b3a157318bc"]]},{"id":"819449a34b172aad","type":"function","z":"17f45488e967e63c","name":"m","func":"msg.payload = \"m\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5920,"wires":[["ec2d9b3a157318bc"]]},{"id":"af0e15af6b12b336","type":"function","z":"17f45488e967e63c","name":",","func":"msg.payload = \",\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":5960,"wires":[["ec2d9b3a157318bc"]]},{"id":"61c9ce35dbce6fa3","type":"function","z":"17f45488e967e63c","name":".","func":"msg.payload = \".\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":6000,"wires":[["ec2d9b3a157318bc"]]},{"id":"deea6217c2fd4c21","type":"function","z":"17f45488e967e63c","name":"/","func":"msg.payload = \"/\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":6040,"wires":[["ec2d9b3a157318bc"]]},{"id":"49697ef85f999413","type":"function","z":"17f45488e967e63c","name":"BS","func":"var TMP = flow.get(\"cmd\")||\"\";\nTMP = TMP.slice(0, -1);\nflow.set(\"cmd\", TMP);\nmsg.payload = TMP;\n\nvar TMP = flow.get(\"Tohtml\")||\"\";\nTMP = TMP.slice(0, -1);\nflow.set(\"Tohtml\", TMP);\nmsg.payload = TMP;\nreturn msg;\n\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":6120,"wires":[[]]},{"id":"e03a7a5fe090aec1","type":"function","z":"17f45488e967e63c","name":"_","func":"msg.payload = \"_\";\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":6080,"wires":[["ec2d9b3a157318bc"]]},{"id":"1f13fed89ff43e89","type":"rpi-keyboard","z":"17f45488e967e63c","name":"","x":5630,"y":4660,"wires":[["ed69a56e3995d44f"]]},{"id":"7a16ae5237173fe8","type":"function","z":"17f45488e967e63c","name":"Enter","func":"var TMP = flow.get(\"Tohtml\")||\"\";\nflow.set(\"Tohtml\", TMP + \"<br>\");\n\nvar tmp = flow.get(\"cmd\")||\"\";\nmsg.payload = tmp;\nflow.set(\"cmd\",\"\");\nreturn msg;\n\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6210,"y":6160,"wires":[["d60d75106c7aa8e0","59d2925b95d8234b","dbfa41762579ae41"]]},{"id":"d60d75106c7aa8e0","type":"telnet-send","z":"17f45488e967e63c","name":"","connection":"63cc04d0894849b9","x":6350,"y":6240,"wires":[]},{"id":"59d2925b95d8234b","type":"function","z":"17f45488e967e63c","name":"ALL CLEAR・record/stop/playフラグ設定","func":"if(msg.payload == \"allclear\") {\n    flow.set(\"Tohtml\", \"\");\n    flow.set(\"cmd\", \"\");\n}else if(msg.payload == \"record\") flow.set(\"rsp\",0);\nelse if(msg.payload == \"stop\") flow.set(\"rsp\",1);\nelse if(msg.payload == \"play\") flow.set(\"rsp\",2);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6460,"y":6200,"wires":[[]]},{"id":"e0c2fa3a6d45b18d","type":"ftp in","z":"17f45488e967e63c","ftp":"224bfb55f6f9d808","operation":"list","filename":"/1/","localFilename":"","name":"一覧取得","x":6800,"y":6120,"wires":[["f5cdbbd55c1156ae"]]},{"id":"f5cdbbd55c1156ae","type":"function","z":"17f45488e967e63c","name":"最新ファイル名を取得","func":"var file_num = msg.payload.length - 1;\nvar file_number = [];\nvar file_name = [];\n\nfor(var i = 1; i<=file_num; i++){\n    file_name[i - 1] = msg.payload[i].name;\n    file_number[i - 1] = Number(msg.payload[i].name.slice(10, 14));\n}\n\nvar num = 0;\nvar send;\nfor (var i = 1; i <= file_num; i++) {\n    if (num <= file_number[i - 1]) send = file_name[i - 1];\n}\nmsg.payload = 1;\nmsg.filename = \"/1/\" + send;\nmsg.localFilename = \"/media/pi/TMP/\" + send;\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6980,"y":6120,"wires":[["cbbedba0d0cfc9c9"]]},{"id":"cbbedba0d0cfc9c9","type":"ftp in","z":"17f45488e967e63c","ftp":"224bfb55f6f9d808","operation":"get","filename":"","localFilename":"","name":"ダウンロード","x":7180,"y":6120,"wires":[["777ab3d982c822b3"]]},{"id":"dbfa41762579ae41","type":"function","z":"17f45488e967e63c","name":"収録開始を検知","func":"if(msg.payload == \"record\") return msg;\nelse return null;\n","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":6380,"y":6120,"wires":[["1c5bbbbd6f8c6e50"]]},{"id":"1c5bbbbd6f8c6e50","type":"switch","z":"17f45488e967e63c","name":"","property":"rsp","propertyType":"flow","rules":[{"t":"eq","v":"1","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":6530,"y":6120,"wires":[["b67c1424866e268a"],["3a83b49aca9805f8"]]},{"id":"3a83b49aca9805f8","type":"delay","z":"17f45488e967e63c","name":"","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":6660,"y":6160,"wires":[["1c5bbbbd6f8c6e50"]]},{"id":"b67c1424866e268a","type":"delay","z":"17f45488e967e63c","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":6660,"y":6120,"wires":[["e0c2fa3a6d45b18d"]]},{"id":"777ab3d982c822b3","type":"function","z":"17f45488e967e63c","name":"完了通知","func":"var tmp = flow.get(\"Tohtml\")||\"\";\nmsg.payload = tmp + msg.payload + \"<br>\";\nflow.set(\"Tohtml\",msg.payload);\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":7340,"y":6120,"wires":[[]]},{"id":"63cc04d0894849b9","type":"telnet-connection","name":"192.168.10.151:9993","address":"192.168.10.151","port":"9993","inDelimiter":"","outDelimiter":"","timeOut":"1500","clearOut":"","openTries":"1"},{"id":"224bfb55f6f9d808","type":"ftp","host":"192.168.10.151","port":"","secureOptions":"","user":"amin","connTimeout":"","pasvTimeout":"","keepalive":""}]

WEB UI

拡大

まとめ

今回の記事では、

  • HyperDeckのEthernetコントロール(TelnetFTP)の紹介

  • Telnetを用いた再生制御

  • FTPを用いたデータ管理

  • Node-redの活用法(telnet/http/ftp/flow変数等)

の初歩をご紹介致しました。
これらを組み合わせていくことで、HyperDeckを用いた自由なソフト開発が可能です。

タイトルに触れている通り、HyperDeckリプレイヤーも自作できます。

1台運用モード/REC LIST
1台運用モード/PLAY LIST

次回予告

HyperDeckでリプレイヤーを自作する②では、

HyperDeckを任意速度でスロー再生する!

という内容で投稿予定です。
若干電子工作的な要素も混じりますが、物理フェーダーを用意してスロー再生を実現させます。
是非フォローをしてお待ち下さい!

次回予告
物理フェーダーで再生速度をコントロール

記事はここまでです。

ここから先は

0字

¥ 100

この記事が気に入ったらサポートをしてみませんか?