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

    How-To: Using JSON & Map with MQTT

    UIFlow
    1
    1
    6.0k
    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.
    • J
      Julian
      last edited by

      Since this took me a while to figure out the best method, I thought I would share.

      If you are posting JSON data to MQTT and want to use a property of a topic to populate a label:

      Posting JSON to MQTT:
      0_1583017358008_8ba32501-f08b-4a58-adc0-487669eb9160-image.png

      Getting a value from a specific property of a topic:
      0_1583017407496_2c7f7627-7a9f-43b6-9297-2a2caae9ba72-image.png

      Annoyingly, without the ability to set the retain flag and QoS in MQTT, UIflow's support of it remains just a toy.

      In addition, we really need a flag that tells us when the MQTT connection has actually started because there seems to be a significant delay before it works.

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