1. Introduction

Home Edge will provide a way to store device readings and service information for all devices to be synchronized with an external cloud. This data can be later used for analytics.

2. What all data needs to be synchronized to the cloud?

All this data is stored in the DB in form of key-value pairs and thus can be exported as a JSON to the cloud. Similarly all readings are given as JSON and thus they may also be stored as JSON in cloud.

3. How to store data to the cloud?

Home Edge uses EdgeX Foundry (EdgeX) for local storage of data. EdgeX also provides exporters (called application services) for a variety of cloud services and applications. These can be used by Home Edge to interact with the cloud. Most data is either stored as XML or JSON. As all the DBs are in JSON format, Home Edge can provide Value Descriptors for the DBs and All systems in the Home Edge Network can be registered as Service Devices which can then store data of their DBs using EdgeX using Value Descriptors as the schema for the data. 

EdgeX has provided an Example where EdgeX data is shared to HiveMQ server using MQTT.

This can be seen at: https://docs.edgexfoundry.org/1.3/getting-started/quick-start/#exporting-data

4. When should Cloud Sync happen?

5. Use case

Device data and service info are the major data to be synchronized with cloud.

6. EdgeX – Application Service

Application services are based on the idea of “Functon Pipeline”. Trigger begins the function execution.

EdgeX provides App SDK to create Application Services. It is provided as Golang module. Four primary are included in the App SDK. The first is the DeviceNameFilter function which will remove events that do not match the specified IDs and will cease execution of the pipeline if no event matches. The second is the ValueDescriptorFilter which exhibits the same behaviour as DeviceNameFilter except filtering event readings on Value Descriptor instead of DeviceID. The third and fourth provided functions in the SDK transform the data received to either XML or JSON by calling XMLTransform or JSONTransform.