Using a Z-PASS2 to create multiple devices and dashboards

Using device and dashboard templates functionalities, it is possible to automatically create a device and a dashboard for every new Z-PASS2 connected to Databoom.

 


 

1. Creating a device template

The template is the "model" that is used to create all the devices that use it to connect to Databoom. Therefore every new Z-PASS2 will have same settings and signals.

To create a device template:

    • Choose the type of device Template Device
    • Fill other fields in Info section as you please
    • Select type of device MQTT Template Device section
    • Add signals to the template, in the example the following signals were added template_signal_1template_signal_2 and template_signal_3
      • Every device created with the template will have the same signals
      • Signals must have the Z-PASS2 variable descriptions as tokens
      • Once signals are added to the template it is possible to access their edit page by clicking their labels in the device template view page
      • Signals removal must be done in the template edit page, by clickyng the X next to the corresponding label
    • Set a project, we use Tutorial for the example
    • Set a data publication topic and a info reception topic, in the example we have Data and Info
    • After all the fields have been filled, the situation should reflect the one in the image:

 


 

2. Z-PASS2 configuration

Z-PASS2 allows to customize all parameters needed to publish data to Databoom broker in MQTT Configuration.

Fields to set in the configuration are:

  • ClientID, the ClientId field, displayed in the Databoom device template;
  • Broker Host, Databoom broker, mqtt.databoom.com;
  • Broker Port, port to connect to the broker, 1883;
  • Username, username to access Databoom;
  • Password, an OAuth token generated in Databoom with Publish and Create permissiosn
    • In Settings -> Credentials side menu, click the Add OAuth button in the OAuth keys box
    • To grant better security we reccomend to create a new OAuth token for each istance of the template
  • Publish Topic for Logs, it's the value of Topic where publish data set in the Databoom device template
  • Publish Payload for Logs, data format used for data publication
    • {
      "type": "data",
      "message": { "device": "<device token>", "date": "%d", "signals" : [%b] }
      }
    • <device token> is the token of the device template created in Databoom
    • %d is automatically substituted with the date by the Seneca device
    • %b is automatically substiuted with signals data using formatted according Publish Bulk Format field value
  • Publish Bulk Format, single signal data format
    • {
      "name": %jn,
      "value": %v
      }
    • %jn is automatically substiuted with the variable description by the Seneca
      • A signal with this value as token is created in Databoom
    • %v is automatically substiuted with the variable value by the Seneca
  • Publish Topic for Alarms, topic where to publish alarms, it is possible to use Topic where publish data value again
  • Publish Payload for Alarms, format used to publish alarms in Databoom
    • {
          "type": "alarm",
          "message":  {
            "dateOn": "%t",
            "description": "%jx",
            "status": "ON",
            "ack": "NACK"
          }
      }
    • %t is automatically substituted with the date by the Seneca
    • %jx is automatically substituted with the alarm message by the Seneca
  • Subscribe Topic, subscription topic where data is received, it is the value of Topic where are possible to receive information from Databoom in Databoom device template

 


 

3. Transmitting to a template/Device generation

Once the template in Databoom is created and the Z-PASS2 configured, the first communication between the device and the platform automatically creates a device with the same settings of the template.

  • The template token followed by the <user generated unique value> is used as description for the new device
  • Description can be edited from device edit page

 


 

4. Creating a dashboard as template model

To create a dashboard template at least a signal of a device generated by a template has to be included in each of its widgets, so they can be subsequently substituted with the signals of other devices generated by the same template.

The example dashboard template_signals is filled with widgets that rapresent the signals template_signal_1template_signal_2template_signal_3 of the device 0jlr635hvf-device_from_template generated by template.

 


 

5. Creating a dashboard template

To generate a template click the + button in the row corresponding to the dashboard created in the previous step in the Dashboard Manager page. By confirming the modal, the template is listed in the dedicated section.

 


 

6. Set dashboard template in device template

By accessing the device template edit page, it is possible to set the dashboard template in the Template dashboard field.

 


 

7. Configuration complete

Once the dashboard template is set in the device template, configuration is complete. Every new Z-PASS2 that is connected to Databoom will automatically have a corresponding device and dashboard.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.