Raspberry Pi based real time Vienna public transport monitor using a triple color E-ink display
Get public transport information instantly, like being at a real station!
Öffis → austrian slang for public transport
more pictures in the pics folder
⚠️ Unfortunately, my 7.5inch E-Ink display broke. So I cannot update this project anymore. Feel free to fork this project and tinker by yourself!
- Displays ÖBB and Wiener Linien public transport times, Citybike Wien station capacities and weather at a glance
- Intuitive UI, see time, stations with their lines and weather on a 7.5 inch E-ink screen
- Config file for easier configuring without changing code
- Citybike Wien API for CitybikeWien station data, written in Python3
- juliuste's oebb for getting the ETA of the upcoming ÖBB trains as a countdown in minutes
- Wiener Linien API for getting the ETA of upcoming busses, trams or metros as a countdown in minutes, written in Python3
- yr.no API for weather data, written in Python3
- 640x384, 7.5inch E-Ink display HAT Model B (Red, Black, White) for Raspberry Pi → waveshare.com, amazon.com, amazon.at
- Raspberry Pi Zero W with soldered headers or any Raspberry Pi 2 and up (tested with zero W and PI 3B+) → Raspberry Pi Website, conrad.at, or search at amazon.at.
- Class 10 Micro SD Card with at least 8GB (16GB recommended) for the Raspberry Pi.
- A typical 5V micro USB phone charger to charge the Raspberry Pi
- Setup the Raspberry Pi. You can find a manual on how to and official images for
Raspbian
(recommended) at the Raspberry Pi Download Page.- If you wish to not use
Raspbian
, you have to do parts of theoeffis-paper
setup later by yourself. These parts will be prompted to you. - If you choose the Raspbian image, the
scripts/setup.sh
script will later install all required dependencies, fonts and assets for you.
- If you wish to not use
- Assemble the Waveshare E-Ink Display and HAT as written in the waveshare manual and connect it to the Raspberry Pi. Since the HAT can be plugged directly onto the GPIO headers, this process should not be to difficult. Don't forget to activate the Pi's SPI!
- Optionally print some case for the
oeffis-paper
hardware or use a picture frame. This is what I used: IKEA Ribba
Install git
(sudo apt install git
) and run the following code:
git clone https://github.com/djaffry/oeffis-paper.git ~/oeffis-paper
An example config.json can be found in the root directory. Descriptions to the different key-value pairs can be found in the respective classes or here:
-
display
(json) - display relevant configurationsrenderOffset
(int, optional) - corrects displayed time and minutes until arrival by this offset in minutes, counters display hysteresisupdateInterval
(int) - the display will try to update everyupdateInterval
seconds. due to delay, sometimes this is not possibletitle
(string) - title displayed in the upper left corner of display
-
stations
(json) - station relevant configurationsavgWaitingTime
(int) - time which is acceptable to wait for transport at a stationwalkingTime
(array[json]) - how long it takes to walk to a stationstation
(string) - station name to walk totime
(int) - how long it takes to walk to that station in minutes
-
api
(json) - api relevant configurations-
citybikewien
(json, optional) - citybikewien configurationsupdateInterval
(int) - minimum of how long until the next API call should be made in secondsstations
(array[json]) - jsons with station ids and valuesid
(int) - id of station (see Citybike Wien Data)rename
(str, optional) - use this value instead of the api's station name
-
oebb
(json, optional) - ÖBB configurationsupdateInterval
(int) - minimum of how long until the next API call should be made in secondsconnections
(array[json]) - jsons of connectionsfrom
(string) - departure station oebb id (see ÖBB Data)to
(string) - destination station oebb id (see ÖBB Data)
rename
(array[json], optional) - to rename stationsold
(string) - old name to be replaced, so it can be merged by name with other stationsnew
(string) - new name to be renamed into
-
wrlinien
(json, optional) - Wiener Linien configurationsupdateInterval
(int) - minimum of how long until the next API call should be made in secondskey
(string) - Wiener Linien API key (see Wiener Linien Data)rbls
(array[int]) - Array of rbls (Wiener Linien station ids, see below)
-
yrno
(json, optional) - yr.no configurationsupdateInterval
(int) - minimum of how long until the next API call should be made in secondscity
(string) - name of the city (see YR.NO Data)province
(string) - name of the province (see YR.NO Data)country
(string) - name of the country (see YR.NO Data)
-
The Citybike Wien station names and id's can be extracted from CitybikeWien Liste.
The id
can be found left to the station's name. Example Station Rathausplatz: 110 RATHAUSPLATZ
therefore "id": 110
.
To get the necessary ÖBB Station IDs use djaffry/oebb-stations.
Important: You will need a Wiener Linien API Key to access the Wiener Linien API. They are free and you can apply for one using this form.
To get the RBL to your station, you have to look them up in the csv
files at data.gv.at.
By looking up your HALTESTELLEN_ID in csv-haltestellen
and the LINIEN_id in csv-linien
you can defer the right row for the RBL_NUMMER (rbl
) in csv-steige
.
Or have a look here: https://till.mabe.at/rbl/
To find the right city, province and country name, just search for your location at yr.no,
go to the respective site of the city. Then use the parts after place
in the URL for the values as country/province/city
.
Example: Bischofshofen, AT https://www.yr.no/place/Austria/Salzburg/Bischofshofen/ Results in:
{
...
"country": "Austria",
"province": "Salzburg",
"city": "Bischofshofen"
}
A setup.sh
script can be found in the scripts directory. Running it will resolve all dependencies.
setup.sh
will also fix the waveshare libraries imports and some arithmetic errors in the waveshare library using patches which can be found in the patches subdirectory.
You can run ./setup.sh
anytime again to update dependencies, fonts and assets.
cd ~/oeffis-paper/scripts
./setup.sh
Further two scripts can be found in scripts:
- Use
./start.sh
to run in background. This process does not get killed when closing thessh
connection used to start the process. - Use
./kill.sh
to kill the current background process.