Raspbian: Difference between revisions

From Q
Jump to navigation Jump to search
Tgurr (talk | contribs)
Tgurr (talk | contribs)
Line 130: Line 130:
=== Plugins ===
=== Plugins ===
==== Netflix ====
==== Netflix ====
https://github.com/kodinerds/repo/blob/master/repository.netflix/repository.netflix-1.0.1.zip
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.

Revision as of 02:46, 1 July 2019

Install

dd bs=4M if=2019-04-08-raspbian-stretch-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-get update

sudo apt-get 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

Installation

sudo apt-cache search kodi*
sudo apt-get install kodi
sudo apt-get install kodi-inputstream-adaptive
sudo apt-get install kodi-vfs-nfs
sudo apt-get 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-get 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-get 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.10.0_armhf.deb

Install via

sudo dpkg -i snapclient_0.10.0_armhf.deb

Install missing dependencies:

sudo apt-get -f install

sudo systemctl enable snapclient

Steam Link

sudo apt-get install steamlink

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

sudo apt-get install libxcb-xkb1
sudo apt-get 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-get 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