anniot-core

1.1.4 • Public • Published

AnnIoT-NodeCore

AnnIoT device client

Configure account

 
var ann = require("anniot-core");
var iot = new ann.core({
    mail: "mailAdress",
    id: "deviceId"
})
 

Connect to server

 
iot.connect(true)
 

Listen for events

//Connected to server
iot.on("connect",function() {
    console.log("Connection estabilished");
 
    //Connection verified, events started to listening
    iot.on("verify",function() {
        console.log("Connection verified");       
    });
 
    //Client error handling
    iot.on("error",function(err) {
        console.log(err);
    });
});
 

Package Sidebar

Install

npm i anniot-core

Weekly Downloads

0

Version

1.1.4

License

MIT

Unpacked Size

4.08 kB

Total Files

3

Last publish

Collaborators

  • queenscrown