Try   HackMD

MqttX 安裝應用

環境準備

MQTT broker 安裝 (Mosquitto)

OSX (使用 brew)

brew install mosquitto

Ubuntu

sudo apt-get update
sudo apt-get install -y mosquitto mosquitto-clients

檢查 Broker 環境

sudo netstat -tulpn | grep 1883

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Publish 傳送資料

mosquitto_pub -h 127.0.0.1 -t "test" -m "test-message"

Subscribe 接收資料

mosquitto_sub -h 127.0.0.1 -t "test"

測試結果 (開兩個 Terminal 做測試)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

MqttX 安裝 (github)

OSX

  1. 前往 MQTTX github Release 網站 (連結)

  2. 下載 官方 最新打包的 zip

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. 解壓縮 mqttx zip 包的獲得安裝檔

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

Ubuntu

sudo apt-get install -y snap
sudo snap install snap mqttx
sudo /snap/mqttx/current/mqttx

MQTTX 操作

服務啟動

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

添加 Broker

  1. 點選 建立新的連線

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 配置 Broker 連線資訊 與 在 MQTTX 中的識別名稱

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. Broker 完成配置

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

訂閱 Topic

  1. 點選增加訂閱內容

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 配置 Topic 相關資訊

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  3. 接收 Topic 上的資訊

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

推送資料到 Topic 之上

  1. 設定 送出 (Publish) 的資料內容與格式

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

  2. 查看送出的訊息

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →