1.1.4 • Published 6 years ago
anniot-core v1.1.4
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);
});
});