How-To: Using JSON & Map with MQTT



  • 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.