Hello, I’m trying to use ignition tags to publish data to a MQTT server in this case MQTTx. I can publish data from MQTTx to ignition and it shows up in designer so all my ports/connections are working but how do I do this in reverse? When I go to the MQTT engine in tag browser I have a default tag that says if I add a tag here it will publish to the connected MQTT server but the option to add a tag is greyed out? and I’m in read/write mode.
Hello Ellie,
This Tag and those comments are for the Transmission (default) provider Tags at the Edge and not for Engine Tags. You can add additional Tags and Folders for publishing at this ‘default’ provider at the Edge Gateway.
As you noted, published MQTT Tags are written into the MQTT Engine managed Tag provider while using our MQTT Engine module. This is where MQTT and MQTT Sparkplug messages will arrive from your MQTTx Client (through your MQTT Server) if the Engine User is subscribed to the proper Topics as controlled by your Server.
But you cannot manually add any Tags in this managed Tag Provider. However, you can create Gateway scripts on any Tags in that Provider to publish an MQTT message.
By default Engine can be configured to write back to any Transmission Sparkplug Tags (shown) that arrive in the Edge Nodes folder as these are Sparkplug formatted which is the formatted payload Engine will produce in that command message. Your example shows those to be MQTT Transmission module Tags.
But if the incoming Tags are not Sparkplug Tags but are instead MQTT Tags then you must script a reply using the Gateway Event scripts tools. See these examples in the tutorial below.
https://docs.chariot.io/display/CLD80/MQTT+Publishing+via+MQTT+Engine
Something else to consider is that there may also be some ACL or other changes required at your MQTTx Server for the Engine user to publish messages through that Server.
When using our Server products (MQTT Distributor or Chariot) there are no changes required for the default Users for MQTT messages publishing or subscribing from any MQTT Clients.
Regards,
Daniel
Hello, Thank you for the reply. It makes sense, so basically to publish data from ignition to mqtt I have to use scripting?
Ellie,
To publish MQTT data from Ignition you must use the publish script tools either from Engine or from Transmission. These modules are designed to publish MQTT Sparkplug messages by default and you can write back to one of those Tags, but you cannot add another Tag in this provider.
I am not clear as to what you are trying to publish from Engine. Your original post was in an attempt to add a Tag to MQTT Engine provider which is not allowed.
Perhaps you can tell me what you want to accomplish? What was the reason to add a Tag to the MQTT Engine provider?
Daniel
Hello, Sorry for the confusion. What I’m trying to do as a whole is create Ignition Tags using ramp tags
and be able to publish these to a MQTT broker (HiveMQ) and visualise these data changes in a MQTT server (MQTTX). I thought I could achieve this through the MQTT modules which was why I was asking about them before.
Ok. To publish Tags from Ignition you will need to use our MQTT Transmission module. And you’ll create your Tags in the default provider and configure your MQTT Transmission Transmitter to look into that provider, and set the Tag Path (source) of your Tags. Examples of that configuration is in tutorial below.
https://docs.chariot.io/display/CLD80/MQTT+Transmission+Transmitters+and+Tag+Trees
You might also look at this tutorial below for a more complete idea of how our modules work together.
https://docs.chariot.io/display/CLD80/Getting+Started%3A+Two+Ignition+Architecture
If you have additional questions perhaps a phone call would be best? You can reach Support at 844-924-7787 8am-5pm US Pacific timezone
Regards,
Daniel
Makes sense now, Thank you!
Hi, I really had the same question. I have IoT sensors and telemetry in the field that publish MQTT directly and these work great for ingesting data but there is no simple way to publish MQTT to these devices. It would be very nice if you could add a feature that could publish simple tags without the need for scripting. For example, if we could create a tag that either publishes “on change” or “on interval” to either a specified topic or even a topic derived from the tagpath.