Cumulocity IoT Platform
Forward your IoT data to a Cumulocity environment.
Configure a Cumulocity destination
Name
Give your Cumulocity destination name and optionally a description.
Destination name (required) - the administrative name of your Destination.
Technical name:
name
Example value: Tenant X
Description - an administrative description of your Destination.
Technical name:
description
Example value: Tenant with Materieelbeheer application
Connection details
Create a Cumulocity environment at https://signup.softwareag.cloud.
URL (required) - base URL of your Cumulocity environment.
Technical name:
tenant
Example value: https://example.eu-latest.cumulocity.com
Create KPN Things user in Cumulocity
Create an additional user in de Administration of your Cumulocity environment. To do so use the Application Switcher to switch to the Administration application and click on Users. Create a new user with the role admin.
Username (required, secret) - Username of the functional user that KPN Things should use to access your tenant.
Technical name:
username
Example value: kpnthings
Password (required, secret) - Password of the functional user that KPN Things should use to acces your tenant.
Technical name:
password
Generate a dedicated Things user & renew password automatically - Credentials of Cumulocity accounts expire after some time. Enabling this option will renew the password in time to prevent expiry.
Technical name:
credentialManagementEnabled
Boolean value
Advanced configuration
Bidirectional behavior - Choose whether the destination should process uplink data (data from Device to Application), downlink data (data from Application to Device) or both.
Technical name:
bidirectionalBehaviour
Default value:
ONLY_UPLINK
Available values:
ONLY_UPLINK
- Only forward uplink data to Cumulocity.ONLY_DOWNLINK
- Only synchronize Cumulocity operations with Things downlinks.BIDIRECTIONAL
- Process both uplink and downlink data.BIDIRECTIONAL_WITH_RETRY
- Process both uplink and downlink data, and make sure downlinks are retried by KPN Things.
Which messages should be sent to this Destination?
Technical name:
sendMeasurements
(Boolean value)Technical name:
sendLocationUpdateEvents
(Boolean value)
Extra label for new devices - List of additional custom fragments to add to the device object when it is created in Cumulocity.
Technical name:
customFragments
Example value: c8y_CustomApplication
A secret value is treated as a secret in our database and is therefor not returned in the API object response.
What does the connection do?
This section describes the functionality of the connection to Cumulocity.
Find or create device record
When IoT dat is about to be forwarded to Cumulocity, it will first try to find the device Managed Object using the base name from the SenML message. For this it looks for an external identifier of type DEVEUI
and the base name as value. For instance:
If such an external identifier does not exist, a new device Managed Object and the required external identifiers is created. This is called provisioning in runtime.
Create device record
KPN Things will create a device Managed Object if it did not exist. The device Managed Object will be created with the following information, using the device record that is known in the Data Management platform.
Additionally, the configured custom fragments (and fragments used for application association) are added to the object. In the example below, a device is created that had customFragment exampleFragment configured and application ASSET_TRACKING was configured as well.
Create external identifiers
Using the main network id an external identifier is created for the newly created device Managed Object.
Additionally, if a barcode is known present in the device object, another external identifier of type BARCODE
is created as well.
Uplink: Send measurement
The following configurations are required to enable sending measurements:
Bidirectional behavior set to Only uplink or Bidirectional.
One of the following:
sendMeasurements
should be enabled to enable this feature, orAn application should be selected that enables sending measurements.
After the device Managed Object is found or created, a measurement is added to this device of the type kpn_SenMLMeasurement
. A full example can be found below.
More information on SenML can be found on this page.
Uplink: Update location and send location update event
The following configurations are required to send location update events:
Bidirectional behavior set to Only uplink or Bidirectional.
One of the following:
sendLocationUpdateEvents
should be enabled to enable this feature, orAn application should be selected that enables sending measurements.
If the measurement contains both latitude and longitude, the device Managed Object's c8y_Position
value is updated with the newly calculated location.
Also, it will create a c8y_LocationUpdate
event on the device, according to the Cumulocity sensor library.
Example location update event
Downlink: Synchronize Cumulocity operations with Things downlinks
The following configurations are required to send location update events:
Bidirectional behavior set to Only downlink or Bidirectional.
An application should be selected that enables operations handling.
The Cumulocity destination will poll your Cumulocity environment for operations. When the destination finds a new operation, recognizable because its status is PENDING, a Downlink is created for the corresponding Device.
To create the Downlink, the Cumulocity external ID is used to map to the correct Device in KPN Things. Additionally, the Cumulocity operation value deviceStatus is fetched, and put in a string value for the SenML downlink command mode.
When the operation has been picked up by KPN Things, we change the status to EXECUTING. When the downlink has finished, we will update the Cumulocity operation status to SUCCESSFUL or FAILED depending on whether the downlink was successful or not.
Last updated