how can I read QDataStream from mqtt with nodeJs
Unsolved
General and Desktop
-
wrote on 22 Nov 2018, 12:40 last edited by
I have below data stream :
struct dataLoad { QString text; QImage image; }; Sending it to the mqtt broker.
How can I read it from nodejs client as string and png ?
var mqtt = require('mqtt') //var client = mqtt.connect('mqtt://ps01.insightradar.com', username="murat" , password="murat1990" , clientId="nodeJS") var client = mqtt.connect('mqtts://pxxs01mm.com', { username: 'admin', password: 'xx', rejectUnauthorized: false }); client.on('connect', function () { client.subscribe('qtmqtt/topic1', function (err) { if (!err) { client.publish('result/light', 'Hello mqtt') } }) }) client.on('message', function (topic, message) { // message is Buffer console.log(message.toString()) })
-
Hi,
Why a nodejs client ?
-
wrote on 23 Nov 2018, 13:51 last edited by
I found its easy to send my client to use.. What will be the your sugeestion ? Python?
-
If you already use Qt why not continue with it ?
1/4