ETS2/ATS Telemetry Web Server + Mobile Dashboard

User avatar
Funbit
Posts: 120
Joined: 13 Feb 2014 09:23
Location: Tokyo
Contact:

ETS2/ATS Telemetry Web Server + Mobile Dashboard

#1 Post by Funbit » 27 Dec 2014 14:38

Hello guys!

I'm really a fan of telemetry SDK so I have created a web server that exposes ETS2/ATS telemetry data as a REST API.

I have also created an HTML5 mobile dashboard application that works in any modern browser (desktop or mobile). It uses WebSockets for data transferring (since 2.1.0). Android application included as well (Ets2Dashboard.apk)!

Look and feel

Here is a sample screenshot of how the dashboard may look like (default skin):
[ external image ]

And this is the main menu (added in version 2.0.0) where you can select a skin and server to connect to:
[ external image ]

Users are already working hard to include additional "real" truck skins! (and you may help too ;) )

This is the screen of server application:
[ external image ]

Installation

Starting from the version 2.0.0 the server installation process is a piece of cake, all you have to do is to run "server\Ets2Telemetry.exe" and click "Install" button:
[ external image ]

And you're good to go!

SDK

If you like to create a skin the dashboard you should read the tutorial available on Github.

If you like to create your own software you may use raw JSON data from the telemetry server. Here is a sample JSON response (http://localhost:25555/api/ets2/telemetry):

Code: Select all

{
   "game":{
      "connected":true,
      "paused":true,
      "time":"0001-01-08T21:09:00Z",
      "timeScale":19.0,
      "nextRestStopTime":"0001-01-01T10:11:00Z",
      "version":"1.10",
      "telemetryPluginVersion":"4"
   },
   "truck":{
      "id":"man",
      "make":"MAN",
      "model":"TGX",
      "speed":53.82604,
      ....
The server is written in C# and uses OWIN WebApi as a server solution (so you don't need IIS or whatever else).
It also uses official Telemetry SDK plugin (available on Github here). I have included a compiled plugin DLL in the package so you don't have to compile it by yourself.

FULL LIST OF SUPPORTED TELEMETRY DATA IS AVAILABLE HERE!

Hope that you'll like it :)

Download

Source code, pre-compiled server binaries and detailed instructions are available on Github here:
https://github.com/Funbit/ets2-telemetry-server ("Download ZIP" button at the right side)
^^^^^ DOWNLOAD ^^^^^

If you have a question, please read the FAQ first!

Windows XP is not supported!

Best regards,
Funbit
Last edited by Funbit on 14 Mar 2016 12:20, edited 11 times in total.
User avatar
ohaha
Posts: 11321
Joined: 07 Dec 2012 06:31
Location: Watchin' y'all
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#2 Post by ohaha » 27 Dec 2014 16:03

Wow!
So, I just need to install it, start the server then access it on my Android phone?
Or am I skipping some steps?
Retired, but still loving it.
User avatar
Sniper
Posts: 122
Joined: 07 Dec 2012 18:00
Location: The other side

Re: ETS2 Telemetry Web Server + Mobile Gauge

#3 Post by Sniper » 27 Dec 2014 22:09

From your readme:

Code: Select all

Sometimes D1 gear is not properly displayed on the screen (this is a bug in telemetry SDK)
AFAIK there is no such bug in the telemetry, let alone SDK.
GitHub: https://github.com/TheLazyTomcat
Programs download: https://www.dropbox.com/sh/lhz3m1n56ed7 ... 7c3ea?dl=0

If anyone will be contacting me, please be notified that I might not be able to respond for several months. Or at all.
User avatar
SiSL
SCS Software
Posts: 8680
Joined: 27 Oct 2013 06:23
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#4 Post by SiSL » 28 Dec 2014 00:17

For some reason it gives error at me on start...

Invalid call or something like that (translated)
User avatar
ohaha
Posts: 11321
Joined: 07 Dec 2012 06:31
Location: Watchin' y'all
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#5 Post by ohaha » 28 Dec 2014 02:19

It works for me. Kind of.
The server starts and detects the game. If I open the index link, in a browser on my PC, it seems to read the data, but, it doesn't load on my phone (connected to the same home wireless).
Retired, but still loving it.
User avatar
Funbit
Posts: 120
Joined: 13 Feb 2014 09:23
Location: Tokyo
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#6 Post by Funbit » 28 Dec 2014 04:13

ohaha wrote:So, I just need to install it, start the server then access it on my Android phone?
Or am I skipping some steps?
Yes. Here are exact instructions step by step:

1. Make sure that 25555 (default) port in opened in your Firewall. If you are not sure how to do that you can just run cmd.exe as Administrator and run the following command:

Code: Select all

netsh advfirewall firewall add rule name="ETS2 TELEMETRY SERVER" dir=in action=allow protocol=TCP localport=25555 remoteip=localsubnet
The screen should look like this:
[ external image ]

2. 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
3. Run "server/Ets2Telemetry.exe" (you have to run it as Administrator if you want to connect from other devices connected to your local network!)
4. Run the game
5. Connect your iPhone or Android to the same network as your PC (Wi-Fi), open "ETS2 App URL" in a browser and rotate device to landscape mode. The URL will be something like: "http://aaa.bbb.ccc.ddd:25555/apps/ets2/index.htm" , where abcd is your PC's IP (it is displayed in the application window)
5. Play!

The more detailed instructions are available on the server's github page.
Sniper wrote:AFAIK there is no such bug in the telemetry, let alone SDK.
Okay, I'm not sure if it is a bug or a feature, but I can definitely say that if I start my engine and switch the gear to D1 (displayed on the truck's gauge inside the game) - the telemetry plugin still reports 0 in the memory mapped structure. When gear is changed to D2 - the plugin changes 0 to 2.
SiSL wrote:For some reason it gives error at me on start...
Invalid call or something like that (translated)
Unfortunately you didn't say anything about your environment... But just in case I should warn everybody that "Windows XP" is not supported.
Only Windows 7 and Windows 8 are well tested. I don't have Windows Vista but the server should work fine on it as well.
ohaha wrote:It works for me. Kind of.
The server starts and detects the game. If I open the index link, in a browser on my PC, it seems to read the data, but, it doesn't load on my phone (connected to the same home wireless).
1. Check your Firewall and make sure that 25555 is opened (please see my first reply explaining how to do that).
2. Make sure that you run "server/Ets2Telemetry.exe" as Administrator, so the server can bind on external IPs (otherwise only localhost will be available).
The URLs must start with IP (not localhost). For example, on my machine it looks like: "http://192.168.1.5:25555/apps/ets2/index.htm".
3. If you still can't connect - please check the IP displayed on your device's WiFi settings, it must be from the same subnet.
For example, if server's IP is "192.168.1.5", the IP on the device must be: 192.168.1.NNN, (not 192.168.0.NNN, which is a different subnet).

If anybody has questions please let me know.
User avatar
ohaha
Posts: 11321
Joined: 07 Dec 2012 06:31
Location: Watchin' y'all
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#7 Post by ohaha » 28 Dec 2014 07:59

When it displays 0 or Neutral, though you're in drive or reverse, is not a bug. This is how the game works. In full stop, it switches to neutral, internally, though the game ui remembers the gear you're in, and shows it.
I noticed it a long time ago, with Whiler's plugin for Logitech keyboard.
I will try again to see what happens. I already followed the instructions from github, and, at one point it displayed the app window, on my phone, but kept saying "Simulator not running", both on phone and pc.
Then, I realised I had -64bit parameter in launch shortcut. After removing it, it started informing about sdk features being used, at game start, which wasn't happening before.
Maybe you should also make the server check if that's properly activated, not only the game.
I'll be back with more. Now I have to check how the phone connects, because I had a custom DNS server (my isp had some issues, a while ago).
Retired, but still loving it.
User avatar
Sniper
Posts: 122
Joined: 07 Dec 2012 18:00
Location: The other side

Re: ETS2 Telemetry Web Server + Mobile Gauge

#8 Post by Sniper » 28 Dec 2014 08:51

To run this for 64bit game, you need 64bit plugin (which at this moment is not provided by the author), and put it in the right folder (...\win_x64\plugins\).
GitHub: https://github.com/TheLazyTomcat
Programs download: https://www.dropbox.com/sh/lhz3m1n56ed7 ... 7c3ea?dl=0

If anyone will be contacting me, please be notified that I might not be able to respond for several months. Or at all.
User avatar
Funbit
Posts: 120
Joined: 13 Feb 2014 09:23
Location: Tokyo
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#9 Post by Funbit » 28 Dec 2014 10:00

Sniper wrote:To run this for 64bit game, you need 64bit plugin (which at this moment is not provided by the author), and put it in the right folder (...\win_x64\plugins\).
This is correct, the included telemetry plugin DLL is 32-bit only, so 64-bit version of the game is not supported for now (though, it is has nothing do to with the server itself, it is just about telemetry plugin).
ohaha wrote:When it displays 0 or Neutral, though you're in drive or reverse, is not a bug. This is how the game works. In full stop, it switches to neutral, internally, though the game ui remembers the gear you're in, and shows it.
I'm not sure that we're talking about the same thing... When I'm on neutral, I switch my gear using my G27 to D1, game displays that it is D1 now, but telemetry reports 0 (neutral). How come that this is correct behavior?
ohaha wrote:Maybe you should also make the server check if that's properly activated, not only the game.
I'm going to implement such check, would be helpful indeed.
User avatar
SiSL
SCS Software
Posts: 8680
Joined: 27 Oct 2013 06:23
Contact:

Re: ETS2 Telemetry Web Server + Mobile Gauge

#10 Post by SiSL » 28 Dec 2014 10:46

I'm using Windows 8.1 64-bit...

I placed plugin to x86/bin/plugins directory...

I placed server part to somewhere else... server directory also need to be in bin folder?

PS: Tested on x86 version of the game...
Last edited by SiSL on 28 Dec 2014 10:58, edited 1 time in total.
Post Reply

Return to “General discussion about the game”

Who is online

Users browsing this forum: No registered users