avatar  


Recently viewed tickets

Log out

Cumulocity as a Dataserver

The purpose of this article is as a reference guide for the use of the Cumulocity as dataserver in Data Collection Module.

This guide is part of the complete documentation for the Data Collection Module feature in SiteManager.

Prerequisite:

A Starter package (SiteManager + accounts) 
A cloud subscription (Trial) from Cumulocity IoT
Other sections in DCM:



Information 

First time users might benefit from using the Setting up Cumulocity IoT guide.


The DataServers (array of objects, mandatory) list elements contains the following fields:
FunctionTypeImportanceDescription
DatasrvNamestringmandatoryUnique (within this configuration file) name for each dataserver, this SiteManager delivers data to. Follows the normal rules for names.
DatasrvDesriptionstringoptionalA description of this data server. For your future reference
SampleListarray of stringsoptional This array contains the list of sampleref, this dataserver will deliver data for. If it is not present, all sample values in this configuration will be delivered. Since this object is not a Collectors object, the CollectorName part of the sampleref field is mandatory. If the SampleName part of the sampleref is left blank, all samples from that collector are delivered.
IOPinbooleanoptionalIf set to true, the Output I/O pins configured to follow DCM dataloss, will be controlled by this datasrv. If multiple dataservers are controlling the I/O pins, then the value will be the logical OR of all dataservers data loss state. (I.e. If any dataserver is in dataloss, the I/O pins will be in logical high). If not set, the value is false.
DatasrvProtocolstring-enummandatoryDesignates the protocol used to deliver data from the Store'n'Forward database to data servers, aka Cloud Systems. For Cumulocity use "C8Y/REST"
Currently 6 possible values exists: "AWS/MQTT", "AZURE/IOTHUB", "SCI/SPD", "C8Y/REST", "SEMA/REST" or "SIMULATOR/NONE".
ConnectRetryMininteger > 0mandatoryMinimum number of seconds before trying to reestablish a connection to the dataserver for data delivery. An exponential back-off algorithm is used to retry connection establishment, starting after ConnectRetryMin and increasing to ConnectRetryMax.
ConnectRetryMaxinteger > 0mandatoryMaximum number of seconds before trying to reestablish a connection to the dataserver for data delivery.
C8YParamsobjectmandatory
for Cumulocity
Contains all the parameters needed to deliver (publish) data to the Cumulocity Cloud service. Mandatory if DatasrvProtocol has the value "C8Y/REST".



The C8YParams object contains the following fields:
FunctionTypeImportanceDescription
C8YRegisterURLstringmandatoryThe URL of the Cumulocity Cloud for registering new devices.
C8YRootCANamestringoptionalThe certname of the Cumulosity Root-CA certificate. If the certname cannot be found only unsecured HTTP server connections can be used. If not specified, the first Cumulocity ROOT-CA found in the cert repository will be used.
RegNamestringoptionalThe certname of the Cumulosity Device Registration Information for this connection. If not specified, the first Cumulosity Device Registration Information found in the cert repository will be used.
PushInterval(integer >= 0mandatoryThe interval in seconds between each delivery of new data from the store'n'forward database. The value 0 means that data is delivered as fast as possible.



{
      "DatasrvName": "secomea_c8y",
      "DatasrvProtocol": "C8Y/REST",
      "ConnectRetryMin": 2,
      "ConnectRetryMax": 10,
      "C8YParams": {
        "C8YRegisterURL": "https://SecomeaPresales.cumulocity.com",
        "RegName": "c8yreg",
        "C8YRootCAName": "cumulocityROOTCA",
        "PushInterval": 30
      }
}
Creation date: 31/08/2020 14:28 (tvo@secomea.com)      Updated: 01/09/2020 12:37 (tvo@secomea.com)