SENECA Z-LOGGER3/Z-GPRS3


Z-LOGGER3/Z-GPRS3

Configuration in Databoom

Databoom sees SENECA device as an MQTT device that can also be set as a template (refer MQTT device e MQTT template).

  • Create a new device and select the MQTT type
  • In the MQTT section:
    • Add a Project, it will be the "root" of the topic
    • Specify a topic to publish data from the device and a topic to subscribe where Databoom info will be published

Once device creation is confirmed, the ClientId, publication topic and subscription topic are displayed in device page.

 


 

It is then possible to proceed with signals creation.

  • Add a signal to the newly created device
  • Access the signal edit page, it is important to set:
    • the Custom topic where publish data that must match the variable that will be defined in the SENECA SeAL Graph Editor (in the MQTT Gateway screen, it is the variable at the end of the topic)

      es. seneca/0iijo2rwgw/data/V1 

    • the Transformation function for published data that takes the payload published on the signal topic and returns it converted in the format
       {
         'date': ,
         'value': 
       }
      

      or, if historical series,

        [
          {
            'date': ,
            'value': 
          },
          {
            'date': ,
            'value': 
          },
          ...
        ]
      

      es. In the following picture, an hypothetical payload obj is used, where tms is a field containing the date and val a field containing the variable value, you can use a function like:

      function managePayload(payload) { 
      var obj = JSON.parse(payload);
      return {
      'date': new Date(obj.tms * 1000),
      'value': obj.val };
      }

  • SENECA SYSTEM SIGNALS, Seneca devices use some default topics to start MQTT connection and manage the Last Will and Testament. It is therefore essential to create three signals and map the corresponding topics:
    • act
    • app
    • sts
    Signals can be customized by the user (description, type, ...) but it is required to set the  Topics where publish data respectively act, app e sts

     

 


 

Device configuration

Device configuration is based on the enabling of MQTT protocol inside the SeAL Graph Editor config application (version 2.5.4).

  • Click the icon CLOUD in the toolbar to set the parameters to enable the communication. CLOUD section is enabled only if NET section has already been filled.

  • In the General tab (refer to the screenshot above) fill the fields as follows:
    • APP Name with the value of the field Topic wher publish data in the device page in Databoom (if configuring a device template, be careful to add the device token after the MQTT project, seneca in the screenshot)
    • RTU Name with the client ID MQTT value, it is also available in the device page
    • Lastly enable MQTT client

  • The MQTT Client tab must be filled with MQTT broker connection parameters (refer the article):
    • Remote Server Name is mqtt.databoom.com
    • Port is 1883
    • Select Authentication Required and fill the fields.
      • User Name field must match user's Databoom username
      • Password is an OAuth token with Publish permissions generated in the section Settings -> Credentials in Databoom
    • Give a value to Analog Deadband Delay
    • Remove Connect To CloudBox option selection so the arrow button turns enabled. Click the button to access MQTT Custom Settings
    • Check the Append Application Name Prefix to all TOPICs checkbox, so the publish topic is correctly stored in the variables to forward
    • By checking the Use label for Variable TOPIC option, labels will be used in place of ids in topics
    • Check the JSON Payload checkbox

To set the variables to publish in Databoom, access the MQTT section from the toolbar.

  • Click the MQTT icon in the toolbar to select the variables to publish among the list
  • If all the steps were done correctly, the Publish Topic field will consist of the data publication topic specified in the device in Databoom, with the addition of a variable (V0,V1, V2, ... or corresponding labels if the Use label for Variable TOPIC option is enabled)
    • Variables are to be used in signals configuration in Databoom

Configuration complete!

Once previous steps and the build are done, the device will be ready to communicate with Databoom.

Have more questions? Submit a request

1 Comments

  • 0
    Avatar
    Ahmed Amir

    Hello,

    I have followed all of these steps without changing any of the mentioned parameters but it doesn't work.

    Note: I'm using Z-GPRS3 device with access to the internet through ethernet cable

Please sign in to leave a comment.