Websocket to MQTT using node.js

40 views
Skip to first unread message

John O Connor

unread,
Apr 6, 2017, 1:27:38 PM4/6/17
to nodejs
I need help writing a script to get data using a websocket and send it to CloudMqtt broker. Can anyone help with this? I am lost where to start.

John

Michael Dawson

unread,
Apr 7, 2017, 11:01:38 AM4/7/17
to nodejs
I'd suggest you look at these two packages.  They make it relatively straight forward to accept websocket connections and to publish/listen for mqtt messages:

https://www.npmjs.com/package/mqtt
Reply all
Reply to author
Forward
0 new messages