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

knx-connect

v3.0.0

Published

Community-maintained KNXnet/IP connectivity for modern Node.js

Readme

knx-connect

npm version CI

Community-maintained KNXnet/IP connectivity for modern Node.js.

knx-connect is a pure JavaScript KNXnet/IP stack with multicast routing and unicast tunneling support. It continues the original knx project under a new package name, with Node.js 22 or later as its supported runtime.

Features

  • KNXnet/IP routing over UDP multicast
  • KNXnet/IP tunneling over UDP unicast
  • Resilient connection handling and automatic reconnection
  • Datapoint encoding and decoding for a broad set of DPTs
  • Higher-level datapoint and device abstractions
  • CommonJS API with bundled TypeScript declarations

KNXnet/IP Secure is not currently supported.

Requirements

  • Node.js 22 or later
  • A KNXnet/IP router or interface

Installation

npm install knx-connect

Quick start

const knx = require('knx-connect');

const connection = knx.Connection({
  handlers: {
    connected: function () {
      console.log('Connected to KNX');
    },
    event: function (event, source, destination, value) {
      console.log(
        '%s KNX EVENT: %j, src: %j, dest: %j, value: %j',
        new Date().toISOString(),
        event,
        source,
        destination,
        value
      );
    },
    error: function (error) {
      console.error('KNX connection error:', error);
    }
  }
});

Without an explicit ipAddr, the connection uses KNXnet/IP routing with the default multicast address. Provide the address of a KNXnet/IP interface to use tunneling. See the API guide for all connection options.

Migrating from knx 2.x

Version 3.0 is published as a new npm package. Existing applications must replace the dependency and update their import:

- const knx = require('knx');
+ const knx = require('knx-connect');

The public API remains compatible. See the complete migration guide, including an npm alias option for staged migrations.

Documentation

Development

Install dependencies and run lint:

npm ci
npm run lint

The offline protocol, datapoint and DPT tests can be run without KNX hardware:

./node_modules/.bin/multi-tape test/dptlib/test-*.js test/knxproto/test-*.js test/datapoint/test-*.js

npm test also includes connection tests. Tests under test/wiredtests require a real KNX installation and only run when WIREDTEST is set. They are configured through local environment variables. Use .env.example as the starting point and do not commit site-specific addresses or credentials.

Roadmap

  • Replace Tape and multi-tape with the native Node.js test runner
  • Add JSDoc documentation and generate API docs
  • Add support for KNX secure communication (KNXnet/IP Secure)
  • Remove dependency / keep them to a minimum

Contributions and bug reports are welcome in the GitHub issue tracker.

License

knx-connect is licensed under the MIT License.

This project is a maintained fork of the original knx protocol stack. The original work and copyright notices are retained; thanks to @ekarak and all contributors.

KNX is a registered trademark of KNX Association. This independent open-source project is not affiliated with or endorsed by KNX Association.