We continue to talk about how, with a small amount of time and skills, to build a multimedia combine with the additional capabilities of a home server based on Kubuntu 20.04 and KODI, capable of working 24/7/365.
The first part of the post is here:
KODI: assembling a convenient and functional media center for your home. Part 1
Content:
Watching YouTube
External control of media center and system
QBittorrent control (web and mobile app for Android)
KODI Android device control (Yatse, Kore)
KODI and Elementum web interface
Media center traffic accounting (vnStat + web interface)
KODI backup
1. Watching YouTube
It would be strange to have a modern media center without the ability to watch videos on the most popular video hosting site - YouTube. For this, there is an add-on of the same name from the official repository. The add-on interacts well and syncs history, channels, subscriptions, and more. Everything is like everyone else. I don't see any point in describing and reviewing anything in particular.
, . Google API- , API c . . . , overclockers.ru.
, YouTube- KODI – YouTube . , , . , .
2.
«» , /.
Ubuntu SSH- , VNC- . Windows, c Android- ( , 2 5 ).
2.1. qBittorrent (- Android)
, , , -. , – . .
qBittorrent -, / . 8081, 8080 KODI, .
-. , - !
-, android- - qBittorrent Controller. . , .
2.2. KODI Android- (Yatse, Kore)
- , – KODI. .
Android- :
. 8080 /, KODI. IPTV , . , . , Yatse . , , Elementum, , Kore – . m3u8- IPTV , – .
, Android. « KODI». , , , . - YouTube / «» « KODI» - . , , YouTube, , . , .
Yatse. , , . – , , .
– . Yatse. , .
Yatse
Kore
2.3. - KODI Elementum
-. (8080) /. - , IPTV. . , KODI.
- Elementum. , magnet-, . .
KODI Elementum
3. (vnStat + -)
/ , , , « » - . , Ubuntu. , (, ) – , - , , , . , , .
vnStat - Linux . «» KODI, . , , KODI, qBittorrent.
-, , , vnStat. jsvnstat. «Demo», , .
jsvnstat 2013 , , . , vnStat - . – .
– vnStat 1.14. Ubuntu . GitHub.
wget https://github.com/arboozov/kodi/raw/master/vnstat_1.14-1ubuntu2_amd64.deb sudo dpkg -I vnstat_1.14-1ubuntu2_amd64.deb
vnstat, -
sudo apt-mark hold vnstat
( enp1s0)
vnstat -i -u enp1s0
-
sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install apache2 php5.6 php5.6-gd wget libapache2-mod-php5.6 sudo service apache2 restart
, ,
wget https://github.com/arboozov/kodi/raw/master/jsvnstat.zip
/var/www/html/stat/
unzip jsvnstat.zip -d /var/www/html/stat/
$interface , ,
mcedit /var/www/html/stat/settings.php
, http://IP-__/stat/. – - . 5 .
4. KODI
KODI , Kubuntu 20.04, . , , . , , SSD-, , , , . – .
(, ) . Clonezilla. , , , Kubuntu . . Clonezilla – losst.ru.
KODI, «Backup» 1 . , .
, KODI 4:00 . , , , ( ).
? « » – , . , , . , , ( ) – . .
Dropbox
. . API, (, ), . Backup , Dropbox . , . «» . KODI . , , . , – .
.
, Backup, , , , . – .
« » . WebDAV API.
WebDAV API Ubuntu, davfs2
sudo apt-get install davfs2
, .
sudo mkdir /mnt/yandex.disk sudo chmod -R 0777 /mnt/yandex.disk
davfs2, :
– , @
– ID, .
echo "https://webdav.yandex.ru " >> /etc/davfs2/secrets
/mnt/yandex.disk
sudo mount -t davfs https://webdav.yandex.ru /mnt/yandex.disk
fstab, . ,
sudo mcedit /etc/fstab
https://webdav.yandex.ru:443 /mnt/yandex.disk davfs user,rw,_netdev 0 0
Backup.
. KODI, 1.61 , – 1.35 . .
Google Drive
KODI Google. . .
google-drive-ocamlfuse. ,
sudo add-apt-repository ppa:alessandro-strada/ppa sudo apt-get update sudo apt-get install google-drive-ocamlfuse
,
sudo mkdir /mnt/google.drive sudo chmod -R 0777 /mnt/google.drive
- ( sudo),
google-drive-ocamlfuse /mnt/google.drive
. Google KODI – .
, /mnt/google.drive .
., Google Drive . .
mcedit /usr/bin/gdfuse
#!/bin/bash
google-drive-ocamlfuse -label $1 $*
exit 0
root
sudo chmod +x /usr/bin/gdfuse sudo cp -r /home/_/.gdfuse /root/
fstab
sudo mcedit /etc/fstab
gdfuse#default /mnt/google.drive fuse allow_other 0 0
.
KODI, , , , . – /home/_/.kodi/. , wiki - , . Backup « » «Simple» «Advanced» – .
Thus, with a small amount of time and skills, we get a multimedia combine with additional features of a home server and many comfortable control methods that can work 24/7/365, an analogue of which I have not yet found, perhaps only by what I was not looking for - he completely and completely suits me and my household.
PS There are plans to also raise KODI on the second TV (probably on Raspberry Pi 3/4) and synchronize both devices using MySQL. There will be a publication on the work done in this direction.