Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] (no subject)

The tutorial is about compiling own mosquitto then install it. I already have an installed mosquitto broker on my raspberry pi. I read that i just have to modify the config file by adding the following: 
listener      9001
Protocol    websockets
 I tried it, but i think it doesn't work.. 
I don't know what is the problem !

في الأحد، ١٢ سبتمبر ٢٠٢١ ٩:٥٣ ص Attilio Giordana <attilio.giordana@xxxxxxxxx> كتب:
Yes, it is true. Browsers can only connect to an MQTT server through websocket (default port 9000 for MQTT e 9001 for MQTT on TLS).
Then any _javascript_ application running in a browser can only open a websocket to connect to mosquitto. That means that you need to configure mosquitto to use websockets.
For a tutorial you can see, for instance:



On Sat, 11 Sept 2021 at 16:00, mohamed Abdulmajid <gomaamohamed015@xxxxxxxxx> wrote:
Hello everyone ☺️.  I need to use mosquitto mqtt over websockets. I'm using a raspberry pi as a host server for several tools such as mosquitto broker,node red, influx db, and grafana as a data logging system. I'm trying to use grafana to control a sonoff switch through mqtt. I found this plugin: https://github.com/geeks-r-us/mqtt-panel
 that allows grafana to communicate with an mqtt server. I have installed the plugin but i can't connect it to the broker! In the plugin's GitHub page the author have mentioned a limitation says " Due to the MQTT client runs in the browser it can only establish mqtt connection over websockets and can only connect to servers reachable by your browser." 
Could you tell me how to establish this connection ?! 
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top