All Projects → PeterEB → coap-node

PeterEB / coap-node

Licence: other
Client node of lightweight M2M (LWM2M).

Programming Languages

javascript
184084 projects - #8 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to coap-node

coap-shepherd
Network server and manager for lightweight M2M (LWM2M).
Stars: ✭ 41 (+28.13%)
Mutual labels:  coap, lwm2m, smartobject
helix-sandbox
Middleware for secure IoT provisioning, access and control.
Stars: ✭ 23 (-28.12%)
Mutual labels:  coap, lwm2m
SecureFiware
Proposing security measures and security analysis in the Fiware IoT environment.
Stars: ✭ 21 (-34.37%)
Mutual labels:  coap, lwm2m
Thingsboard
Open-source IoT Platform - Device management, data collection, processing and visualization.
Stars: ✭ 10,526 (+32793.75%)
Mutual labels:  coap, lwm2m
peniot
PENIOT: Penetration Testing Tool for IoT
Stars: ✭ 164 (+412.5%)
Mutual labels:  coap
Go Coap
Implementation of CoAP Server & Client in Go
Stars: ✭ 226 (+606.25%)
Mutual labels:  coap
Aiocoap
The Python CoAP library
Stars: ✭ 185 (+478.13%)
Mutual labels:  coap
freebird
No description or website provided.
Stars: ✭ 21 (-34.37%)
Mutual labels:  coap
Cloud
Secure and Interoperable Internet of Things
Stars: ✭ 142 (+343.75%)
Mutual labels:  coap
coap-go
Lobaro CoAP for GoLang - server and client applications
Stars: ✭ 20 (-37.5%)
Mutual labels:  coap
CoAPExplorer
A (soon to be) cross-platform tool for exploring CoAP protocol.
Stars: ✭ 16 (-50%)
Mutual labels:  coap
zestdb
ZestDB
Stars: ✭ 18 (-43.75%)
Mutual labels:  coap
microCoAPy
A mini client/server implementation of CoAP (Constrained Application Protocol) into MicroPython
Stars: ✭ 41 (+28.13%)
Mutual labels:  coap
Golden Gate
Framework to connect wearables and other IoT devices to mobile phones, tablets and PCs with an IP-based protocol stack over Bluetooth Low Energy
Stars: ✭ 223 (+596.88%)
Mutual labels:  coap
pyaiot
A set of Python services to interact and transport data from IoT devices
Stars: ✭ 29 (-9.37%)
Mutual labels:  coap
Designiot
教你设计物联网系统。构建自己的Internet of Things 。
Stars: ✭ 1,983 (+6096.88%)
Mutual labels:  coap
lwm2m-registry
This is a public repository dedicated to store and register new LwM2M Objects
Stars: ✭ 34 (+6.25%)
Mutual labels:  lwm2m
ioBroker.shelly
Shelly ioBroker Adapter
Stars: ✭ 108 (+237.5%)
Mutual labels:  coap
mbed-edge
The Mbed Edge
Stars: ✭ 24 (-25%)
Mutual labels:  lwm2m
coap-cli
A command line interface for CoAP built on node-coap
Stars: ✭ 68 (+112.5%)
Mutual labels:  coap

coap-node

Client node of 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 machine network.

coap-shepherd net

LWM2M Client: coap-node

  • It is an implementation of LWM2M Client managed by a coap-shepherd Server.
  • It follows most parts of LWM2M specification to meet the requirements of a machine network and devices management.
  • It works well with Leshan.
  • Support mulitple servers, factory bootstrap and client initiated bootstrap.
  • It uses smartobject as its fundamental of resource organizing on devices. smartobject can help you create smart objects with IPSO data model, and it also provides a scheme to help you abstract your hardware into smart objects. You may like to use smartobject to create many plugins for your own hardware or modules, i.e., temperature sensor, humidity sensor, light control. Here is a tutorual of how to plan resources with smartobject.

Installation

$ npm install coap-node --save


Usage

Client-side example (the following example is how you use coap-node on a machine node):

  • Step 1: Resources initialzation.
var SmartObject = require('smartobject');

// initialize Resources that follow IPSO definition
var so = new SmartObject();

// initialize your Resources
// oid = 'temperature', iid = 0
so.init('temperature', 0, {
    sensorValue: 21,
    units: 'C'
});

// oid = 'lightCtrl', iid = 0
so.init('lightCtrl', 0, {
    onOff: false
});
  • Step 2: Client device initialzation.
var CoapNode = require('coap-node');

// Instantiate a machine node with a client name and your smart object
var cnode = new CoapNode('my_first_node', so);

cnode.on('registered', function () {
    // If the registration procedure completes successfully, 'registered' will be fired

    // after registered, start your application
});

// register to a Server with its ip and port
cnode.register('192.168.0.77', 5683, function (err, rsp) {
    console.log(rsp);      // { status: '2.05' }
});

Server-side example (please go to coap-shepherd document for details):

var cnode = cserver.find('my_first_node');

cnode.read('/temperature/0/sensorValue', function (err, rsp) {
    console.log(rsp);      // { status: '2.05', data: 21 }
});

cnode.write('/lightCtrl/0/onOff', true, function (err, rsp) {
    console.log(rsp);      // { status: '2.04' }
});

License

Licensed under MIT.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].