Vue-Mqtt
Connect to mqtt through websocket, implementation for Vuejs 2
Example
Example Vue-Mqtt-Example
Install
npm install vue-mqtt --save
Usage
Configuration
;Vue;
options: https://github.com/mqttjs/MQTT.js#client
Subscribe
this.$mqtt.subscribe('param/param/param/test', options)
options: https://github.com/mqttjs/MQTT.js#subscribe
On Vuejs instance usage
The last parameter for reading is used
var vm =mqtt:{console}{console}{console}'template/+' data topicif topic === '12345'console'template/+/param/param' data topicif topic1 === '12345'consolemethods:{this$mqtt}{this$mqtt}