Initial commit: Digital signage system for transit departures, weather, and news ticker
This commit is contained in:
142
README.md
Normal file
142
README.md
Normal file
@@ -0,0 +1,142 @@
|
||||
# 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
|
||||
|
||||
1. Clone this repository
|
||||
2. Run the server: `node server.js`
|
||||
3. 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:
|
||||
|
||||
1. Installs Node.js if needed
|
||||
2. Creates a systemd service to run the server on boot
|
||||
3. Sets up Chromium to launch in kiosk mode on startup
|
||||
4. Disables screen blanking and screensaver
|
||||
5. Creates a desktop shortcut for manual launch
|
||||
|
||||
To set up on Raspberry Pi:
|
||||
|
||||
```bash
|
||||
# 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:
|
||||
|
||||
```javascript
|
||||
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:
|
||||
|
||||
```javascript
|
||||
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:
|
||||
|
||||
```javascript
|
||||
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:
|
||||
|
||||
1. **Node.js Server** - Handles API proxying and serves static files
|
||||
2. **Configuration Manager** - Manages system settings and UI customization
|
||||
3. **Weather Component** - Displays weather data and manages dark mode
|
||||
4. **Clock Component** - Shows current time and date
|
||||
5. **Ticker Component** - Displays scrolling news from RSS feeds
|
||||
6. **Main UI** - Responsive layout with multiple orientation support
|
||||
|
||||
## Documentation
|
||||
|
||||
For detailed documentation, see [documentation.md](documentation.md).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues:
|
||||
|
||||
1. **Server won't start**
|
||||
- Check if port 3002 is already in use
|
||||
- Ensure Node.js is installed correctly
|
||||
|
||||
2. **No departures displayed**
|
||||
- Verify internet connection
|
||||
- Check server console for API errors
|
||||
- Ensure the site ID is correct (currently set to 9636)
|
||||
|
||||
3. **Weather data not loading**
|
||||
- Check OpenWeatherMap API key
|
||||
- Verify internet connection
|
||||
- Look for errors in browser console
|
||||
|
||||
4. **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
|
||||
Reference in New Issue
Block a user