Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleMQTT Payload 1
{
    "level": "low"
	"temp": "45.0"
	"alarm": "on"
}

At this point, MQTT Engine will create multiple tags with the tagpaths of:

  • "[MQTT Engine]a/b/level" with a value of 'low'
  • "[MQTT Engine]a/b/temp" with a value of '45.0'
  • "[MQTT Engine]a/b/alarm" with a value of 'on'


Code Block
titleMQTT Payload 2
{
    "level": "lowhigh"
	"temp": "4599.0"
}

MQTT Engine will initially create multiple tags with the tagpaths ofOn the arrival of the second message, the two leaf tags 'level' and 'temp' will be updated so all tags will now look as follows:

  • "[MQTT Engine]a/b/level" with a value of 'lowhigh'
  • "[MQTT Engine]a/b/temp" with a value of '4599.0'
  • "[MQTT Engine]a/b/alarm" with a value of 'on'

Now, when When the second payload arrives on the same topic, since MQTT Engine does not automatically delete tags, it will set not modify the tag "[MQTT Engine]a/b/alarm" to a quality of bad_stale. It will remain as 'good' quality as well.


Tip
Our recommendation to manage MQTT messages published with the same topic and changing payload JSON structures, is to leave parsing as a string, create a tag change script and parse the string in a custom script per your requirements.

...