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 a Secomea 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 Secomea SiteManager
- 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
- the device token
- publication topic
- topic has default value secomea/DEVICE_TOKEN/snd, doesn't need to be changed
- Fill the other fields and confirm the device creation
- In the device detail page buttons to download configuration file SITAMANAGER.CFG is shown (ADVANCED USE, certificates buttons can be displayed, they're already included in pre-filled configuration file)
- You don't need to add signals to the MQTT device in Databoom, they are automatically created at the first communication with the SM
- Once the device has been created you can download SITEMANAGER.CFG the basic configuration pre-filled with required parameters that can be directly imported from the SiteManager (Maintenance->Import)
- To configurate Secomea device you'll need
- Download configuration file SITEMANAGER.CFG
- Other parameters are already included in pre-filled configuration file
Secomea device configuration
There are two possible ways to configure a Secomea device:
- By using the pre-filled configuration SITEMANAGER.CFG generated by Databoom to import via USB or XML
- ADVANCED USE, by manually setting parameters in the DCM section of the SiteManager (at the bottom of this article)
Secomea device configuration via USB
- Click on Download XML/CFG configuration in the device page in Databoom
- SITEMANAGER.CFG containing the pre-filled (device token, clientId, topic, certificates) basic configuration is downloaded
- Copy SITEMANAGER.CFG on a USB FAT 32 (singola partizione)
- Insert USB key while Sitemanager is already running with a UPLINK/UPLINK2 internet connection
- Check led status, it should blink with a red light at 1hz
- At the end of boot, with red led still, remove USB
Secomea device configuration via XML
- Click on Download XML/CFG configuration in the device page in Databoom
- SITEMANAGER.CFG containing the pre-filled (device token, clientId, topic, certificates) basic configuration is downloaded
- Move to the Maintenance section of the menu
- Click on Import and select the file then confirm
- You can also copy configuration file content directrly in the SiteManager
- Once import is completed reboot
SiteManager connectivity
With both procedures you should have the following result, go to the SiteManager menu 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.
PLC configuration
For a PLC configuration guide go to the following link https://kb.secomea.com/docs/data-collection-module-by-secomea-introduction or contact support at support@direl.it
ADVANCED USE
XML or USB configuration methods already allow Secomea full connectivity. Following sections are for advanced users with full SiteManager knowledge.
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
- 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 = DOWNif 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 manual 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
- 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
- Take as an example the SampleName sine in the default configuration
- If all the configuration has be done correctly, this should be the current status in DCM -> Status
0 Comments