#@tuby/mqttclient
##Installation With NPM:
$ npm install @tuby/mqttclient
With Yarn:
$ yarn @tuby/mqttclient
##Update With NPM:
$ npm update @tuby/mqttclient
With Yarn:
$ yarn upgrade @tuby/mqttclient
Usage
import {WebAPI} from '@tuby/mqttclient'
var mqttclient = new MQTTClient({
"url": "ws://192.168.19.41:8083/mqtt",
"onConnected":function(){
console.log("mqtt connected")
},
"onDisconnected":function(){
console.log("mqtt disconnected")
},
"onConnectError":function(err){
console.log(err)
}
});
mqttclient.subTopic("aaa",function(message){
//let jmessage = eval('(' + message + ')');
console.log("aaa get",message+"")
})
mqttclient.pubTopic("aaa","kkk")
Testing & Dev
npm run dev
npm run demo
📜 Changelog
Detailed changes for each release are documented in the CHANGELOG.md