3.7 KiB
SL Transport Departures Display
A digital signage system for displaying transit departures, weather information, and news tickers. Perfect for Raspberry Pi-based information displays.
Features
- Real-time transit departure information
- Current weather and hourly forecast
- News ticker with RSS feed integration
- Multiple screen orientation support (0°, 90°, 180°, 270°)
- Dark mode with automatic switching based on sunrise/sunset
- Custom background image support
- Configurable ticker speed
- Responsive design for various screen sizes
Quick Start
- Clone this repository
- Run the server:
node server.js - Open a browser and navigate to:
http://localhost:3002
System Requirements
- Node.js (v12 or higher)
- Modern web browser with CSS3 support
- Internet connection for API access
Raspberry Pi Setup
For a dedicated display on Raspberry Pi, we've included a setup script that:
- Installs Node.js if needed
- Creates a systemd service to run the server on boot
- Sets up Chromium to launch in kiosk mode on startup
- Disables screen blanking and screensaver
- Creates a desktop shortcut for manual launch
To set up on Raspberry Pi:
# Clone the repository
git clone https://github.com/yourusername/sl-departures-display.git
cd sl-departures-display
# Make the setup script executable
chmod +x raspberry-pi-setup.sh
# Run the setup script as root
sudo ./raspberry-pi-setup.sh
# Reboot to apply all changes
sudo reboot
Configuration
Changing Transit Stop
To display departures for a different transit stop, modify the API_URL in server.js:
const API_URL = 'https://transport.integration.sl.se/v1/sites/YOUR_SITE_ID/departures';
Changing Weather Location
To display weather for a different location, modify the latitude and longitude in index.html:
window.weatherManager = new WeatherManager({
latitude: YOUR_LATITUDE,
longitude: YOUR_LONGITUDE
});
Changing RSS Feed
To display a different news source, modify the RSS_URL in server.js:
const RSS_URL = 'https://your-rss-feed-url.xml';
UI Settings
The gear icon in the top-right corner opens the settings panel where you can configure:
- Screen orientation
- Dark mode (auto/on/off)
- Background image and opacity
- Ticker speed
Settings are saved to localStorage and persist across sessions.
Architecture
The system consists of the following components:
- Node.js Server - Handles API proxying and serves static files
- Configuration Manager - Manages system settings and UI customization
- Weather Component - Displays weather data and manages dark mode
- Clock Component - Shows current time and date
- Ticker Component - Displays scrolling news from RSS feeds
- Main UI - Responsive layout with multiple orientation support
Documentation
For detailed documentation, see documentation.md.
Troubleshooting
Common Issues:
-
Server won't start
- Check if port 3002 is already in use
- Ensure Node.js is installed correctly
-
No departures displayed
- Verify internet connection
- Check server console for API errors
- Ensure the site ID is correct (currently set to 9636)
-
Weather data not loading
- Check OpenWeatherMap API key
- Verify internet connection
- Look for errors in browser console
-
Ticker not scrolling
- Check if RSS feed is accessible
- Verify ticker speed setting is not set to 0
- Look for JavaScript errors in console
License
MIT License
Acknowledgements
- OpenWeatherMap for weather data
- SL Transport API for departure information
