[Solved] Working MQTT example?

Hi all,
I’m looking for a simple working example using the MQTT extension.
I tried a simple project to test this extension. Connection to servers seems to work (thanks to steliosm for his hack ‘connected status’) but I neither receive or send messages.
I’m new in GDevelop but not in MQTT (that works fine with Phaser for example)

I suppose i missed something when I used this extension but I can’t find what.

Any successful experience is welcome.

I used it successfully with those events:

(don’t mind the console thing it’s a private extension I use to quickly test/debug stuff)

Have you tried subscribing to the MQTT through a cli console or other utility and monitor what is happening with the messages?

I’m trying to use the MQTT plugin with HiveMQ’s free service. I am able to connect to the server using mqtt-cli, but I can’t seem to get this to work from GDevelop. Here’s my GDevelop events:

I see nothing in the logs. I tried using the isConnected function inverted and logging getLastError - that was triggered all the time but getLastError was empty. Any suggestions for how I can debug this?

Here’s an example from mqtt-cli:
mqtt> con -i -h .s1.eu.hivemq.cloud -p
8884 -u -pw -ws -s
@.s1.eu.hivemq.cloud> pub -t global -m Hello -r
@.s1.eu.hivemq.cloud> sub -t global -s

I appreciate your work. Thank you.

that’s… not the action to connect to a server. that’s the action to publish on a topic.
you are also never publishing anything on the “global” topic

Oops, I had accidentally changed it trying to troubleshoot it. But switching that back to a connect action still doesn’t seem to work, and I’m not seeing messages if I publish from the command line either. I updated the screenshot above with the corrected actions. I can send you credentials if you are interested in testing it, but I understand you are busy. I’ll keep at it. Thank you.

I figured it out. HiveMQ surfaces web sockets at the path /mqtt. Also they require secure web sockets, and I had that disabled. So far it seems to work well, although when it failed to connect it didn’t report an error for some reason. But that looks like an mqtt.js thing. Thank you!

I’m glad you got it solved! Closing the thread as such.