New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

knx

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knx

KNXnet/IP protocol implementation for Node(>=4.x)

2.3.7
Source
npm
Version published
Weekly downloads
389
-9.74%
Maintainers
1
Weekly downloads
 
Created
Source

KNXnet/IP for Node.JS

New: Join the Gitter.im chatroom!

A feature-complete KNXnet/IP protocol stack in pure Javascript, capable of talking multicast (routing) and unicast (tunneling). Adding KNX to your Node.JS applications is now finally easy as pie.

  • Wide DPT (datapoint type) support (DPT1 - DPT20 supported)
  • Extensible Device support (binary lights, dimmers, ...)
  • You won't need to install a specialised eibd daemon with its arcane dependencies and most importantly,
  • If you got an IP router and a network that supports IP multicast, you can start talking to KNX within seconds!

Installation

Make sure your machine has Node.JS (version 4.x or greater) and do:

npm install knx

Usage

At last, here's a reliable KNX connection that simply works without any configs. To get a basic KNX monitor, you just need to run this in Node:

var knx = require('knx');
var connection = knx.Connection({
 handlers: {
  connected: function() {
    console.log('Connected!');
  },
  event: function (evt, src, dest, value) {
  console.log("%s **** KNX EVENT: %j, src: %j, dest: %j, value: %j",
    new Date().toISOString().replace(/T/, ' ').replace(/\..+/, ''),
    evt, src, dest, value);
  }
 }
});

Ahhh, KNX telegrams, what a joy:

> 2016-09-24 05:34:07 **** KNX EVENT: "GroupValue_Write", src: "1.1.100", dest: "5/0/8", value: 1
2016-09-24 05:34:09 **** KNX EVENT: "GroupValue_Write", src: "1.1.100", dest: "5/1/15", value: 0
2016-09-24 05:34:09 **** KNX EVENT: "GroupValue_Write", src: "1.1.100", dest: "5/0/8", value: 0
2016-09-24 05:34:17 **** KNX EVENT: "GroupValue_Write", src: "1.1.100", dest: "5/1/15", value: 0
2016-09-24 05:34:17 **** KNX EVENT: "GroupValue_Write", src: "1.1.100", dest: "5/0/8", value: 1

Development documentation

Keywords

knx

FAQs

Package last updated on 17 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts