Giter VIP home page Giter VIP logo

coap-shepherd's Introduction

coap-shepherd

Network server and manager for lightweight M2M (LWM2M).

NPM

Build Status npm npm


Documentation

Please visit the Wiki.


Overview

OMA Lightweight M2M (LWM2M) is a resource constrained device management protocol relies on CoAP. And CoAP is an application layer protocol that allows devices to communicate with each other RESTfully over the Internet.

coap-shepherd, coap-node and lwm2m-bs-server modules aim to provide a simple way to build and manage a LWM2M network.

coap-shepherd net

LWM2M Server: coap-shepherd

  • It is a LWM2M Server application framework running on node.js.
  • It follows most parts of LWM2M specification to meet the requirements of a machine network and devices management.
  • It works well with Leshan and Wakaama.
  • Supports functionalities, such as permission of device joining, reading resources, writing resources, observing resources, and executing a procedure on a remote device.
  • It follows IPSO data model to let you allocate and query resources on remote devices with semantic URIs in a comprehensive manner.

Installation

$ npm install coap-shepherd --save


Usage

This example shows how to start a server and allow devices to join the network within 180 seconds after the server is ready:

var cserver = require('coap-shepherd');

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

    // when server is ready, allow devices to join the network within 180 secs
    cserver.permitJoin(180);  
});

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

// That's all to start a LWM2M server.
// Now cserver is going to automatically tackle most of the network managing things.

Or you can pass a config object as an argument to the CoapShepherd constructor and instance the CoapShepherd by yourself:

var CoapShepherd = require('coap-shepherd').constructor;
var cshepherd = new CoapShepherd({
    connectionType: 'udp6',
    port: 5500,
    defaultDbPath: __dirname + '/../lib/database/myShepherd.db'
});

License

Licensed under MIT.

coap-shepherd's People

Contributors

mophy avatar petereb avatar simenkid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.