zigbeer / zigbee-shepherd

An open source ZigBee gateway solution with node.js.
MIT License
250 stars 87 forks source link
cc2530 cc2531 zigbee zigbee-gateway

zigbee-shepherd

An open source ZigBee gateway solution with node.js

NPM

Travis branch npm npm


Documentation

Please visit the Wiki.


Overview

zigbee-shepherd is an open source ZigBee gateway solution with node.js. It uses TI's CC253X wireless SoC as a zigbee network processor (ZNP), and takes the ZNP approach with cc-znp to run the CC253X as a coordinator and to run zigbee-shepherd as the host.

ZigBee Network


Installation

$ npm install zigbee-shepherd --save


Usage

var ZShepherd = require('zigbee-shepherd');
var shepherd = new ZShepherd('/dev/ttyUSB0');  // create a ZigBee server

shepherd.on('ready', function () {
    console.log('Server is ready.');

    // allow devices to join the network within 60 secs
    shepherd.permitJoin(60, function (err) {
        if (err)
            console.log(err);
    }); 
});

shepherd.start(function (err) {                // start the server
    if (err)
        console.log(err);
});


License

Licensed under MIT.