🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Core 2 MQQT fails to publish on topic

    UIFlow
    3
    5
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      colmana
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @colmana

        in my experience it depends. If you use Run then the already setup WiFi connection (which is used to connect to UIFlow server) is used.

        However when you use Download it 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.

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        C 1 Reply Last reply Reply Quote 0
        • ajb2k3A
          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.

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          C 1 Reply Last reply Reply Quote 0
          • C
            colmana @felmue
            last edited by

            @felmue

            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 !

            cheers
            Alan

            1 Reply Last reply Reply Quote 0
            • C
              colmana @ajb2k3
              last edited by

              @ajb2k3

              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.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post