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

    MQTT connection

    Scheduled Pinned Locked Moved SOFTWARE
    11 Posts 4 Posters 4.8k Views
    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.
    • felmueF Offline
      felmue @travisstdenis
      last edited by

      Hello @travisstdenis

      have you tried to connect to test.mosquitto.org? Does that work or are you getting the same error?

      Thanks
      Felix

      GPIO translation table M5Stack / M5Core2
      Information about various M5Stack products.
      Examples

      T 1 Reply Last reply Reply Quote 0
      • ajb2k3A Offline
        ajb2k3 @travisstdenis
        last edited by

        @travisstdenis The connection blocks need to bee in the loop not the setup.

        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!

        T 1 Reply Last reply Reply Quote 0
        • T Offline
          travisstdenis @felmue
          last edited by

          @felmue i couldn't get a connection to test.mosquitto.org but i could for Adafruit. I setup this connection
          uiflow_setup_2.png

          I get a nonsense error on the screen about some unrelated rectangle UI block in the setup about

          TypeError: extra keyword arguments given
          

          When I look at the serial data i get:

          >>> E (8014) mqtt_client: Error create mqtt task
          E (23515) mqtt_client: esp_mqtt_client_init(800): Memory exhausted
          E (23515) mqtt_client: Client was not initialized
          E (23516) mqtt_client: Client was not initialized
          

          I have tried this several ways. with and without the https:// in the server, with keepalive values of 0 or 300, in and out of the "if connected to wifi" block. The image shows the only way I've gotten some kind of response that gets me closer.

          1 Reply Last reply Reply Quote 0
          • T Offline
            travisstdenis @ajb2k3
            last edited by

            @ajb2k3 I have the "MQTT Apply For Messaging" block in the Loop. Everything I have seen has the connection parts in the Setup. Are you saying I need to have the MQTT Init block from the setup in the Loop?

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

              Hello @travisstdenis

              please have a look at my example for test.mosquitto.org and io.adafruit.com in the UIFlow2 Project Zone called: M5Core_MQTT_WLAN_UIFlow2.1.4

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Examples

              T 1 Reply Last reply Reply Quote 0
              • T Offline
                travisstdenis @felmue
                last edited by

                @felmue that worked! So it was just the addition of those other WiFi blocks that did it. The Serial output had said Wifi connected before, but I guess not.

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

                  Hello @travisstdenis

                  thank you for reporting back. I am glad to hear you got it working.

                  Thanks
                  Felix

                  GPIO translation table M5Stack / M5Core2
                  Information about various M5Stack products.
                  Examples

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sbeeker @travisstdenis
                    last edited by

                    @travisstdenis Can I ask how you even got the MQTT blocks in the UIFlow2. Am not seeing any MQTT at all in the GUI.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sbeeker @felmue
                      last edited by

                      @felmue Can I ask a more basic question? I am not seeing the MQTT block in the UIFlow2 web guide? I see no way to add any "libraries" etc either. WhenI search with google or use the M5AI chat I get really that is is there if I used my API key. When is another item of question on how you enter that. I did install / download of UIFlow2 to M5 device and now the Screen gives me a key etc. Not sure where or what to do with this.

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

                        Hello @sbeeker

                        UIFlow2 doesn't use API keys. (Only UIFlow1 used them.) Are you sure you installed UIFlow2 firmware onto your M5Stack
                        device?

                        Use M5Burner from here to install UIFlow2 firmware (as an example for M5Core2) then use your browser to go to UIFlow2.

                        M5Burner_UIFlow2.0_M5Core2.png

                        Thanks
                        Felix

                        GPIO translation table M5Stack / M5Core2
                        Information about various M5Stack products.
                        Examples

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post