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.