🤖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

    Scheduled Pinned Locked Moved UIFlow
    1 Posts 1 Posters 6.8k Views 1 Watching
    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 Offline
      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

      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