Code Monkey home page Code Monkey logo

knx.js's Introduction

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

knx.js's People

Contributors

ekarak avatar mattiash avatar lucalanziani avatar hbtecrje avatar pakerfeldt avatar lolmaus avatar h4mmerstein avatar mfechner avatar stefaanseys avatar as19git67 avatar jms-1 avatar flomaetschke avatar heleon19 avatar chefkoch009 avatar huwylphi avatar

Stargazers

 avatar  avatar  avatar

Watchers

James Cloos avatar Jasper van der Neut - Stulen avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.