Raspbian: Difference between revisions

From Q
Jump to navigation Jump to search
Tgurr (talk | contribs)
No edit summary
Tgurr (talk | contribs)
No edit summary
Line 19: Line 19:


== Update ==
== Update ==
sudo apt-get update
sudo apt update


sudo apt-get upgrade
sudo apt upgrade


== Configuration ==
== Configuration ==
Line 82: Line 82:
echo "deb https://pipplware.pplware.pt/pipplware/dists/buster/main/binary /" > /etc/apt/sources.list.d/pipplware_buster.list
echo "deb https://pipplware.pplware.pt/pipplware/dists/buster/main/binary /" > /etc/apt/sources.list.d/pipplware_buster.list
wget -O - https://pipplware.pplware.pt/pipplware/key.asc | sudo apt-key add -
wget -O - https://pipplware.pplware.pt/pipplware/key.asc | sudo apt-key add -
apt-get update && apt-get dist-upgrade -y
apt update && apt dist-upgrade -y
exit
exit
</pre>
</pre>
Line 89: Line 89:
<pre>
<pre>
sudo rm /etc/apt/sources.list.d/pipplware_buster.list
sudo rm /etc/apt/sources.list.d/pipplware_buster.list
sudo apt-get update -y
sudo apt update -y
sudo apt-get remove kodi*
sudo apt remove kodi*
</pre>
</pre>


Line 96: Line 96:
<pre>
<pre>
sudo apt-cache search kodi*
sudo apt-cache search kodi*
sudo apt-get install kodi
sudo apt install kodi
sudo apt-get install kodi-inputstream-adaptive
sudo apt install kodi-inputstream-adaptive
sudo apt-get install kodi-vfs-nfs
sudo apt install kodi-vfs-nfs
sudo apt-get install udisks2
sudo apt install udisks2
</pre>
</pre>


Line 155: Line 155:


<pre>
<pre>
# sudo apt-get install python-pip
# sudo apt install python-pip
# sudo su -l kodi
# sudo su -l kodi
kodi $ pip install pycryptodomex
kodi $ pip install pycryptodomex
Line 175: Line 175:


<pre>
<pre>
sudo apt-get install libnss3
sudo apt install libnss3
</pre>
</pre>


Line 197: Line 197:
Install missing dependencies:
Install missing dependencies:


sudo apt-get -f install
sudo apt -f install


sudo systemctl enable snapclient
sudo systemctl enable snapclient
Line 203: Line 203:
== Steam Link ==
== Steam Link ==
<pre>
<pre>
sudo apt-get install steamlink
sudo apt install steamlink
</pre>
</pre>
And also some required dependencies steamlink will complain about when launching it.
And also some required dependencies steamlink will complain about when launching it.
<pre>
<pre>
sudo apt-get install libxcb-xkb1
sudo apt install libxcb-xkb1
sudo apt-get install libxkbcommon-x11-0
sudo apt install libxkbcommon-x11-0
</pre>
</pre>


Line 232: Line 232:
==== mjpg-streamer ====
==== mjpg-streamer ====


apt-get install cmake libjpeg-dev
apt install cmake libjpeg-dev


wget https://github.com/jacksonliam/mjpg-streamer/archive/master.tar.gz
wget https://github.com/jacksonliam/mjpg-streamer/archive/master.tar.gz

Revision as of 22:23, 30 August 2019

Install

dd bs=4M if=2019-07-10-raspbian-buster-lite.img of=/dev/sdX conv=fsync

Login

Default user: pi

Default password: raspberry

Static IP

/etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.16/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

Update

sudo apt update

sudo apt upgrade

Configuration

sudo raspi-config

8 Update
7 Advanced Options -> A1 Expand Filesystem
4 Localisation Options -> I1 Change Locale -> de_DE.UTF-8 UTF-8
4 Localisation Options -> I2 Change Timezone -> Europe -> Berlin
4 Localisation Options -> I3 Change Keyboard Layout -> Generic 105-key (Intl) PC -> Other -> German -> German -> 
4 Localisation Options -> I4 Change Wi-fi Country -> DE
5 Interfacing Options -> P2 SSH -> Yes

Kodi

7 Advanced Options -> A3 Memory Split -> 256
7 Advanced Options -> A4 Audio -> 2 Force HDMI

PiFace

5 Interfacing Options -> P4 SPI -> Yes -> Ok -> Yes

Camera

5 Interfacing Options -> P1 Camera -> Enable

HiFiBerry AMP+

/boot/config.txt

Disable onboard sound:

# Enable audio (loads snd_bcm2835)
#dtparam=audio=on

Enable AMP/AMP+

# Enable audio (HiFiBerry AMP/AMP+)
dtoverlay=hifiberry-amp

amixer sset Master 70%

amixer sset Channels 70%,70%

Kodi

Repository

Add

Currently we need to use an external repository for Kodi 18.

sudo su
echo "deb https://pipplware.pplware.pt/pipplware/dists/buster/main/binary /" > /etc/apt/sources.list.d/pipplware_buster.list
wget -O - https://pipplware.pplware.pt/pipplware/key.asc | sudo apt-key add -
apt update && apt dist-upgrade -y
exit

Remove

sudo rm /etc/apt/sources.list.d/pipplware_buster.list
sudo apt update -y
sudo apt remove kodi*

Installation

sudo apt-cache search kodi*
sudo apt install kodi
sudo apt install kodi-inputstream-adaptive
sudo apt install kodi-vfs-nfs
sudo apt install udisks2
sudo useradd -m -U -G "audio,bluetooth,input,plugdev,video" -s /bin/bash kodi
/etc/systemd/system/kodi.service

[Unit]
Description = Kodi Media Center
After = systemd-user-sessions.service network.target sound.target

[Service]
User = kodi
Group = kodi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = always
RestartSec = 15

[Install]
WantedBy = multi-user.target
/etc/polkit-1/localauthority/50-local.d/kodi-reboot.pkla

[Actions for kodi user]
Identity=unix-user:kodi
Action=org.freedesktop.login1.*;org.freedesktop.upower.*;org.freedesktop.udisks2.*
ResultActive=yes
ResultAny=yes
ResultInactive=yes
/boot/config.txt

hdmi_ignore_cec_init=1
sudo systemctl daemon-reload
sudo systemctl enable kodi
sudo systemctl start kodi

Plugins

Netflix

https://github.com/castagnait/repository.castagnait/raw/master/repository.castagnait-1.0.0.zip

The Netflix Plugin complains about not being able to import pycryptodomex so we need to install it manually https://www.raspberrypi.org/documentation/linux/software/python.md.

# sudo apt install python-pip
# sudo su -l kodi
kodi $ pip install pycryptodomex

Amazon Prime (Amazon VOD)

https://github.com/Sandmann79/xbmc/releases/download/v1.0.2/repository.sandmann79.plugins-1.0.2.zip

InputStream Helper

The InputStream Helper does some fancy magic to download and install Widevine CDM, for this it needs to run several commands as root, like e.g. mount, unmount, losetup and modprobe. It supports running these commands via sudo so grant the kodi user the right to run sudo. The sudoers file can be removed afterwards, but might be needed again when there's an update.

/etc/sudoers.d/010_kodi-nopasswd

kodi ALL=(ALL) NOPASSWD: ALL

After that IntputStream Helper might complain about libnss3.so, libnssutil3.so and libnspr4.so might be needed for Widevine CDM, so we install libnss3 which pulls in libnspr4 as it's dependency:

sudo apt install libnss3

Steam Link

https://github.com/bigbrozer/kodi-steamlink-launcher/releases/download/v0.0.2/kodi-steamlink-launcher-v0.0.2.zip

/etc/sudoers.d/steamlink-kodi

kodi ALL=(root) NOPASSWD: /bin/systemctl stop kodi, /bin/systemctl restart kodi, /bin/openvt

Snapcast

Installation

Download the latest snapclient release from https://github.com/badaix/snapcast/releases e.g. snapclient_0.15.0_armhf.deb

Install via

sudo dpkg -i snapclient_0.15.0_armhf.deb

Install missing dependencies:

sudo apt -f install

sudo systemctl enable snapclient

Steam Link

sudo apt install steamlink

And also some required dependencies steamlink will complain about when launching it.

sudo apt install libxcb-xkb1
sudo apt install libxkbcommon-x11-0

DoorPi

Installation

sudo easy_install pip || (wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python) && sudo easy_install pip

sudo pip install linphone4raspberry python-daemon

sudo pip install doorpi && sudo doorpi_cli --trace

cd /tmp

wget https://raw.githubusercontent.com/motom001/DoorPi/master/doorpi/docs/service/create_daemon_file.py -O - | sudo python

sudo systemctl daemon-reload

sudo systemctl enable doorpi

sudo systemctl start doorpi

mjpg-streamer

apt install cmake libjpeg-dev

wget https://github.com/jacksonliam/mjpg-streamer/archive/master.tar.gz

tar xf master.tar.gz

cd mjpg-streamer-experimental

make

sudo make install

mjpg_streamer -i "input_raspicam.so" -o "output_http.so -n -w /usr/local/www -p 9000"

mjpg_streamer -i "input_uvc.so -d /dev/video0 -n -r 1024x768 -f 24 –q 80 -l off " -o "output_http.so -n -w /usr/local/www -p 9000"

Webinterface

Default user: door

Default password: pi