MolsonB
n3wb
I am using a software library that sends a "string" (text) to your MQTT server. The terms in the braces are substituted with the On Guard values. The only things that On Guard recognizes are the ones in the MQTT setup screen. What happens is that the recognized terms are substituted for the values On Guard has. Anything else is exactly like you entered it (literal text). Note that the terms in braces must be there exactly (including case).
So, for the motion started message topic {Camera} gets the camera name, {Area} gets the area name, {Motion} gets "on". For the Payload {File} gets the motion file name, {Confidence} gets the confidence level, {Object} gets the object label found by DeepStack", {Motion} gets "on"
With these exceptions (slightly different for the motion stopped message) I send what you enter. The library does the rest. I don't know or care (much) what the JSON message looks like since I don't form it myself. By the time things get to the library there is just plain text.
I'm not sure if this answers your question or not.
It's just coincidence that both JSON and you use "{" as the special character. All that is good, no issues there. It's for people who integrate this into home assistant. For us to use the file name for example, it needs two backslashes / to be recognized on home assistant end of things as 1 backslash. Since Home assistant uses JSON when receiving mutli data fields in 1 mqtt message. Using a JSON library, it will contain "json_encode()", that function will take care of all the special characters for you. OR since the file name is the only issue I can see, just adding two backslashes instead of one will work. I'm probably not explaining myself, we can chat offline to keep the clutter down here.