A Python based version of the ETS2 Local Radio application with real-time coordinate tracking for Linux systems. Still in development. This application does NOT have feature parity with https://github.com/Koenvh1/ets2-local-radio. Requires the native Linux version of ETS2. It will not work with Proton.
- Real-time Position Tracking: Uses jackz314 ETS2 SDK plugin fork for Linux for live coordinate monitoring
- Multi-country Support: Supports radio stations from multiple European countries
- Web Interface: Modern, responsive web interface with real-time updates
- Location-based Radio: Automatic station switching based on your truck's location
- Signal Strength Simulation: Realistic signal strength calculation based on distance from cities
- Controller input: Switch channels using a controller (on my wishlist but not sure this is feasible with Python/Flask)
- Static interference: Interference like Koenvh1's version when signal strength is low.
- Clone the repository:
git clone https://github.com/macaon/ets2-local-radio-linux
cd ets2-local-radio- Create and activate venv:
python3 -m venv venv
source venv/bin/activate- Install Python dependencies:
pip install -r requirements.txt- Compile and install ETS2 SDK plugin:
# Clone and build the plugin
git clone https://github.com/jackz314/scs-sdk-plugin.git
cd scs-sdk-plugin
# Build
mkdir build && cd build
cmake .. && make
# Install to ETS2
cp *.so ~/.local/share/Steam/steamapps/common/Euro\ Truck\ Simulator\ 2/bin/linux_x64/plugins/- Download cities data:
- Download cities.json from https://github.com/Koenvh1/ETS2-City-Coordinate-Retriever and place it into the base script directory. (It's possible that this file is grossly outdated, but for now this is what the script is working with).
source venv/bin/activate
python main.pyThe application will start and be available at http://localhost:5000
You can configure the application by modifying config.py or using environment variables:
ETS2_HOST: Server host (default: 0.0.0.0)ETS2_PORT: Server port (default: 5000)ETS2_DEBUG: Enable debug mode (default: false)
- Open
http://localhost:5000in your browser - If telemetry is connected, drive around in ETS2.
- Manual station selection is always available regardless of telemetry status
- RadioController: Main application logic and state management
- BackgroundMonitor: Background thread for coordinate monitoring
- ETS2CoordinateReader: Telemetry plugin integration
- ETS2CityDatabase: City data loading and querying
- StationManager: Radio station management and parsing
GET /: Web interfaceGET /api/status: Complete application statusGET /api/stations/<country>: Stations for a specific countryGET /api/cities/<country>: Cities for a specific countryGET /api/random_station: Random station for current countryPOST /api/reload_stations: Reload stations from remote sourceGET /api/coordinates: Current coordinates
- New telemetry sources: Extend
telemetry/coordinate_reader.py - New data sources: Add modules to
data/package - New web features: Add routes to
web/routes.py - New utilities: Add functions to
utils/package
-
"ETS2 telemetry plugin not found"
- Install the ETS2 telemetry plugin
- Ensure ETS2 is running with the plugin active (you should be notified about SDK features when launching the game)
- Check that
/dev/shm/SCS/SCSTelemetryexists
-
"No stations available"
- Check internet connection for remote station loading (shamelessly uses https://localradio.koenvh.nl/stations/stations-europe.js)
- Verify
stations.jsonfile format if using local stations - Try reloading stations via the web interface
-
"Connection error"
- Ensure the application is running
- Check that port 5000 is not blocked
- Verify Flask is properly installed
Enable debug mode for detailed logging:
export ETS2_DEBUG=true
python main.py- Fork the repository
- Create a feature branch
- Make your changes following the modular architecture
- Add tests for new functionality
- Submit a pull request
- Original ETS2 Local Radio: https://github.com/Koenvh1/ets2-local-radio/
- Station data: https://localradio.koenvh.nl/
- ETS2 Telemetry Plugin: Various contributors to the ETS2 modding community (https://github.com/jackz314, https://github.com/RenCloud, https://github.com/nlhans)