Core 2 MQQT fails to publish on topic
I have followed various MQTT tutorials , none of them mention about connecting to the internet via WiFi before running the MQTT protocols, they just show the MQTT Code?
Am I correct in assuming that M5FLOW requires you to connect to a WiFi connection ? or does the code auto connect using the last known WiFi SSID and Password ??
Does anyone have a full example of code that works .
I am using a cloud Broker and have succesfully set up and tested using Android clients so I know the credentials and so on are correct,.
Any pointers or help greatly appreciated.
felmue last edited by
in my experience it depends. If you use
Runthen the already setup WiFi connection (which is used to connect to UIFlow server) is used.
However when you use
Downloadit only works until you reboot your device.
So what I do in my UIFlow programs which need WiFi: I add the necessary block in setup anyways.
See this thread about how to do that.
ajb2k3 last edited by
As @felmue has said, If you run it live using the run button, it will connect to which ever network the S3device is connected to where as if you use the download you need to have the Wifi credential blocks added to the setup.
What MQTT guides have you been following?
I have a standalone MQTT server on an M5Stack CM4 Stack running to test MQTT and IOT.
many thanks for your helpful reply , I managed to get it working by adding the wifi code blocks , you r link was of interest too !
started with this https://youtu.be/5RozKI-3i4Q..
My project is to monitor power , security , humidity , temperature and water leaks at a remote business premises . Thats part 1
Part 2 is to push actions over MQQT based on reports .
Will be using a Stick C plus for sensing and Core 2 at home plus Andoid app for real time alert.