Page 1 of 2

There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Mon Jan 01, 2024 1:50 pm
by niedian
When using the MQTT component of ESP32-S3 to connect to "https://www.emqx.com" using the WebSocket TLS/SSL port 8084, EMQX requires the connection path. However, there is no option for setting the path in the ConnectTo property of the MQTT_Client component. How should I handle this? Greetings!

The connection address for EMQX is:
https://docs.emqx.com/en/cloud/latest/c ... mqttx.html

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Mon Jan 01, 2024 1:53 pm
by niedian
"path:"

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Tue Jan 02, 2024 9:51 am
by Steve-Matrix
I think this component uses the MQTT / TCP protocol and requires you to use port 1883 or 8883. 8083 and 8084 are the ports used for the WebSocket protocol.

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Wed Jan 03, 2024 3:36 pm
by niedian
FLOWCODE official, can you provide an example using MQTT_Client to connect to "https://www.emqx.com/" (free version)? I have been trying for a long time with ESP32-S3, but still couldn't establish the connection to "https://www.emqx.com/". I hope FLOWCODE can provide an example. Thank you!

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Wed Jan 03, 2024 3:41 pm
by niedian
"Serverless"

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Wed Jan 03, 2024 3:42 pm
by niedian
https://www.emqx.com/“(Serverless)

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Wed Jan 03, 2024 3:45 pm
by niedian

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Wed Jan 03, 2024 5:26 pm
by chipfryer27
Hi

Half way down this link you get connection information

https://www.emqx.com/en/blog/the-easies ... -with-mqtt

Notably :-

Free public MQTT broker

In this post, we will use the free public MQTT broker provided by EMQ, created based on the fully managed MQTT cloud service - EMQX Cloud. The server information is as follows.

Broker Address: broker.emqx.io
TCP Port: 1883
WebSocket Port: 8083

It also gives examples of subscribing and publishing. Have you tried any of them?

Regards

EDIT

Forgot to include this link too

https://www.emqx.com/en/mqtt-guide

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Wed Jan 03, 2024 5:31 pm
by Steve-Matrix
If you are using the MQTT Client component in an embedded device then you need to be using port 1883 (http) or 8883 (https). These are the TCP ports. If you are using Flowcode Web Developer, then you should use the WebSocket ports instead.

You will need to set your username and password to the ones you have set up on that EMQX site if you are using their service. Their free MQTT broker may may not need these credentials.

Re: There is no option for setting the path in the ConnectTo property of the MQTT_Client component.

Posted: Thu Jan 04, 2024 7:32 am
by niedian
I'll give it a try, thank you! Regards!