An open source ZigBee gateway solution for Node.js
This project is based on the code forked from https://github.com/zigbeer/zigbee-shepherd.
The reason to refactor the project is that the original project has a lot of bugs and flaws, which cannot fulfill the requirement of many projects which are based on it. The official project has not been actively maintained for a long time, so we decided to maintain it by people who are interested in this project and ZigBee technology in general.
Special thanks to @simenkid, @jackchased and @hedywings for a great job!
zigbee-bridge 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 zigbee-bridge-znp to run the CC253X as a coordinator and to run zigbee-bridge as the host.
$ npm install zigbee-bridge --save
- SmartRF05EB (with CC2530EM)
- CC2531 USB Stick
- CC2538 (Not tested yet)
- CC2630/CC2650 (Not tested yet)
To use CC2530/31 as the coordinator, please download the pre-built ZNP image to your chip first. The pre-built image has been compiled as a ZNP with ZDO callback, ZCL supports, and functions we need.
const Bridge = require('zigbee-bridge');
const bridge = new Bridge('/dev/ttyUSB0'); // create a ZigBee server
bridge.on('ready', () => {
console.log('Server is ready.');
// allow devices to join the network within 60 secs
bridge.permitJoin(60)
.then(() => console.log('permit join started.'))
.catch((err) => console.log(err));
});
// start the bridge
bridge.start()
.then(() => console.log('bridge is now running.'))
.catch((err) => console.log(err));
Licensed under MIT.