Heartbeat51
Heartbeat51 copied to clipboard
MQTT-Client BP-Node "Connect" Event-Dispatcher "OnConnect" does not fire.
Steps to Reproduce:
A. As Is
- Startup Mosquitto Brocker
- Startup UE Project "Heartbeat51", Launch PIE
- MQTT-Client BP-Node "Connect" works, see Fig. Wireshark dissection
- MQTT-Client BP-Node "Connect" Event-Dispatcher "OnConnect" does not fire, see Fig.
Fig.: Wireshark Dissecting MQTT Connect Command
Fig.: MQTT-Client BP-Node "Connect" Event-Dispatcher "OnConnect" does not fire
B. Workaround
- Startup Mosquitto Brocker
- Startup UE Project "Heartbeat51"
- To enable the subscription, wire the "Connect" and "Subscribe" nodes temporarily, see Fig.
- Launch PIE
- Startup MQTT Explorer
- connect to mqtt://127.0.0.1:1883
- publish a message using topic psl/hr
- The Editor crashes
Fig.: "Connect" and "Subscribe" nodes temporarily wired
Fig.: MQTT-Explorer Connection
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
]
}
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