Secomea

 

It is possible to configure your Secomea device so it can communicate with Databoom, by importing MQTT certificates generated by the platform.

 


 

Creating a device in Databoom and generate certificates

First operation to do is creating an MQTT device in Databoom

  • Access in Databoom
  • Move to the Devices section in the side menu
  • Click the Add a device button
  • Select the type of device MQTT (refer the support article for the correct configuration)
  • Of particular importance is the Topics  where publish data field, that is used from the Site Manager as a"channel" to forward data to Databoom. The topic is generated by merging:
    • a project, a value chosen by the user, eg. test
    • the device token, eg. 0ro3ubpc5m
    • publication topic, eg. push
    • eg. test/0ro3ubpc5m/push

  • Fill the other fields and confirm the device creation
  • In the device detail page buttons to download certificates are displayed, respectively:
    • Certificate chain, databoom-ca.pam
    • Client private key, client-key.pem
    • Client certificate, client-cert.pem

  • To configurate Secomea device you'll need 
    • Device token
    • ClientId 
    • Topic where publish data
  • You don't need to add signals to the MQTT device in Databoom, they are automatically created at the first communication with the SM

 


 

Secomea base configuration

Before adding device parameters in the configuration, you need to check some other settings in the SiteManager GUI

 


 

Secomea Agents Configuration

  • Move to the GateManager section, therefore in Agents to create an agent by inserting its IP address. There are two main cases:
    • a simulator is used, the address is 127.0.0.1

    • a PLC is used

    In both scenarios, you need to select DCM checkbox
  • Agents turn to IDLE status, the desired one, only if the SM is connected to the GateManager server, therefore to internet. It is possible to display connection status from the wizard setup page

    • When an agent is created a check is done to see if the device is reachable. In the status column you'll see:
      if not reachable -> status = DOWN
      if reachable -> status = IDLE

    • When there's no connection, the check can't be done and the status stays at STRTING. In this scenario the DCM doesn't log data

  • Click the hand icon and proceed with the edit, the DCM Collector Name field must be filled with a collector name matching the name in the JSON
    • Always on flag allows to skip the status check and makes the agent at IDLE status
  • Previous steps must be followed carefully so the DCM can start correctly. If the SM doesn't find the collector with the correct name, a "No Collector with that name" message is displayed in the DCM -> Status section:

    while in the corresponding section:

    If the configuration has be done correctly, the following  status is shown:

  • Another setting to check is the time synchronization in System -> Time

    If synchronization is not correctly set, an error message is shown

  • As last verification, check the SiteManager to be authorized to connetct to mqttcert.databoom.com on TCP port 8883. A tool is available in Status -> Ping/Trace to verify TCP connectivity. You have to choose the correct output interface uplink/uplink2. If the check is correct, OK messages are displayed

 


 

Secomea device configuration

  • Move to the DCM section of the menu
  • Move to the Settings section and insert the ClientId value generated by Databoom in the Override DCM EdgeID field

  • Access the Certificates section to add the certificates generated by Databoom
  • Click the New button for each file and select the type:
    • AWS ROOT-CA for databoom-ca.pam, assign the name databoomca
    • AWS Device Certificate for client-cert.pem, assign the name devicecert
    • AWS Device Private Key for client-key.pem, assign the name devicekey
    The name field set for the certificates will be used to refer them next in the configuration

  • Move to the Edit section to update the configuration

  • Follows the configuration to add to the DataServers array (fields to edit according your device settings are in green)
       {
         "DatasrvName": "aws_iot",
         "DatasrvProtocol": "AWS\/MQTT",
         "ConnectRetryMin": 2,
         "ConnectRetryMax": 240,
         "MQTTAWSParams": {
           "BrokerAddr": "mqttcert.databoom.com",
           "BrokerPort": 8883,
           "RootCA": "databoomca",
           "DeviceCert": "devicecert",
           "DevicePrivKey": "devicekey",
           "PublishQos": "qos1",
           "PublishInterval": 60,
           "TopicFormat": "test/0ro3ubpc5m/push",
           "PayloadFormat": "{ \"type\": \"data\", \"message\": { \"device\": \"0ro3ubpc5m\", \"date\": %t, \"signals\" : [ { \"name\": \"%js\", \"value\": %jv } ] } }"
         }
       }
          
  • Certificates added in the previous steps must be referred with their names in the corresponding fields:
    • RootCA for the AWS ROOT-CA (databoom-ca.pam to which we assigned the name databoomca)
    • DeviceCert for the AWS Device Certificate (client-cert.pem to which we assigned the name devicecert)
    • DevicePrivKey for the AWS Device Private Key (client-key.pem to which we assigned the name devicekey)
  • The TopicFormat field must be filled with the value of Topics where publish data set in the device in Databoom
  • The PayloadFormat is the format used to forward data to Databoom, in the payload the device token is used
    { \"type\": \"data\", \"message\": { \"device\": \"0ro3ubpc5m\", \"date\": %t, \"signals\" : [ { \"name\": \"%js\", \"value\": %jv } ] } }
  • Pay particular attention to the fields TopicFormat and PayloadFormat. Values in this article are only for example purpose, the values displayed in your device in Databoom must be used instead.
  • Sample Points declared in the DCM are automatically published as signals in Databoon and you only need to validate them on the platgorm.
    • Take as an example the SampleName sine in the default configuration
          SamplePoints": [
              {
                "SampleDataType": "double",
                "SampleDescription": "SDCM simulation of  sine curve",
                "SampleLimitAlarm": true,
                "SampleLimitDiscard": false,
                "SampleLowerLimit": -1000,
                "SampleName": "sine",
                "SampleUpperLimit": 1000,
                "SamplesSaved": 300,
                "SimulatorData": {
                  "SimulatorFunction": "sine",
                  "SimulatorIncValue": 100,
                  "SimulatorInitValue": 1000,
                  "SimulatorSampleInterval": 1
                }
              }
            ]    
      Once the connection is established it will be abailable as a signal with sine as description in Databoom
  • If  all the configuration has be done correctly, this should be the current status in  DCM -> Status

 


 

Configuration completed!

Once the procedure has been completed, Databoom starts to record data sent from the Secomea. To examine your data and have a correct representation, follow the instructions in Edit/validation of a signal.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.