Custom Payload
  • 03 Mar 2023
  • 1 Minute to read
  • PDF

Custom Payload

  • PDF

Article Summary

How to create a Custom Payload

Note:
This feature is new in N3uron version 1.21.3
  • Step 1: Create the module: (Config => Modules =>Model=> New module 

Figure - New module(1)


  • Step 2: Provide a name for the module (in this case MQTTClient), assign the module type to MqttClient and save the new configuration.

Figure MQTT - Creating a Module Instance


  • Step 3: Configure the Logger and API sections (usually the default values are sufficient). Save the configuration.

Figure MQTT - Logger


  • Step 4: Create the connection to the MQTT Server. Each connection is an independent MQTT client.

Figure - New Connection


  • Step 5: Configure the MQTT Client. In this case, select version MQTT 5.

Figure - Custom Payload Config


  • Step 6: Once configured, let's create a new Publisher. To do this, click on Agents and select New Publisher MQTT 5.

Figure - Custom Payload Config 2


  • Step 7: Now, select Custom in Serialization, to allow the creation of a Custom Payload. 

Figure - Example 3


  • Step 8: As we can see, when Custom is selected, the possibility to create the corresponding script is available. To do so, click on the button to the left of the Script field.

Figure - MQTT Script


  • Step 9: The following figure shows an example of a script that can be used to parse events to the custom payload.

Figure - Script(1)


MQTT Client Full Product Details 


Was this article helpful?