2.3.0
&Cube-Thyme is an open source IoT device application entity based on the oneM2M (http://www.oneM2M.org) standard. &Cube-Thyme consists of three versions: Node.js version, Java version and Android version.
&Cube-Thyme implementation of oneM2M ADN-AE can be connected to MN-CSE or IN-CSE.
&Cube-Thyme for Node.js is developed with javascript of node.js.
- Node.js
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world. Node.js is very powerful in service impelementation because it provide a rich and free web service API. So, we use it to make RESTful API base on the oneM2M standard. - &Cube-Thyme for Node.js
&Cube-Thyme for Node.js source codes are written in javascript. So they don't need any compilation or installation before running.
- Open the &Cube-Thyme for Node.js source home directory
- Install dependent libraries as below
npm install
- Modify configuration file "conf.js" per your setting
conf.useprotocol = 'http'; // select one for 'http' or 'mqtt' or 'coap' or 'ws'
// build cse
cse.host = '203.253.128.161'; //CSE host IP
cse.port = '7579'; //CSE http hosting port
cse.name = 'Mobius';
cse.id = '/Mobius';
cse.mqttport = '1883'; //CSE mqtt broaker port
cse.wsport = '7577';
// build ae
ae.name = 'edu4'; //AE name
ae.id = 'S' + ae.name; //AE-ID
ae.parent = '/' + cse.name;
ae.appid = 'education';
ae.port = '9727';
ae.bodytype = 'json'; // select 'json' or 'xml' or 'cbor'
ae.tasport = '3105';
// build cnt
var count = 0;
cnt_arr[count] = {};
cnt_arr[count].parent = '/' + cse.name + '/' + ae.name;
cnt_arr[count++].name = 'cnt-co2'; //CNT name
cnt_arr[count] = {};
cnt_arr[count].parent = '/' + cse.name + '/' + ae.name;
cnt_arr[count++].name = 'cnt-led'; //CNT name
// build sub
count = 0;
sub_arr[count] = {};
sub_arr[count].parent = '/' + cse.name + '/' + ae.name + '/' + cnt_arr[1].name;
sub_arr[count].name = 'sub-ctrl2'; //Subsctiption name
sub_arr[count++].nu = 'mqtt://' + cse.host + '/' + ae.id + '?ct=' + ae.bodytype;
Use node.js application execution command as below
node thyme.js
This is the list of library dependencies for &Cube:Thyme Node.js
- body-parser
- cbor
- coap
- express
- fs
- http
- ip
- js2xmlparser
- morgan
- mqtt
- shortid
- url
- util
- websocket
- xml2js
- xmlbuilder
If you want more details please dowload the full installation guide document.
Il Yeup Ahn ([email protected]; [email protected])