Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

anniot-core

queenscrown21MIT1.1.4

AnnIoT device client

AnnIoT, IoT, Ann, iot, core, anniot, ann, annmobile

readme

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);
    });
});