How do I disable/configure the Transmission Module to send plain MQTT data payloads?
Transmission is fundamentally based on the Sparkplug specification. However, it is possible to publish as JSON instead of Sparkplug encoded protobuf messages. This is under Transmission → Settings → Servers → Settings → Advanced → Data Format Type
I should note that if you change this to publish as JSON, it will NOT be consumable by MQTT Engine or other Sparkplug Host Applications.
In addition to the above, it is possible to publish your own custom messages from MQTT Transmission. See this link for details: MQTT Publishing via MQTT Transmission - MQTT Modules for Ignition 8.x - Confluence
Thank you Wes for the quick response - I will look at the options you suggest.
Hi Wes, i have mine setup this way but the topics are still coming into the broker with the topic structure spBv1.0/etc…
How can I send non sparkplug B topics and have them show up without the sparkplug B prefix?
Is that a setting in the transmitter?
There are two ways to not use the Sparkplug namespace when publishing messages via Transmission.
- Publish your own free-form messages via Python scripting as noted previously above: MQTT Publishing via MQTT Transmission - MQTT Modules for Ignition 8.x - Confluence
- Use a UNS Transmitter. See here for details: Using MQTT Modules in a UNS Architecture - MQTT Modules for Ignition 8.x - Confluence
Hi Wes, I am using the scripting module and the transmission module only. I am currently not using the Engine (I can if necessary) as I am trying to POC the data movement.
If I want to disable the prefix, does that have to be done once or every time I run the script?
I.E…
# Disable UNS topic prefix (unsA1.0)
transmitters = system.cirruslink.transmission.readConfig("UnsTransmitters")
name = "UNS Transmitter"
for transmitter in transmitters:
if transmitter["Name"] == name:
transmitterId = transmitter["Id"]
transmitterProps = {}
transmitterProps["UseTopicPrefixToken"] = False
system.cirruslink.transmission.updateConfig("UnsTransmitters", transmitterId, "MergeOverwrite", transmitterProps)
This updates the Transmission configuration in the internal Ignition DB. It only needs to be done once, unless you want to change it again.
Thanks,I appreciate it!