Skip to content

thorerik/ets2-telemetry-server

 
 

Repository files navigation

ETS2 Telemetry Web Server

This is a modern ETS2 Telemetry Web Server written in C# and WebApi. The server exposes the following endpoints:

Telemetry REST API

GET http://localhost:25555/api/ets2/telemetry

It returns IEts2TelemetryData JSON object with the latest telemetry data read from the game. The state is updated upon every API call. You may use this REST API for your own Applications.

Please note that GET responses may be cached by your HTTP client. To avoid caching you may use some random query string parameter or use POST method instead.

Telemetry HTML5 Mobile Application

http://localhost:25555/apps/ets2/index.htm

This application is designed for mobile browsers running in landscape mode. You should open the URL in your Mobile Safari (iPhone 8+) or Android 4+ Browsers (Default or Chrome).

Here is a screenshot of how your mobile gauge will look like:

Installation and Usage

Supported OS and Devices

  • Windows Vista, Windows 7 or Windows 8 (32-bit or 64-bit)
  • Euro Truck Simulator 2 (32-bit only for now!)
  • .NET Framework 4.5 (pre-installed in Windows 8+)
  • iPhone OS 8+ (using built-in Mobile Safari) or Android 4+ devices (using Default or Chrome browser). It is recommended to create a shortcut for the application on the Home screen to automatically remove browser's navigation bar. Warning: since it is not possible to prevent Android device from going into sleep from a web page you must turn sleep mode off in the device's settings (or use third party apps that are capable of turning off sleep mode by application)

Installation

  1. Copy plugins/ets2-telemetry.dll to your SteamApps\common\Euro Truck Simulator 2\bin\win_x86\plugins directory. If plugins directory does not exist you must create it first. Note: If you don't trust my compiled ets2-telemetry.dll you may compile it by yourself from the official SDK.

  2. Make sure that 25555 (default) port in opened in your Firewall (you may change the port number inside Ets2Telemetry.exe.config). If you are not sure how to configure the Firewall just run cmd.exe as Administrator and execute the following command:

    netsh advfirewall firewall add rule name="ETS2 TELEMETRY SERVER" dir=in action=allow protocol=TCP localport=25555 remoteip=localsubnet

Usage

  1. Run server/Ets2Telemetry.exe (you have to run it as Administrator if you want to connect from other devices connected to your local network!).
  2. Run the game.
  3. Connect your iPhone or Android to the same network as your PC (Wi-Fi for example), open ETS2 App URL in a browser and rotate device to landscape mode.
  4. Enjoy your mobile gauge while playing your favorite simulator!

Known problems:

  • Sometimes due to browser bugs the gauge may not fit exactly in your mobile screen. If it happens to you the first thing you should try is to rotate the device to portrait mode and then back to landscape. Usually it fixes the problem.
  • Sometimes D1 gear is not properly displayed on the screen

External links

License

MIT.

About

ETS2 Telemetry Web Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 62.7%
  • CSS 13.5%
  • TypeScript 12.1%
  • JavaScript 11.7%