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

    CORE2 HIVEMQ

    Core 2
    7
    33
    48.9k
    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.
    • ajb2k3A
      ajb2k3 @felmue
      last edited by

      @felmue said in CORE2 HIVEMQ:

      Hi guys

      after long hours of searching and trying different things I finally stumbled over the missing piece here.

      For HIVEMQ the server_hostname seems to be required which is part of the SSL parameters. In order to add that the regular MQTT block cannot be used, but the Execute block can fix that. Here is what works for me:

      0_1646259139268_UiFlow_HIVEMQ_20220302.png

      Thanks
      Felix

      Thanks @felmue Have you contacted @IAMLIUBO about this issue and reported it in the UIFlow 1.9.2 discussion?

      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!

      L 1 Reply Last reply Reply Quote 0
      • J
        Javi
        last edited by

        Hi @felmue @ajb2k3

        It finally works. Thank you so much guys for everything. Now I need to change the Qos of the messages I publish to 2, but I think UiFlow does not have that function implemented yet and will add in a future version.

        Javier

        1 Reply Last reply Reply Quote 1
        • L
          LBP of MO @ajb2k3
          last edited by

          @ajb2k3 Thanks so much! This worked perfectly on my M5stickcplus. We have been testing this about a week with no issues other than battery life.

          Today for some reason it just stopped publishing the message. If we try it from MQTT.fx it still works. Now I am just confused. Could HiveMQ cloud have made a recent change that effected how this works?

          This is the first time I have "MQTT'd" or used the M5StickCplus and until tonight it has been a hoot!

          The M5sick still looks like it is functioning as it did yesterday. Is it possible it failed in someway? I have burned it and reinstalled the UIFlow program to no avail.

          Thanks in advance BTW!

          Paul

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

            Hello guys

            I think the issue is in UiFlow 1.9.5. The MQTT publish command now supports QoS, but it seems that breaks the publishing to HiveMQ. :-(

            Thanks
            Felix

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

            L J 2 Replies Last reply Reply Quote 0
            • L
              LBP of MO @felmue
              last edited by

              @felmue - I use the desktop 1.0.17 UiFlow version. Also, I did not reload the M5stick but it just stopped working. (??) Is there a way to access/load an older version of UiFlow to try to get this working again? Thanks for all you have done BTW.

              Background: I found a digital signage offering that has both live TV and the customers content. We discovered that it can switch back and forth between the content feeds with MQTT commands.

              We wanted a wearable button that would switch to the client content when annoying TV commercials come on. When we see a TV commercial it can be made to disappear with one press of a button. - FUN!

              We decided to start with HiveMQ because will need fewer than 100 devices but need to sort them into user groups.

              Even at 57 and with no programming skills I can grasp Blockly.

              So........

              Is there another broker similar to HiveMQ Cloud?

              Is there another way to program the M5Stick other than UiFlow so it can publish to HiveMQ knowing that I have no skills?

              We we turn on the M5StickC Plus and it automatically connects to WIFI
              Connect to Hive
              Display "Connected" for 5 seconds
              Send command: {"operation": "layout/set", "parameters": {"layoutId": 2, "length": 360}}
              Display "Published" for 5 seconds
              Display Battery percentage for 5 seconds
              Power off the M5stick. (This gives us 3 to 4 days of use on a single charge)

              This has been a fun project so far - A few weeks ago I did not even know what MQTT was!

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

                Hello @LBP-of-MO

                In M5Burner for each M5Stack device there is a drop-down menu through which you should be able to select older UIFlow firmware versions to download and burn.

                Good luck!

                Thanks
                Felix

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

                1 Reply Last reply Reply Quote 0
                • ajb2k3A
                  ajb2k3
                  last edited by

                  The desktop version is broken and unsupported at present. I'm hoping that it will be rebuilt for version 2.0.

                  @lbp-of-mo said in CORE2 HIVEMQ:

                  Even at 57 and with no programming skills I can grasp Blockly.

                  • Paul

                  This is what brought me to UIFlow!

                  I have been writing an ebook on IOT and would appreciate any help https://www.amazon.co.uk/IoT-M5Stack-UIFlow-ebook/dp/B09XF22QV9/ref=sr_1_2?crid=39P4GN2F0YL6F&keywords=IoT+with+M5Stack+and+UIFLow&qid=1649573615&sprefix=iot+with+m5stack+and+uiflow%2Caps%2C67&sr=8-2

                  I'm working through Blynk at present and haven't had time to invest in Hive MQ but have you looked into setting up a private MQTT server on a raspberry pi?

                  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!

                  1 Reply Last reply Reply Quote 0
                  • J
                    Javi @felmue
                    last edited by

                    @felmue Hi,
                    I used the new publishing method with Qos in UiFlow with HiveMQ last Friday and it worked perfectly I do not understand why today it does not work.

                    1 Reply Last reply Reply Quote 0
                    • J
                      Javi
                      last edited by

                      Ok guys,
                      I have seen where is the problem. Last week messsages with QoS 2 did not work and I told to m5stack support team. Maybe they are now working on it as now if you put QoS 0 or Qos 1 it works with HiveMQ as always. I hope they fix that soon and we can work with Qos2.

                      L 1 Reply Last reply Reply Quote 0
                      • J
                        Javi
                        last edited by

                        Hi again and I hope this is the last one.
                        Now I have discovered another thing. Due to the bug that skip 2 characters of the message you publish when you are working with Qos2 in UiFlow, if the message you are sending is less than 2 characters the server seems to do not even receive the message. So try to always send a message longer than 2 characters when you use the Qos2 in UiFlow.

                        Another thing M5Stack should fix is that you do not really send a QoS 2 message when you send it, it sends a QoS 1 as maximum.

                        1 Reply Last reply Reply Quote 1
                        • J
                          Javi
                          last edited by

                          Hi @ajb2k3 @felmue
                          I have been working with the configuration you told me to connect with HiveMQ cloud with ssl. Now, using it I have seen an error. It does not subscribe to the topics a need to. See an easy example.
                          0_1649840402752_2022-04-13 (2)_LI.jpg
                          Here, when I press the button, the message "vamos" is send and it appears in the broker topic "hola" as it has to. But the button does not turn red. If I use the MQTT configuration block instead of the one that execute the code to connect it to a public server it all works properly, but I need to do the same in the private server with the ssl.
                          Thanks for your help.

                          1 Reply Last reply Reply Quote 0
                          • J
                            Javi
                            last edited by

                            Maybe there is a parmeter left in the code because I´ve tried to connect to the public server with the code and it happens the same

                            1 Reply Last reply Reply Quote 0
                            • L
                              LBP of MO @Javi
                              last edited by

                              @javi - QOS 0 is what we use. Is there a way to adjust the UiFlow code to make it work as it did before? Or - Is there a different way to program the M5SickCplus to make it work with Hive? Thanks so much!

                              1 Reply Last reply Reply Quote 0
                              • L
                                LBP of MO
                                last edited by

                                @lbp-of-mo The latest UiFlow 1.9.6 version now works perfectly with HiveMQ as it has the missing QoS field. Thanks to everyone that helped me out with this. - Paul

                                A 1 Reply Last reply Reply Quote 1
                                • A
                                  anvalin @LBP of MO
                                  last edited by anvalin

                                  This post is deleted!
                                  1 Reply Last reply Reply Quote 0
                                  • J
                                    jorge5a @felmue
                                    last edited by

                                    @felmue Thanks a lot. This solved my project

                                    robskiR 1 Reply Last reply Reply Quote 0
                                    • robskiR
                                      robski @jorge5a
                                      last edited by robski

                                      for Hive MQTT below works for me Uiflow 2.2.5

                                      mqtt hive m5stack.PNG

                                      M5StickC, M5StickCPlus, M5StickCplus2,M5GO, M5Core, M5Tough, M5Core2, M5 Demo Board, M5Dial, M5Paper, M5Atom, M5Cardputer, M5StampS3, CoreMP135, StamPLC, AirQ

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