A Node.js client for eib/knx daemon. Implements all functions of eibd client library needed for groupswrite/groupwrite, groupread and groupsocketlisten.
npm install eibd
npm test
- EIS 1 / DPT 1.xxx
- EIS 2 / DPT 3.xxx
- EIS 3 / DPT 10.xxx
- EIS 4 / DPT 11.xxx
- EIS 5 / DPT 9.xxx
- EIS 6 / DPT 5.xxx
- EIS 8 / DPT 2.xxx
- EIS 9 / DPT 14.xxx
- EIS 10.000 / DPT 7.xxx
- EIS 10.001 / DPT 8.xxx
- EIS 11 / DPT 12.xxx
- EIS 11.001 / DPT 3.xxx
- EIS 13 / DPT 4.xxx
- EIS 14 / DPT 6.xxx
- EIS 15 / DPT 16.xxx
./bin/groupwrite host port x/x/x 0..255
./bin/groupswrite host port x/x/x 0..1
./bin/groupread host port x/x/x
./bin/groupsocketlisten host port
Opens a connection eibd over TCP/IP.
varopts={host: 'localhost',port: 6720};eibd.socketRemote(opts,function(){// connected});Opens a Group communication interface
eibd.on('data',function(action,src,dest,val){// do something});eibd.openGroupSocket(0);Opens a connection of type T_Group
vardest=eibd.str2addr('x/x/x');eibd.openTGroup(dest,1,function(err){});Sends an APDU
Sends TCP/IP request to eib-daemon
Parse telegram and emits 'write', 'response' or 'read' events.
Try to parse values with assumptions about package len.
Parse value to EIS 5 / DPT 9.xxx from buffer
Encodes string to knx address
Decodes knx address to string
vareibd=require('eibd');/** * groupsocketlisten */functiongroupsocketlisten(opts,callback){varconn=eibd.Connection();conn.socketRemote(opts,function(){conn.openGroupSocket(0,callback);});}varhost='localhost';varport=6720;groupsocketlisten({host: host,port: port},function(parser){parser.on('write',function(src,dest,dpt,val){console.log('Write from '+src+' to '+dest+': '+val);});parser.on('response',function(src,dest,val){console.log('Response from '+src+' to '+dest+': '+val);});parser.on('read',function(src,dest){console.log('Read from '+src+' to '+dest);});});