Infoscreen for Azubiwerk München that displays departures of public transport and changing, custom news.
-
Departure times are fetched from API of local transport operator MVG for specific station and displayed on a webpage.
-
Custom news are displayed alternating, switching is automatic with custom interval.
Settings can be changed in admin portal:
- Uploading of new news
- Deleting news
- Changing departure api url
- Setting intervals for switching news, updating departures and reloading page (Interval for reloading page is required to get new settings if Infoscreen is displayed on kiosk screen like FullPageOS)
- Download files from the repository and upload them to your PHP webserver
- Remove
.gitignore,LICENSEandREADME.md - Rename
config_sample.jsontoconfig.json - Protect at least the
admindirectory, better the whole Infoscreen, with a login (e.g..htaccessand.htpasswd)- Example for
.htaccess:AuthType Basic AuthName "Restricted Area" AuthUserFile /path/to/.htpasswd Require valid-user
- Example for
.htpasswd:username:hashed_password
- Example for
- Access the admin-page in your browser and change settings depending on specific requirements
- Access the index-file to view Infoscreen
-
Write FullPageOS image to SD card using Raspberry Pi Imager
- The image is located in
Other specific-purpose OS->FullPageOS - Nightly build is recommended (tested with version 0.14.0)
- Set ssh username, ssh password, timezone and keyboard layout in imager settings (
Strg+Shift+X). Setting Wi-Fi credentials and hostname here is not tested.
- The image is located in
-
Edit configs on boot partition of SD card
- Set URL to webserver in
fullpageos.txt - Set Wi-Fi credentials in
wifi.nmconnection(if needed) - Change
splash.pngfor a custom boot logo (optional)
- Set URL to webserver in
-
Insert SD card into Raspberry Pi and boot
-
Connect to Raspberry Pi via SSH
-
Change VNC password (recommended)
sudo ~/scripts/setX11vncPass yourpasswordReplace
yourpasswordwith your desired password, reboot to apply changes. -
Optionally change the background image in
/opt/custompios/background.png. It can be uploaded viascp. -
Done. The Infoscreen now should be displayed on the screen connected to the Raspberry Pi.
If the Infoscreen is protected with a login, you need to extend some of the scripts located in ~/scripts/. The following changes work if the login can be automatically filled by the Chromium password manager and just need to be sent with the enter key, for example if the login is protected with http basic auth using .htaccess and .htpasswd.
-
Connect to Raspberry Pi via VNC or physical keyboard and mouse, login to your Infoscreen and store the credentials in Chromium password manager.
-
Edit
~/scripts/start_chromium_browser:Original file: https://github.com/guysoft/FullPageOS/blob/devel/src/modules/fullpageos/filesystem/opt/custompios/scripts/start_chromium_browser
-
Add the following line before the standard behavior
chromium-browsercommand (before line 17 in original file):/opt/custompios/scripts/login & -
Optionally add the following to the beginning of the file after the shebang line
#!/bin/bash(after line 1 in original file):export DISPLAY=:0 WID=$(xdotool search --onlyvisible --class chromium|head -1) xdotool windowactivate ${WID} xdotool mousemove 50 50
This moves the mouse to the top left corner of the screen to indicate that chromium is now starting.
-
-
Add the script
~/scripts/loginwith the following content:#!/bin/bash export DISPLAY=:0 WID=$(xdotool search --onlyvisible --class chromium|head -1) xdotool windowactivate ${WID} sleep 10 xdotool key Return xdotool mousemove 10000 10000
-
Make the script executable:
chmod +x ~/scripts/login -
Reboot the Raspberry Pi, the Infoscreen should be displayed on the screen connected to the Raspberry Pi and the login should be automatically filled and submitted.
-
If the login is not automatically filled and submitted, you can try to increase the sleep time in the script
~/scripts/loginto give Chromium more time to load the page.