2021年7月17日土曜日

Linux(Ubuntu)で取り敢えずEPG録画(Mirakurun,Chinachu/EPGStation)



前提
アースソフトPT3
recpt1で録画できる事
LAN接続

必要な物
Mirakurun EPG取得他
Chinachu または
EPGStation 番組録画予約

 
sudo apt install curl
等必要なソフトを適宜インストールする。


Mirakurunインストール
Node.js
PM2(Process Manager)
arib-b25-stream-test

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

sudo npm install pm2 -g
sudo npm install mirakurun -g --unsafe-perm --production
sudo npm install arib-b25-stream-test -g --unsafe-perm

設定ファイルの変更
isDisabled: trueをfalse書き換えて有効にする。
sudo mirakurun config tuners

チャンネルスキャン
curl -X PUT "http://localhost:40772/api/config/channels/scan" 
curl -X PUT "http://localhost:40772/api/config/channels/scan?type=BS&setDisabledOnAdd=false&refresh=true" 
curl -X PUT "http://localhost:40772/api/config/channels/scan?type=CS&setDisabledOnAdd=false&refresh=true"

設定ファイルの変更
isDisabled: trueをfalse書き換えて有効にする。
sudo mirakurun config channels
 

Mirakurun再起動
sudo mirakurun restart
Use --update-env to update environment variables
[PM2] Applying action restartProcessId on app [mirakurun-server](ids: [ 0 ])
[PM2] [mirakurun-server](0) ✓
┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
│ id │ name               │ mode     │ ↺    │ status    │ cpu      │ memory   │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ mirakurun-server   │ fork     │ 1    │ online    │ 0%       │ 22.8mb   │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘


録画テスト
npm install rivarun -g

BS朝日 10秒
rivarun --mirakurun localhost:40772 --b25 --ch BS/BS01_0 10 test.ts

status: 200
できない時はチャンネルにisDisabled: falseを明示してみる。
 

A:Chinachuインストール
git clone git://github.com/kanreisa/Chinachu.git ~/chinachu
cd ~/chinachu/
./chinachu installer
 1のAuto(full)を選択

設定ファイル
cp config.sample.json config.json
echo [] > rules.json

EPG取得
./chinachu update

Chinachuの実行
./chinachu service wui execute
./chinachu service operator execute
両方実行する。
上手く出来ていれば、ブラウザで予約録画できる。
例192.168.2.100:20772
Client {
  basePath: '/api',
  docsPath: '/docs',
  priority: 0,
  host: '',
  port: 40772,
  socketPath: '/var/run/mirakurun.sock',
  userAgent: 'Chinachu/0.10.3-gamma.0 (wui)',
  _userAgent: 'MirakurunClient/3.6.0 Node/v10.23.0 (linux)' }
============================================================
Detected Private IPv4: [ '192.168.2.100' ]
Selected Private IPv4 for Open Server: 192.168.2.100
NOTE: set `wuiOpenHost` to fix address for listen.
============================================================ 

 

B:EPGStation のインストール
$ git clone https://github.com/l3tnun/EPGStation.git 
$ cd EPGStation 
$ npm run all-install 
$ npm run build

設定ファイルの作成
$ cp config/config.yml.template config/config.yml 
$ cp config/operatorLogConfig.sample.yml config/operatorLogConfig.yml 
$ cp config/epgUpdaterLogConfig.sample.yml config/epgUpdaterLogConfig.yml 
$ cp config/serviceLogConfig.sample.yml config/serviceLogConfig.yml 
$ cp config/enc.js.template config/enc.js


EPGStation の起動

手動で起動する場合
$ npm start 

自動で起動する場合
pm2 を利用して自動起動設定が可能
初回のみ以下の起動設定が必要
$ sudo npm install pm2 -g 
$ sudo pm2 startup <OS名> 
$ pm2 start dist/index.js --name "epgstation" 
$ pm2 save 

手動で終了する場合
$ npm stop 

自動起動した EPGStation を終了する場合
$ pm2 stop epgstation 

自動起動登録した EPGStation を削除する場合
$ pm2 delete epgstation 


ブラウザで
localhost:8888
に接続し番組録画予約する。




2021年2月3日水曜日

楽天回線に固定する方法 android

楽天回線が使える場所でも、電波が弱いと自動でパートナー回線に切り替わってしまう。これを防ぐ方法。
エンジニアモードがないスマホでは出来ない。


必要な物
QuickShortcutMakerアプリ

QuickShortcutMakerを実行する。
インクリメンタル検索>アクティビティ
Engineer Mode
Band Mode
com.tcf.engineermode/
com.tcf.engineermode.TcfBandSelectを選択

起動

楽天回線はバンド3のみなので、LTE-B3以外のチェックを外す(パートナー回線auのバンド18,26を外す)。
SET

スマホを再起動する。
my楽天モバイルで確認できる。