node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

mqtt-shepherd

mqtt-shepherd

Network server and manager for the lightweight MQTT machine network (LWMQN)

NPM

Travis branch npm PyPI npm

Make sure you are with version >= 0.7.0, the old bumps before 0.7.0 are all deprecated.


Documentation

Please visit the Wiki.


Overview

Lightweight MQTT machine network (LWMQN) is an open source project that follows part of OMA LWM2M v1.0 specification to meet the minimum requirements of machine network management.

LWMQN Network


Installation

$ npm install mqtt-shepherd --save


Basic Usage

var MqttShepherd = require('mqtt-shepherd');
var qserver = new MqttShepherd();   // create a LWMQN server 
 
qserver.on('ready', function () {
    console.log('Server is ready.');
 
    // when server is ready, allow devices to join the network within 180 secs 
    qserver.permitJoin(180);
});
 
qserver.start(function (err) {      // start the sever 
    if (err)
        console.log(err);
});
 
// That's all to start a LWMQN server. 
// Now qserver is going to automatically tackle most of the network managing things. 

License

Licensed under MIT.