Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petereb/coap-shepherd
Network server and manager for lightweight M2M (LWM2M).
https://github.com/petereb/coap-shepherd
coap lwm2m nodejs smartobject
Last synced: about 2 months ago
JSON representation
Network server and manager for lightweight M2M (LWM2M).
- Host: GitHub
- URL: https://github.com/petereb/coap-shepherd
- Owner: PeterEB
- License: other
- Created: 2016-01-07T02:54:02.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-05-13T06:48:53.000Z (over 5 years ago)
- Last Synced: 2024-09-24T12:48:40.967Z (3 months ago)
- Topics: coap, lwm2m, nodejs, smartobject
- Language: JavaScript
- Homepage:
- Size: 746 KB
- Stars: 43
- Watchers: 9
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# coap-shepherd
Network server and manager for lightweight M2M (LWM2M).[![NPM](https://nodei.co/npm/coap-shepherd.png?downloads=true)](https://nodei.co/npm/coap-shepherd/)
[![Build Status](https://travis-ci.org/PeterEB/coap-shepherd.svg?branch=develop)](https://travis-ci.org/PeterEB/coap-shepherd)
[![npm](https://img.shields.io/npm/v/coap-shepherd.svg?maxAge=2592000)](https://www.npmjs.com/package/coap-shepherd)
[![npm](https://img.shields.io/npm/l/coap-shepherd.svg?maxAge=2592000)](https://www.npmjs.com/package/coap-shepherd)
## Documentation
Please visit the [Wiki](https://github.com/PeterEB/coap-shepherd/wiki).
## Overview
[**OMA Lightweight M2M**](http://technical.openmobilealliance.org/Technical/technical-information/release-program/current-releases/oma-lightweightm2m-v1-0) (LWM2M) is a resource constrained device management protocol relies on [**CoAP**](https://tools.ietf.org/html/rfc7252). 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.
* Server-side library: **coap-shepherd** (this module)
* Client-side library: [**coap-node**](https://github.com/PeterEB/coap-node)
* Bootstrap server library: [**lwm2m-bs-server**](https://github.com/PeterEB/lwm2m-bs-server)
* [**A simple demo webapp**](https://github.com/PeterEB/quick-demo)![coap-shepherd net](https://raw.githubusercontent.com/PeterEB/documents/master/coap-shepherd/media/lwm2m_net.png)
### 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**](https://github.com/eclipse/leshan) and [**Wakaama**](https://github.com/eclipse/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**](http://www.ipso-alliance.org/smart-object-guidelines/) 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:
```js
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:
```js
var CoapShepherd = require('coap-shepherd').constructor;
var cshepherd = new CoapShepherd({
connectionType: 'udp6',
port: 5500,
defaultDbPath: __dirname + '/../lib/database/myShepherd.db'
});
```
## License
Licensed under [MIT](https://github.com/PeterEB/coap-shepherd/blob/master/LICENSE).