Setup - Ignition Edge 8.3.1, MQTT Transmission 5.0.1
I have been trying to connect to a private broker to publish some data from a simulated tag but to no avail despite providing the correct credential (tested working using MQTT explorer).
I have used below script on a gateway events tagchange script to publish the tag value:
system.cirruslink.transmission.publish(<broker_name>, <topic>, str(payload).encode(), 0, 0)
In order to verify that the setup is working, I have published it to hivemqtt and it works. As per below reference link, one would require setting the data format type to sparkplug B v1.0 json format and configure the UNS transmitter on the related server set, however, for the hivemqtt connection, no transmitter was created yet connection can be established and published to. I would appreciate if anyone could share how is it so.
Also, as extracted from the above guide, the below script is sending out error that the system.cirruslink.transmission.readConfig function is expecting 2 arguments (only 1 is given).
# 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)
Even if 2 arguments are provided as such, system.cirruslink.transmission.readConfig("UnsTransmitters","UnsTransmitters"), an error saying that the type provided is incorrect despite following below:
system.cirruslink.transmission.readConfig(type) → List
-
Parameters-
String type-
The type of configuration to read with valid options:-
History Stores -
General -
Cert Files -
Servers -
Sets -
Transmitters -
UnsTransmitters (added 4.0.25) -
Records -
Files
-
-
-
I would appreciate if anyone could advise on the issues which I have encountered.
