Add support for live London Underground and DLR departures#156
Closed
omega1119 wants to merge 4 commits into
Closed
Add support for live London Underground and DLR departures#156omega1119 wants to merge 4 commits into
omega1119 wants to merge 4 commits into
Conversation
added 4 commits
June 9, 2026 09:30
- Only recreate viewports when data actually changes - Reuse existing viewport between refresh cycles - Separates data refresh from rendering for smooth animations - Includes tube disruption message support and direction filtering
- tubeDirection='westbound' now correctly maps to direction='inbound' in API - tubeDirection='eastbound' maps to direction='outbound' - Fixes issue where compass direction filters were never matching - When westbound service is available, it will now display correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a major new feature: support for live London Underground and DLR departures using the TfL Unified API, selectable via a new
modeenvironment variable. It also updates configuration, documentation, and display logic to support this new mode, while maintaining compatibility with the existing National Rail departures. Below are the most important changes:New Feature: TfL Underground/DLR Departures
modetotube. The display now renders an Underground-style next-train board with arrival order, destination, and a live countdown, as well as a scrolling status line showing platform and live train location. No API key is required for TfL, but an optionaltflAppKeycan be provided to increase rate limits. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]Configuration and Environment Variables
balena.ymland documentation to add new environment variables:mode,tubeLine,tubeDirection, andtflAppKey. These allow selection of data source, filtering by line or direction, and configuration for both National Rail and TfL modes. [1] [2] [3] [4] [5] [6]Display and Rendering Logic
main.pyto support the TfL board layout, including destination, countdown, and a scrolling status line. The startup screen now displays "Powered by Transport for London" when in tube mode. [1] [2] [3] [4] [5] [6]Documentation Updates
README.mdand configuration docs to describe the new TfL mode, clarify which API keys are required, and provide instructions and notes for using tube mode, including differences in filtering and display compared to National Rail. [1] [2] [3] [4]Versioning
0.8.0to reflect the addition of the new feature. [1] [2]…ied API