From the looks of it, you are passing the publish method a dictionary for the payload.
If I'm not mistaken, the method is expecting a byte[]
for the payload, not a dictionary.
system.cirruslink.engine.publish(String serverName, String mqttTopic,
byte
[] payload,
int
qos,
boolean
retain)
MQTT Publishing via MQTT Engine - MQTT Modules for Ignition 8.x - Confluence (chariot.io)
You are converting your dictionary to a JSON string (payloadStr), but not actually using it. Try this instead:
system.cirruslink.engine.publish("Chariot SCADA", topic, payloadStr.encode(), qos, retain)
You can also take a look at this post:
Publish to topics using system.cirruslink.engine.publish() - Ignition - Inductive Automation Forum