Unable to send to a private broker (non sparkplug) despite using correct credential

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.

Ignition Transmission Module publish non-sparkplug payload? - Ignition Modules / MQTT Modules - Cirrus Link Forum

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.

On the first issue:

  1. What MQTT Server implementation is it?
  2. Does it support MQTT v3.1.1?
  3. What credentials are required to connect?

On the second issue, the scripting API has changed in Ignition 8.3. See here for details: MT: Python Scripting - MQTT Modules for Ignition 8.3 - Confluence

Hi @wes.johnson ,

  1. I am not sure on the type of the MQTT server implementation (let me get back on this), but it is deployed on a google cloud.
  2. It does support MQTT v3.1.1 as I have published to the broker via node red mqtt node via MQTTv3.1.1
  3. It is using basic authentication which is username and password.

So there is an update on the mqtt transmission module for ignition 8.3, I have been using mqtt transmission for ignition without the version for the past few day to search for help.

Anyway, deeply appreciate for this link and thanks!

It sounds like the MQTT Server should be able to accept the connection. Does the server (via logs or something similar) give any indication of what it doesn’t like about the connection? That should just work. We use MQTT Transmission with username/password all the time. I’d recommend double-checking your username and password again to make sure it is correct. The best way to do this is to re-enter it in the config. Also, it is the ‘RPC client connection’ we are talking about here. So, make sure you are entering the config in the correct place per this doc: MT: Configuration - MQTT Modules for Ignition 8.3 - Confluence

As for the Transmission module version, this is the compatibility chart. We always recommend using the latest official release if possible. Ignition Compatibility with Cirrus Link Modules - MQTT Modules for Ignition 8.3 - Confluence

You are right Wes !

I have been providing my credential on the wrong section (the main) instead on the RPC client connection :sweat_smile: ! And now it is connected and working now :partying_face: !

Zillion thanks to you man :clap: :saluting_face: :+1: !!!

1 Like