Cloud to Cloud Real-time Data Forwarding¶
Scenario¶
In this scenario, the devices are connected to a 3rd- party cloud. To use EnOS services or applications, the data ingested from the 3rd-party cloud needs to be forwarded to EnOS Cloud.
Solution¶
The 3rd-party cloud can be seen as an application in EnOS. Using “Data Forwarding App” as an example, this app will abstract the data from the 3rd-party cloud and call EnOS REST API to report the device telemetry.
Part I. EnOS Cloud Setup¶
Model and register the devices on EnOS Cloud.
Register the Data Forwarding App to obtain the service account (SA).
Part II. Data Forwarding App abstracts, transforms, and forwards data¶
Configure the Data Forwarding App with the SA that will be used for EnOS to authenticate the application.
The 3rd-party cloud acts as the data source, where the Data Forwarding App reads the master data of the devices from the 3rd-party cloud to obtain the device data forwarding list.
The Data Forwarding App extracts the device data, and transforms the data into the format that is compliant with EnOS device data standard.
The Data Forwarding App calls EnOS API to report the data to EnOS cloud.
Part III. New device onboarding¶
The Data Forwarding App listens on the master data update.
When a new device is detected, the Data Forwarding App calls the REST APIs to register the device on EnOS Cloud.
The Data Forwarding App adds the device to the data forwarding list.
Implementation¶
Part I. EnOS Cloud Setup¶
Create the device model. Note the identifier of the model points. You will need it later to report the measure point data to the model points.
Create the product. The product configuration defines how the collection of devices send data to EnOS Cloud and how to secure the connection between devices and cloud.
Register the device. You will get the device identity
deviceKey
that you will use when mapping the device between the 3rd-party cloud and EnOS cloud.Register the application to obtain the service account (
accessKey
andsecretKey
), which the application will need to call EnOS APIs. For more information, contact the system administrator.
Part II. Develop the Data Forwarding App¶
Configure the service account into the application.
Map the device master data between the 3rd-party cloud and EnOS Cloud.
Note
Use the deviceID in the 3rd-party as the
deviceKey
in EnOS (to uniquely identify the device). Every device can be associated to a product in EnOS Cloud.The Data Forwarding App uses the
getDeviceByDeviceKey
API to obtain the deviceassetId
based on thedeviceKey
. You will need theassetId
in the next step because the measurement point data reporting uses theassetId
.The Data Forwarding App uses the
uploadDeviceMeasurepoints
API to report the measurement point data to EnOS Cloud.The Data Forwarding App uses the
registerDevices API
to register the new device on EnOS.
For how to use EnOS APIs, go to EnOS Management Console > EnOS API.
3rd party Cloud DeviceID |
EnOS ProductKey |
EnOS AssetId |
---|---|---|
SN000001 |
XmrETyvF |
Ji7bipvy |
SN000002 |
EtHYdYP6 |
3kxJLXgg |