Timeseries Data
Timeseries Data
You can update Asset / Data Stream data values on the Kelvin Cloud from the Kelvin SmartApp™.
Structure
Define Data Stream Names
In order to publish an output Data Message, the first requirement is to add the intended Data Stream names to the outputs to the app.yaml as follows:
| app.yaml Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Define Asset Names
The Asset name can only be related to any Assets associated with the Kelvin SmartApp™ workload.
Note
Any attempt to write to Assets not associated with the Kelvin SmartApp™ workload will be dropped and an error recorded in the logs.
Timeseries Data Messages
Output (Number/Boolean/String/Object) Objects support the following attribute:
| Attribute | Required | Description |
|---|---|---|
payload |
required | Number, Boolean, String or object value, depending on the data_type |
You need to create and publish each output Data Message according to the Asset / Data Stream's data_type.
| Create and Publish Number Python Example | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
| Create and Publish Boolean Python Example | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
| Create and Publish String Python Example | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
For objects, the payload is an arbitrary dict with any given dict structure.
| Create and Publish Object Python Example | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
