Something weird is happening. When sending a message from an app it is received in the Web Client, and it is visible at the bottom, in the published section.
But the ESP32 didn’t received the message.
When writing the same message received in the Web Client to publish it manually (without using the App) the ESP32 received the message and starts working according with the data received.
So, it seems that this two sections in the Web Client are not related or why do I need to publish the msg manually to be received by the ESP32?
Thank you for reaching out. In order to receive messages on your ESP32 client, it is crucial to confirm whether the ESP32 client is subscribed to the same topic to which your application is sending or publishing messages. The client/device must be subscribed to the relevant topics to successfully receive the messages.
Similarly, the web client operates like the ESP32 client. It has the capability to both subscribe to topics and publish messages, much like any other client/device in your communication setup.
If you encounter any issues or have further questions, please feel free to provide additional details, and We will be happy to assist you.
Sheetal from the HiveMQ team
Dasha told me that the problem must be due to the root certificate. This is what I understood, that when the ESP32 is connected to hivemq cloud cannot suscribe and publish if it is using a certificate. She asked me to send her the screenshot of the “Access Management” page of my profile to help me how to solve the problem. So here’s the image of the page just as it currently is. Hope it can help? Thx.
Hello @caveadventurer ,
Thank you for the follow up!
To start with, a device using a certificate, in the case of HiveMQ Cloud usually a server root CA certificate, can certainly connect to the HiveMQ broker and utilize both subscription and publish actions - this certificate provisioning is simply to establish a connection with the broker using TLS, which is required for devices connecting to a HiveMQ Cloud deployment. Based on the images provided, it looks like HiveMQ Cloud is the deployment in question here.
To confirm, is the EPS32 client connecting to the HiveMQ Cloud broker using the same username and password as utilized with the web client, and is there any validation of successful connection or subscription when connecting with the ESP32 client? If we are able to validate that the ESP32 client has successfully connected, and then successfully subscribed to the appropriate topics, this may help pinpoint where connectivity failure is occurring. Additional information, such as the ESP32 library in use, or the full steps you are currently using to test connectivity, may help us as well.
Aaron from the HiveMQ Team
I already solved the problem making my ESP32 publish and suscribe topics to the MQTT broker.