- Notifications
You must be signed in to change notification settings - Fork2
RMV Departures Raspberry Pi Display
License
felixdivo/rmv-rpi-display
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a small piece of software allowing bus and tram departures for some station to be shown on a small e-ink display.
It is specific for the RMV, theRhein-Main-Verkehrsverbund, a regional Hessian public transport provider.It interfaces with theiropen data portal, but should work with most HAFAS APIs with only minor modifications.
It uses an (overkill) Raspeberry Pi 3, as the case was already designed for that.The case can be 3D printed from the files given in3d-print-template/
.The display we used was the2.9inch E-Ink Module 296x128/2.9inch e-Paper Module byWaveshare. Links to:Amazon,Waveshare Wiki. The required "drivers" are inepd2in9/
.
This assumes that you have an API token obtained fromRMV Open Data.
Download and installRaspbian Lite. This was tested with versionBuster, late 2019. Also configure it such that internet access is possible. Seeheadless setup.
(Optional.) Update the system initially and reboot.
sudo apt updatesudo apt full-upgradesudo reboot now
- (Optional.) Enable automatic updates.
# install:sudo apt install unattended-upgrades -y# configure:sudo dpkg-reconfigure -plow unattended-upgrades
- Install some dependencies
sudo apt install git python3-pip python3-pil python3-spidev python3-rpi.gpio python3-dateutil fonts-lato -y
Adjust the timezone to (for example) Germany/Berlin. This can be done from within
sudo raspi-config
and checked with thedate
command. Restart after this just to be sure. ;)Clone the git repo onto the Pi. This assumes that the code was cloned into
/home/pi
, making the entry point sit at/home/pi/rmv-rpi-display/app.py
.
git clone https://github.com/felixdivo/rmv-rpi-display.git
- Adjust
API_TOKEN
,ORIGIN_ID
andDESTINATION_ID
inrmv_api.py
. The IDs are taken from the first row ("HAFAS_ID") of the official list of stations found on theRMV Open Data platform. Test execute it with:
cd the/directory/where/you/placed/it/python3 app.py
- Make it start automatically. Add the following line on the line before the final
exit 0
of/etc/rc.local
(if you cloned it into/home/pi
):
su pi -c"python3 /home/pi/rmv-rpi-display/app.py &"
- Pure happiness and never being late for the bus or tram.
MIT LicenseCopyright (c) 2019 Felix Divo & Jonas WeidmannPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.