Infodisplay: Unterschied zwischen den Versionen

Aus Stratum 0
Wechseln zu:Navigation, Suche
(Setup: +node +xinit firefox-esr statt firefox weil realisitischer)
(Setup: Jetzt neu mit python3 statt node.)
(12 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt)
Zeile 24: Zeile 24:
 
* IRC-Channel
 
* IRC-Channel
  
Das ganze ist derzeit auf Full-HD optimiert. Da die Software auf einer [http://infodisplay.local:8000 Webseite] basiert (im Fullscreen angezeigt, aus dem Space-Netz erreichbar), ist sie theoretisch auf auf mehreren Displays deploybar.
+
Das ganze ist derzeit auf Full-HD optimiert. Da die Software auf einer [http://infodisplay.local:8000 Webseite] basiert (im Fullscreen angezeigt, aus dem Space-Netz erreichbar), ist sie theoretisch auf mehreren Displays deploybar.
  
 
== Setup ==
 
== Setup ==
 
Raspbian auf Raspberry Pi installieren. Dann:
 
Raspbian auf Raspberry Pi installieren. Dann:
  sudo apt install firefox-esr xserver-xorg-legacy xserver-xorg node xinit           # oder auch firefox, je nach Verfügbarkeit
+
 
  git clone https://gitli.stratum0.org/kasalehlia/s0infodisplay/        # macht lokal einen HTTP-Server und baut die HTML-Seite
+
Pakete installieren:
  git clone https://github.com/rohieb/infopoint-html.git               # startet einen Firefox im Vollbild
+
  sudo apt -y install git firefox-esr xserver-xorg-legacy xserver-xorg x11-xserver-utils python3-rpi.gpio npm xinit libicu-dev nodejs unattended-upgrades
  sudo cp s0infodisplay/s0infodisplay.service infopoint-html/infopoint-html.service /etc/systemd/system/
+
# oder auch 'firefox', je nach Verfügbarkeit
 +
 
 +
Libcec mit RPI build system fix bauen:
 +
  git clone https://github.com/Emantor/libcec
 +
cd libcec && mkdir build && cd build
 +
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..
 +
 
 +
Darauf achten das nach dem cmake die Zeile
 +
-- Raspberry Pi support:                  yes
 +
auf yes steht. Dann:
 +
make
 +
sudo make install
 +
sudo ldconfig
 +
 
 +
s0infodisplay macht lokal einen HTTP-Server und baut die HTML-Seite:
 +
git clone https://gitli.stratum0.org/kasalehlia/s0infodisplay/
 +
cd s0infodisplay/
 +
virtualenv env
 +
source env/bin/activate
 +
pip install -r requirements.txt
 +
python3 main.py
 +
 
 +
infopoint-html startet einen Firefox im Vollbild:
 +
cd
 +
  git clone https://github.com/rohieb/infopoint-html.git
 +
echo -e '#!/bin/sh\nexec /home/pi/infopoint-html/src/infopoint-html' | sudo tee /usr/bin/infopoint-html
 +
sudo chmod +x /usr/bin/infopoint-html
 +
echo 'URL="http://localhost:8000/"' | sudo tee /etc/default/infopoint-html
 +
 
 +
systemd-logind session activation für den X-Server umgehen:
 +
sudo dpkg-reconfigure xserver-xorg-legacy  # hier dann die dritte Option, "Anybody", auswählen
 +
 
 +
systemd-Services installieren:
 +
  sudo cp s0infodisplay/s0infodisplay.service s0infodisplay/pirscreencontrol.service infopoint-html/infopoint-html.service /etc/systemd/system/
 
  sudo systemctl daemon-reload
 
  sudo systemctl daemon-reload
echo "allowed_users = anybody" | sudo tee /etc/X11/Xwrapper.config    # systemd-logind session activation umgehen...
 
echo 'URL="http://localhost:8000/"' | sudo tee /etc/default/infopoint-html
 
 
  sudo systemctl enable s0infodisplay.service
 
  sudo systemctl enable s0infodisplay.service
 
  sudo systemctl enable infopoint-html.service
 
  sudo systemctl enable infopoint-html.service
 +
sudo systemctl enable pirscreencontrol.service
 +
 +
=== Troubleshooting ===
 +
* Wenn das Display mit einem schwarzen Rahmen angezeigt wird
 +
sudo raspi-config
 +
-> 7 Advanced Options -> A2 Overscan -> <no>

Version vom 8. Mai 2018, 19:04 Uhr

Infodisplay
Das Infodisplay im Flur des Spaces
Das Infodisplay im Flur des Spaces
Beschreibung: S0 Infodisplay
Kontakt: Kasa, larsan
Status: aktiv (Was heißt das?)
Quellcode: https://gitli.stratum0.org/kasalehlia/s0infodisplay/
Bewegungsmelder

Auf dem Serverschrank steht ein großer Full HD Fernseher, daran wurde eine Pi angeschlossen und ein bisschen Software geschrieben. Zu guter letzt bekam der Pi einen Bewegungsmelder, sodass der Fernseher nicht 24/7 laufen muss.

Auf dem Infodisplay stehen relevante Informationen zur Verfügung:

  • Uhrzeit und auf welche Entität der Space derzeit geöffnet ist
  • Katzenbilder
  • Wetter
  • Relative und absolute ÖPNV-Abfahrtszeiten von Haltestelle Hamburger Straße, sowie Ludwigstraße
  • Kalender
  • Visualisiert Stromverbrauch und Netzwerkdinge im Spacenetz
  • IRC-Channel

Das ganze ist derzeit auf Full-HD optimiert. Da die Software auf einer Webseite basiert (im Fullscreen angezeigt, aus dem Space-Netz erreichbar), ist sie theoretisch auf mehreren Displays deploybar.

Setup

Raspbian auf Raspberry Pi installieren. Dann:

Pakete installieren:

sudo apt -y install git firefox-esr xserver-xorg-legacy xserver-xorg x11-xserver-utils python3-rpi.gpio npm xinit libicu-dev nodejs unattended-upgrades
# oder auch 'firefox', je nach Verfügbarkeit

Libcec mit RPI build system fix bauen:

git clone https://github.com/Emantor/libcec
cd libcec && mkdir build && cd build
cmake -DRPI_INCLUDE_DIR=/opt/vc/include -DRPI_LIB_DIR=/opt/vc/lib ..

Darauf achten das nach dem cmake die Zeile

-- Raspberry Pi support:                   yes

auf yes steht. Dann:

make
sudo make install
sudo ldconfig

s0infodisplay macht lokal einen HTTP-Server und baut die HTML-Seite:

git clone https://gitli.stratum0.org/kasalehlia/s0infodisplay/
cd s0infodisplay/
virtualenv env
source env/bin/activate
pip install -r requirements.txt
python3 main.py

infopoint-html startet einen Firefox im Vollbild:

cd
git clone https://github.com/rohieb/infopoint-html.git
echo -e '#!/bin/sh\nexec /home/pi/infopoint-html/src/infopoint-html' | sudo tee /usr/bin/infopoint-html
sudo chmod +x /usr/bin/infopoint-html
echo 'URL="http://localhost:8000/"' | sudo tee /etc/default/infopoint-html

systemd-logind session activation für den X-Server umgehen:

sudo dpkg-reconfigure xserver-xorg-legacy   # hier dann die dritte Option, "Anybody", auswählen

systemd-Services installieren:

sudo cp s0infodisplay/s0infodisplay.service s0infodisplay/pirscreencontrol.service infopoint-html/infopoint-html.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable s0infodisplay.service
sudo systemctl enable infopoint-html.service
sudo systemctl enable pirscreencontrol.service

Troubleshooting

  • Wenn das Display mit einem schwarzen Rahmen angezeigt wird
sudo raspi-config
-> 7 Advanced Options -> A2 Overscan -> <no>