dublinbus-display
Go to file
Nahuel Lofeudo 471794c461 In the status line, don't show the current time's seconds. 2023-04-23 15:58:09 +01:00
.ipynb_checkpoints Added some code to automatically refresh the feed file if it changed 2023-04-16 10:13:52 +01:00
.vscode Added some code to automatically refresh the feed file if it changed 2023-04-16 10:13:52 +01:00
Enclosure Updated enclosure FreeCad file. 2023-03-04 16:23:09 +00:00
systemd Added service file. Improvements to the readme. 2022-12-18 18:53:22 +00:00
.gitignore Added api-key.txt to gitignore 2023-04-22 11:29:15 +01:00
LICENSE Initial commit 2022-09-11 02:59:00 -07:00
README.md Update dependencies in the Readme 2023-04-22 08:04:28 +01:00
api-key.txt Moved the NTA API Key to a separate file so I don't need to worry about accidentally committing it. 2023-04-22 11:28:04 +01:00
arrival_times.py If the arrival is due in > 99min, show the arrival time instead 2023-04-23 06:32:26 +01:00
gtfs_client.py Why on Earth was I loading shapes.txt??? 2023-04-23 15:53:53 +01:00
main.py In the status line, don't show the current time's seconds. 2023-04-23 15:58:09 +01:00
refresh_feed.py Added some code to automatically refresh the feed file if it changed 2023-04-16 10:13:52 +01:00
requirements.txt First version 2022-09-11 11:12:51 +01:00

README.md

dublinbus-display

Emulates a Dublin Bus electronic sign, showing ETAs for different bus lines

How to use it

  1. Clone the repository into your /home/pi directory.
  2. (optional) Configure the Raspberry Pi to use the non-standard display.
  3. Install all dependencies.
  4. Download the TTF font into the program's directory.
  5. Change main.py, updating STOPS to reflect the stop(s) you want to watch.
  6. Run main.py

1. Configure the Raspberry Pi (pi-specific)

1.1 - Disable boot messages

Open /boot/cmdline.txt and add the parameter quiet at the end of the line.

1.2 - Configure the display aspect ratio (only for ultrawide monitors)

If you plan on using an ultrawide monitor with a similar aspect ratio as the actual Dublin Bus displays (e.g. HSD123KPW2-D10), add the following lines to your /boot/config.txt:

framebuffer_width=1920
framebuffer_height=720

hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=87
disable_overscan=1
hdmi_timings=1920 0 88 44 148 720 0 4 5 36 0 0 0 60 0 100980000 1

If your display's resolution is not 1920x720, you will also need to change the code to adapt to your specific size.

2. Install all dependencies

  • iso8601
  • zeep
  • libSDL2_ttf-2.0.so.0
  • python3-numpy
  • python3-pandas
  • python3-fiona
  • python3-pyproj (to build gtfs_kit2)
  • libspatialindex-c6
$ sudo apt install python3-iso8601 python3-zeep libsdl2-ttf-2.0-0 python3-numpy python3-pandas python3-fiona python3-pyproj libspatialindex-c6
  • pygame 2
  • GTFS-Kit
$ sudo pip3 install pygame gtfs_kit

3. Set up the services

3.1 - Disable login on tty1:

$ sudo systemctl disable getty@tty1
$ sudo systemctl stop getty@tty1

3.2 - Create a service file to auto-start the display program

First, create a link from the provided systemd service into the systemd directory

$ sudo ln -s /home/pi/dublinbus-display/systemd/dublinbus-display.service /etc/systemd/system/

Enable and start the service

$ sudo systemctl daemon-reload
$ sudo systemctl enable dublinbus-display
$ sudo systemctl start dublinbus-display

Restart the system

$ sudo reboot