npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@groupe-savoy/nestjs-teltonika

v0.1.0

Published

A NestJS library for easily integrating Teltonika devices.

Downloads

8

Readme

nestjs-teltonika

A NestJS module for integrating Teltonika telematics devices using the Teltonika SDK. It provides decorators and services to easily handle TCP and TLS connections with Teltonika devices, enabling seamless GPS tracking and IoT integrations.

The module supports several use cases:

  • TCP Server: A ready-to-use TCP server for communicating with Teltonika devices
  • TLS Server: A secure TLS server for encrypted communications
  • Event Handling: Decorators for listening to device events like data reception and initialization
  • Command Sending: Utilities for sending GPRS commands to devices

Installation

Install the module via npm:

npm install @groupe-savoy/nestjs-teltonika

Usage

Below is a basic example showing how to use the module. For more advanced examples, see the examples directory.

Setting Up a TCP Server

The following example shows how to create a TCP server to receive data from Teltonika devices. First, configure your AppModule to import the TeltonikaTCPModule:

import { Module } from '@nestjs/common';
import { TeltonikaTCPModule } from '@groupe-savoy/nestjs-teltonika';

@Module({
  imports: [
    TeltonikaTCPModule.forRoot({
      port: 4041,
      host: '0.0.0.0',
    }),
  ],
  providers: [AppService],
})
export class AppModule {}

Then, create an AppService to handle events:

import { Injectable } from '@nestjs/common';
import { OnTeltonikaEvent, TeltonikaTCPService, TeltonikaDevice, TeltonikaCodec8eAVLPacket } from '@groupe-savoy/nestjs-teltonika';
import { Socket } from 'net';

@Injectable()
export class AppService {
  constructor(private teltonikaTCPService: TeltonikaTCPService) {}

  @OnTeltonikaEvent('init')
  onInit(device: TeltonikaDevice<Socket>) {
    console.log('Device IMEI:', device.imei);
  }

  @OnTeltonikaEvent('data')
  onData(device: TeltonikaDevice<Socket>, data: TeltonikaCodec8eAVLPacket) {
    console.log('Device IMEI:', device.imei);
    console.log('Data Packet:', data);
  }
}

Setting Up a TLS Server

For secure communications, use the TLS module:

import { Module } from '@nestjs/common';
import { TeltonikaTLSModule } from 'nestjs-teltonika';
import fs from 'fs';

@Module({
  imports: [
    TeltonikaTLSModule.forRoot({
      port: 4041,
      host: '0.0.0.0',
      key: fs.readFileSync('./path/to/server.key'),
      cert: fs.readFileSync('./path/to/server.crt'),
    }),
  ],
})
export class AppModule {}

Learn More

The online documentation for the underlying Teltonika SDK is the best place to learn how to use the codecs and commands efficiently.

Development

Clone the repository:

git clone https://github.com/Groupe-Savoy/nestjs-teltonika.git
cd nestjs-teltonika

Install dependencies:

pnpm install

Run tests:

pnpm test

Build the library:

pnpm build

License

This project is released under the MIT License.

Support

For questions, issues, or feedback, please visit the GitHub Issues page.

Contributing

Contributions are welcome! Please read the CONTRIBUTING guide for more information.