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:

    Getting a value from a specific property of a topic:

    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.