Heartbeat51 icon indicating copy to clipboard operation
Heartbeat51 copied to clipboard

MQTT-Client BP-Node "Connect" Event-Dispatcher "OnConnect" does not fire.

Open brugr9 opened this issue 2 years ago • 5 comments

Steps to Reproduce:

A. As Is

  1. Startup Mosquitto Brocker
  2. Startup UE Project "Heartbeat51", Launch PIE
  3. MQTT-Client BP-Node "Connect" works, see Fig. Wireshark dissection
  4. MQTT-Client BP-Node "Connect" Event-Dispatcher "OnConnect" does not fire, see Fig.

Screenshot-Wireshark-1883-connect Fig.: Wireshark Dissecting MQTT Connect Command

Screenshot 2023-01-14 164539 Fig.: MQTT-Client BP-Node "Connect" Event-Dispatcher "OnConnect" does not fire

B. Workaround

  1. Startup Mosquitto Brocker
  2. Startup UE Project "Heartbeat51"
    • To enable the subscription, wire the "Connect" and "Subscribe" nodes temporarily, see Fig.
    • Launch PIE
  3. Startup MQTT Explorer
    • connect to mqtt://127.0.0.1:1883
    • publish a message using topic psl/hr
  4. The Editor crashes

Screenshot 2023-01-14 164728 Fig.: "Connect" and "Subscribe" nodes temporarily wired

MqttExplorer-0 Fig.: MQTT-Explorer Connection

MqttExplorer-Publish Fig.: MQTT-Explorer Publish

Listing: Topic psl/hr, example Payload in JSON

{
  "clientId": "MyPSL-01",
  "deviceId": "12345678",
  "sessionId": 1234567890,
  "timeStamp": 1234567890123,
  "hr": 64,
  "rr": [
    833
  ]
}

Wireshark-Publish Fig.: Wireshark Dissecting MQTT Explorer Publication


  • See also snippet "MQTT Plugin" by DrYannick1: https://dev.epicgames.com/community/snippets/EoX/unreal-engine-mqtt-plugin; says: "Event 'OnConnect' is not working. Some received payloads make the engine crash."
  • reported bug to https://www.unrealengine.com/en-US/support/report-a-bug
  • https://issues.unrealengine.com/issue/search?q=MQTT

brugr9 avatar Jan 14 '23 15:01 brugr9