Raspbian: Difference between revisions
| (7 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== Install == | == Install == | ||
dd bs=4M if=2019- | dd bs=4M if=2019-07-10-raspbian-buster-lite.img of=/dev/sdX conv=fsync | ||
== Login == | == Login == | ||
| Line 19: | Line 19: | ||
== Update == | == Update == | ||
sudo apt | sudo apt update | ||
sudo apt | sudo apt upgrade | ||
== Configuration == | == Configuration == | ||
| Line 52: | Line 52: | ||
</pre> | </pre> | ||
=== HiFiBerry | === HiFiBerry General === | ||
/boot/config.txt | /boot/config.txt | ||
| Line 61: | Line 61: | ||
#dtparam=audio=on | #dtparam=audio=on | ||
</pre> | </pre> | ||
=== HiFiBerry AMP+ === | |||
/boot/config.txt | |||
Enable AMP/AMP+ | Enable AMP/AMP+ | ||
| Line 68: | Line 72: | ||
</pre> | </pre> | ||
amixer sset Master 70% | sudo amixer sset Master 70% | ||
sudo amixer sset Channels 70%,70% | |||
=== HiFiBerry AMP2 === | |||
/boot/config.txt | |||
Enable AMP2 | |||
<pre> | |||
# Enable audio (HiFiBerry AMP2) | |||
dtoverlay=hifiberry-dacplus | |||
</pre> | |||
amixer sset | sudo amixer sset Digital 90% | ||
== Kodi == | == Kodi == | ||
=== Repository === | |||
==== Add ==== | |||
Currently we need to use an external repository for Kodi 18. | |||
<pre> | |||
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 | |||
</pre> | |||
==== Remove ==== | |||
<pre> | |||
sudo rm /etc/apt/sources.list.d/pipplware_buster.list | |||
sudo apt update -y | |||
sudo apt remove kodi* | |||
</pre> | |||
=== Installation === | === Installation === | ||
<pre> | <pre> | ||
sudo apt | sudo apt search kodi* | ||
sudo apt | sudo apt install kodi | ||
sudo apt | sudo apt install kodi-inputstream-adaptive | ||
sudo apt | sudo apt install kodi-vfs-nfs | ||
sudo apt | sudo apt install udisks2 | ||
</pre> | </pre> | ||
| Line 130: | Line 166: | ||
=== Plugins === | === Plugins === | ||
==== Netflix ==== | ==== Netflix ==== | ||
https://github.com/ | 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. | 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. | ||
<pre> | <pre> | ||
# sudo apt | # sudo apt install python-pip | ||
# sudo su -l kodi | # sudo su -l kodi | ||
kodi $ pip install pycryptodomex | kodi $ pip install pycryptodomex | ||
| Line 155: | Line 191: | ||
<pre> | <pre> | ||
sudo apt | sudo apt install libnss3 | ||
</pre> | </pre> | ||
| Line 169: | Line 205: | ||
== Snapcast == | == Snapcast == | ||
=== Installation === | === Installation === | ||
Download the latest snapclient release from https://github.com/badaix/snapcast/releases e.g. snapclient_0. | Download the latest snapclient release from https://github.com/badaix/snapcast/releases e.g. snapclient_0.15.0_armhf.deb | ||
Install via | Install via | ||
sudo dpkg -i snapclient_0. | sudo dpkg -i snapclient_0.15.0_armhf.deb | ||
Install missing dependencies: | Install missing dependencies: | ||
sudo apt | sudo apt -f install | ||
sudo systemctl enable snapclient | sudo systemctl enable snapclient | ||
| Line 183: | Line 219: | ||
== Steam Link == | == Steam Link == | ||
<pre> | <pre> | ||
sudo apt | 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 | sudo apt install libxcb-xkb1 | ||
sudo apt | sudo apt install libxkbcommon-x11-0 | ||
sudo apt install cec-utils | |||
</pre> | </pre> | ||
| Line 212: | Line 249: | ||
==== mjpg-streamer ==== | ==== mjpg-streamer ==== | ||
apt | 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 | ||
Latest revision as of 16:40, 5 September 2020
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 General
/boot/config.txt
Disable onboard sound:
# Enable audio (loads snd_bcm2835) #dtparam=audio=on
HiFiBerry AMP+
/boot/config.txt
Enable AMP/AMP+
# Enable audio (HiFiBerry AMP/AMP+) dtoverlay=hifiberry-amp
sudo amixer sset Master 70%
sudo amixer sset Channels 70%,70%
HiFiBerry AMP2
/boot/config.txt
Enable AMP2
# Enable audio (HiFiBerry AMP2) dtoverlay=hifiberry-dacplus
sudo amixer sset Digital 90%
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 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
/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 sudo apt install cec-utils
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