‎2020 Feb 12 12:49 PM - edited ‎2024 Feb 03 6:41 PM
Hi,
We've come across a situation where we need to do some postprocessing of Thing data in SAP Leonardo. Preferably in such a manner that the modified values are stored in the thing measures themselves (that is, the client applications should be able to read the modified values using the SAP Leonardo APIs). There are two scenarios we need to address.
1. A sensor is providing us with temperature measurements in the Fahrenheit scale. We need to provide the data to the cloud apps in degrees of Celsius. We do not have the option of reconfiguring the device and would like to avoid using additional software (e.g. using a custom edge with an interceptor to transform the data before ingestion) - the data is sent directly to the cloud gateway. What are our options? Does Leonardo IoT offer any means to compute "derived" values?
2. The device is in one of four states (busy, maintenance, stopped, idle) at any given time. The device informs us only on state changes by sending the new state. Upon receiving a state update from the device we'd like to "close" the previous state and determine its duration. For example, the device signaled going into busy state at 11.00. At 11.15 the device goes into the idle state - upon receiving the update we'd need to note that the device was in state "busy" for the duartion of 15 minutes. Preferably we'd achieve this by updating the previous measurement with its duration. Can such computations and updates be done within Leonardo IoT?
Thank you,
Request clarification before answering.
Hi Miha,
Given your constraints, maybe the best option would be to use a microservice to do such transformations, and push data for the new measure using Leonardo IoT APIs. You could, for example, trigger the call to the microservice by using a Leonardo IoT Rule. Alternatively, you could poll the measure in Fahrenheit from the microservice. The Thing is, that you should alter the data model at a minimum extent, i.e., add a variable for Celsius storage.
Hope that was clear,
BR,
Federico
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I don't think that you can do what you describe leveraging Leonardo IoT only.
Do you have other modules in the SAP IoT stack (e.g., SAP IoT Services, SAP Edge Services...)?
Do you have the possibility to create custom microservices?
BR,
Federico
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 8 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.