donskytech / mqtt-custom-dashboard-node-js

A custom MQTT dashboard built using Node.js that can be used to display sensor readings from a BME280 sensor
Apache License 2.0
41 stars 30 forks source link

mqtt websocket change to mqtt #1

Open runtimevic opened 9 months ago

runtimevic commented 9 months ago

Hello @donskytech I'm trying instead of mqtt websocket with mqtt and it doesn't work for me, do you know why?

mqtt websocket: MQTT_BROKER=ws://127.0.0.1:9001/mqtt

mqtt: MQTT_BROKER=mqtt://127.0.0.1:1883

thanks you.

donskytech commented 9 months ago

Hey, if you want something like this then you can do it on the server side not on the browser side. Use mqtt.js library on your app.js.

runtimevic commented 9 months ago

Hi @donskytech Do you have any videos on YouTube or repository that can be viewed server side use mqtt.js library?

donskytech commented 8 months ago

I find this one, a good introductory for this topic https://www.emqx.com/en/blog/how-to-use-mqtt-in-nodejs