brugr9 / Heartbeat51

IoT: Unreal Engine Heart Rate Monitoring Integration using MQTT – UE 5.1
Creative Commons Attribution Share Alike 4.0 International
18 stars 3 forks source link

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

Open brugr9 opened 1 year ago

brugr9 commented 1 year ago

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


julius-gummersbach commented 1 year ago

Can confirm this is still an issue. If there are any updates let me know. I have been trying to get mqtt working with Unreal Engine for days.

julius-gummersbach commented 1 year ago

https://issues.unrealengine.com/issue/search?q=MQTT

Your Issue seems to not be there anymore btw grafik

brugr9 commented 1 year ago

Thanks Julius. Yes, I know - the issue has not been listed so far ... does not seem to have been judged as an important issue. The MQTT plugin is beta btw.

julius-gummersbach commented 1 year ago

Yes, I gave up on mqtt and now use the HTTP Plugin to send requests to a REST Api on my computer which returns the last mqtt messages. works fine for my usecase but far from ideal...

HomeoStasis-0 commented 1 month ago

Hi Roland, I am currently trying to implement this into a project, but I am using the verity sense sensor instead of the chest strap. Would you happen to know what differences there would be in the unreal code. Unlike the chest strap using the ECG, I am only needing the HR but this is my first time using unreal. Any help would be great!