Skip to content

kniffen/TruckSim-Telemetry

Repository files navigation

TruckSim-Telemetry

TruckSim-Telemetry provides telemetry data and events for Euro Truck Simulator 2 and American Truck Simulator via the scs-sdk-plugin.

NPM

Node version NPM Downloads Github Licence Discord

Current supported version of scs-sdk-plugin
v1.12.1

Documentation

Read the full documentation over at https://kniffen.dev/TruckSim-Telemetry

Features

  • Real-time data: Access telemetry data from ETS2/ATS.
  • Event-driven: Emits events for various in-game occurrences (job, truck, navigation, etc.).
  • Cross-platform: Works on Windows, Linux and macOS.
  • Lightweight: Native C/C++ addon, zero dependencies.

Installation

Windows

  1. Download and install the scs-sdk-plugin by RenCloud.
  2. Install Node.js and the C++ build tools. The recommended way is to install the "Desktop development with C++" workload from the Visual Studio Build Tools.
  3. Install the package via NPM:
    npm install trucksim-telemetry

Linux/Mac OS

  1. Download and install the scs-sdk-plugin fork by truckermudgeon. Note: You may have to build this from source.
  2. Install the necessary build tools for your platform (e.g., build-essential on Debian/Ubuntu, Xcode Command Line Tools on macOS).
  3. Install the package via NPM:
    npm install trucksim-telemetry

How to use

For additional examples and explanations, see the full documentation over at https://kniffen.dev/TruckSim-Telemetry

import { truckSimTelemetry } from 'trucksim-telemetry';

const telemetry = truckSimTelemetry();

telemetry.on('connected', () => {
  console.log('SDK connected');
});

telemetry.on('job-started', (data) => {
  console.log('New job started', data);
});

Known issues

refuel-paid event not emitting

This seems to be a problem with the underlying SDK plugin. It appears to only trigger once per game session.

Demo

To help visualize the data, you can use this Demo app.

demo screenshot

License

This project is provided under the MIT License - see the LICENSE file for details

About

Telemetry data from the scs-sdk-plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5