Websockets上的MQTT为初学者解释



Web浏览器同时支持http和websocket协议,但不支持MQTT。
Websockets是一个相对较新的协议,它提供客户端和Web服务器之间的双向通信。
在本教程中,您将了解Websockets上的MQTT如何工作以及为什么需要使用它。
尽管其他客户端(如Python客户端)在Websocket上支持MQTT,但其主要用途是在使用MQTT JavaScript客户端的Web浏览器中。
该视频介绍了MQTT和MQTT上的websocket之间的区别,并展示了如何通过websocket承载MQTT数据包

网站教程

Using MQTT Over WebSockets with Mosquitto


其他影片
使用JavaScript MQTT客户端-示例

-------
使用JavaScript MQTT Websockets客户端-示例2

----------------
在Mosquitto上通过SSL使用Websockets

下载页面
http://www.steves-internet-guide.com/downloads/
有问题请使用注释,或者如果需要帮助,请使用

Ask Steve – Need Help


如果您觉得这些视频有用,那么您可能要考虑给我买杯咖啡
https://www.paypal.me/StepenCope。

6 comments
  1. 3:33 It seems now the mosquitto comes with WebSocket. But I still do not understand how you set your mosquitto broker ip and port. (192.168.1.206 and 9001) . when I use those values in the websockets-1.html in the chrome console the connection doesn't happen. But if I replace it to hostname iot.eclipse.org and port 1883 it connects.

  2. No mention of the role of webserver, proxy, and firewalls. If websockets works as I'm guessing it does, any of the above mentioned servers can, and often will, block websockets for those not in control of their network.

  3. Hello Steve Cope
    I am trying to bridge two or more mqtt together using raspiberry pi but having a hard time finding the right document or video

    reasoning: Raspiberry A will is where I house my Home automation codes.
    and Raspiberry B to D will be clients for audio processing and to turn on/off light, or connected door bell

    basically I want to have Raspiberry in each room to control that room equipment whereby my home automation server Raspiberry A could send commands to Raspiberry B to D or to get the status what the other Raspiberry are doing..

  4. hi steve, thanks for the video, very nice, and can you explain to me about http_dir in mosquitto.conf, please? in the folder folder http_dir, what files are needed? I see it on your web.

    may I request the file for me to learn?

    Thank you very much,

Comments are closed.