Raspberry Pi Diashow Bilder-Monitor mit Nextcloudanbindung- Schritt-für-Schritt Anleitung

In diesem Video zeige ich euch ganz einfach, wie ihr euren Raspberry Pi in einen Diashow Monitor verwandeln könnt, der automatisch Bilder von euerer nextcloud anzeigt.

» Fertige Installation zum Download auf Patreon: https://www.patreon.com/posts/47791129

» Nextcloud Installation:
Auf Raspberry Pi: https://youtu.be/hEFzZglKtOY
Auf Linux Server: https://youtu.be/QB_FEWJ9BB4
Auf Windows 10: https://youtu.be/rtfKDupfulQ

» Verwendete Produkte (Pi 4B):
All-in-One Set: https://amzn.to/3s9eDm4
Raspberry Pi 4B 4GB: https://amzn.to/2ZvJPzP
Raspberry Pi 4 Case: https://amzn.to/3ug9FG6
3A USB-C Netzteil: https://amzn.to/2M7UFsx
microSD Karte: https://amzn.to/3ufhsUD
HDMI-Kabel: https://amzn.to/3pBkDlV

» Verwendete Produkte (Pi 3B):
All-in-One Set: https://amzn.to/3sb5SYH
Raspberry Pi 3: https://amzn.to/3bmyM1o
Raspberry Pi 3 Case: https://amzn.to/2NH0tcX
3A microUSB Netzteil: https://amzn.to/3bjuh7E
microSD Karte: https://amzn.to/3ufhsUD
HDMI-Kabel: https://amzn.to/2OY8KKf

 

 

#### Raspberry Picture Frame with Nextcloud ####

## Update Raspberry Pi ##
sudo su
apt update && apt upgrade 

## Install all dependencies ##
apt install build-essential git cmake openssl libssl-dev sqlite3 libsqlite3-dev qt5-default libqt5webkit5-dev qttools5-dev qttools5-dev-tools python-sphinx texlive-latex-base inotify-tools qt5keychain-dev doxygen extra-cmake-modules kio-dev

## compile from GitHub ##
cd ~
git clone https://github.com/nextcloud/client_theming.git nextcloud_client
cd nextcloud_client
git submodule update --init
cd client
git submodule update --init
cd ..
mkdir build
cd build
cmake -D OEM_THEME_DIR=$(pwd)/../nextcloudtheme ../client
sed -i 's/Icon=nextcloud/Icon=Nextcloud/g' src/gui/nextcloud.desktop
sed -i 's/Icon\[\(.*\)\]=nextcloud/Icon\[\1\]=Nextcloud/g' src/gui/nextcloud.desktop
make

sudo make install

## check if running ##
nextcloudcmd -v

## if error, then.. ##
echo 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/arm-linux-gnueabihf' | sudo tee -a /etc/environment
grep '/usr/local/lib/arm-linux-gnueabihf' /etc/ld.so.conf.d/arm-linux-gnueabihf.conf >/dev/null 2>&1 || echo '/usr/local/lib/arm-linux-gnueabihf' | sudo tee -a /etc/ld.so.conf.d/arm-linux-gnueabihf.conf
grep '/usr/local/lib/arm-linux-gnueabihf' /etc/ld.so.conf.d/x86_64-linux-gnu.conf >/dev/null 2>&1 || echo '/usr/local/lib/arm-linux-gnueabihf' | sudo tee -a /etc/ld.so.conf.d/x86_64-linux-gnu.conf
sudo ldconfig
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/arm-linux-gnueabihf

## check again ##
nextcloudcmd -v https://n3.apfelcast.com/remote.php/dav/files/raspberry/

## create directory ##
mkdir /home/pi/cloud

## create netrc file ##
nano ~/.netrc

machine mein.server.de
        login benutzername
        password passwort
        
chmod 0600 ~/.netrc

## sync via cli ##
nextcloudcmd --non-interactive -n /var/data/cloud/ https://mein.server.de/remote.php/webdav/


## install slideshoe software ##
wget https://github.com/NautiluX/slide/releases/download/v0.9.0/slide_pi_stretch_0.9.0.tar.gz
tar xf slide_pi_stretch_0.9.0.tar.gz
mv slide_0.9.0/slide /usr/local/bin/

apt install libexif12 qt5-default

## autostart slideshow at boot ##
nano /etc/xdg/lxsession/LXDE-pi/autostart

@xset s noblank 
@xset s off 
@xset -dpms
@slide -t 30 -o 200 -p /home/pi/cloud/Diashow

## disable screen blacking after 10 minutes ##
nano /etc/lightdm/lightdm.conf

[SeatDefaults]
xserver-command=X -s 0 -dpms

## V1: Simple crontab sync ##
crontab -e 
*/15 * * * * nextcloudcmd -n /home/pi/cloud/Diashow https://meine.domain.com/remote.php/webdav/ >/dev/null 2>&1

## V2: automate Sync via bash skript ##
nano /home/pi/cloud-sync.sh

#!/bin/bash
LOCAL=/var/data/cloud/
REMOTE=https://mein.server.de/remote.php/webdav/
PARAMS="--non-interactive -n --exclude /home/pi/cloud-sync-exclude.txt"

LOG=/var/log/cloud-sync.log

if [ pgrep -x nextcloudcmd ]; then
  echo "====================" | tee -a $LOG
  date -R | tee -a $LOG
  echo "Cloud-Sync läuft schon!" | tee -a $LOG
  echo "====================" | tee -a $LOG
  exit 1
fi

echo "====================" | tee -a $LOG
date -R | tee -a $LOG
echo "Cloud-Sync gestartet" | tee -a $LOG
echo "====================" | tee -a $LOG

/usr/local/bin/nextcloudcmd $PARAMS $LOCAL $REMOTE 2>&1 | tee -a $LOG

echo "====================" | tee -a $LOG
date -R | tee -a $LOG
echo "Cloud-Sync beendet" | tee -a $LOG
echo "====================" | tee -a $LOG

## make executable ##
chmod +x /home/pi/cloud-sync.sh

## automate via crontab ##
0 4 * * * /home/pi/cloud-sync.sh >/dev/null &

 

apfelcast Support

Du benötigst Unterstützung bei deinem Projekt oder hast Fragen zur Umsetzung?
Dann melde ich gern bei uns!

[button link=“https://apfelcast.com/kontakt“ type=“big“ class=“ custom-button“] Kontaktieren[/button]

apfelcast Support

Du benötigst Unterstützung bei deinem Projekt oder hast Fragen zur Umsetzung?
Dann melde ich gern bei uns!

Ähnliche Beiträge