0.0.26 • Published 2 years ago

@hollowy/coap-shepherd v0.0.26

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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 @hollowy/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 CoapShepherd = require('@hollowy/coap-shepherd').CoapShepherd;
var shepherd = new CoapShepherd()

shepherd.on('ready', () => {
    console.log('Server is ready.');
    // when server is ready, allow devices to join the network within 180 secs
  shepherd.permitJoin(180);  
});

shepherd.start((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('@hollowy/coap-shepherd').CoapShepherd;
var shepherd = new CoapShepherd({
    connectionType: 'udp6',
    port: 5500,
    defaultDbPath: __dirname + '/../lib/database/myShepherd.db'
});

License

Licensed under MIT.

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.3

2 years ago

0.0.26

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago