Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Question: When an npm package will be available? #1

Open
damianog opened this issue Sep 5, 2013 · 3 comments
Open

Question: When an npm package will be available? #1

damianog opened this issue Sep 5, 2013 · 3 comments

Comments

@damianog
Copy link

damianog commented Sep 5, 2013

Hi @micha149

I am interested in your homelib library, I am developing a web interface with Raspberry Pi to comunicate with an existing KNX router and i have some question:

Will an NPM package be available?

or

Can I actually download to do some test and run without particular errors?

Thanks!

@micha149
Copy link
Owner

micha149 commented Sep 5, 2013

Hi @damianog!

Thank you for your interest. Yes, a npm package will be available with release 0.1.0. But currently only listening to messages works. And only for 60 seconds. Sending and heartbeat will be implemented soon. This should satisfy your requirements.

You may try this few lines to checkout the KnxIP driver without the connection object:

var homelib = require('./homelib'),
    caterpillar = require('caterpillar');

var driver = new homelib.Driver.KnxIpDriver({
    logger: new homelib.Log.ConsoleAdapter(),
    localPort: 51234,
    localAddress: "192.168.2.13",
    remotePort: 3671,
    remoteAddress: "192.168.2.23"
});

driver.on('packet', function(packet) {
    console.info('packet received', packet);
});

driver.on('message', function(msg) {
    console.info(msg);
});

driver.on('connected', function() {
    console.info('connected to IP interface');
})

driver.connect();

@damianog
Copy link
Author

Hi, me again!

I forgot to thanked you for your suggestion and I wanted to do it now.

I would like to ask you also what you think of using Typescript to generate the code of your library. I thought I could write the definition files but perhaps a complex project like yours could be written directly in Typescript with many other advantages.

@micha149
Copy link
Owner

Hi. I want to give developers an easy entry to this library. So it is not so good to build on any superset languages like TypeScript or languages like CoffeeScript, which gets compiled into Javascript. Nevertheless, I would welcome the typescript definition files, which developers can use to build TypeScript projects upon this library.

By the way: The 0.1.0 release comes very close 😉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants