cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Leonardo IoT OData Thing API data values is null

vlad_sodringa59
Explorer
357

Hello everyone,

I'm trying to use SAP Leonardo IoT to implement a small IoT service that mocks a temperature and humidity sensor.

Everything works fine with SAP IoT Cockpit, but I have some problems with SAP Leonardo IoT.

I've tried to make a small pre-built SAPUI5 app using the wizard. The app works as intended but the data from the sensor is not being displayed (there's no data to be shown from the API), although the data is fully visible on SAP IoT Cockpit.

The call that the app makes is this: https://{webide-url}/backend/Things('{thing-id}')/iot.psciot180911114814.{package}:{thing-type}/{capability}

Returns {value: []}

Am I doing something wrong here? There's something else that maybe I haven't configured well or not configured at all? Also I can't see any $metadata of the OData API because it says that I'm not authorised.

Regards,

Vlad

Accepted Solutions (0)

Answers (2)

Answers (2)

marcus_behrens
Product and Topic Expert
Product and Topic Expert

Hi, I'm not sure if the SAP IoT implementation of OData is fitting the requirements of "regular" UI5 controls. In any case all queries to time series data needs to include a timerange as a required input. Regards, Marcus

vlad_sodringa59
Explorer
0 Kudos

Hi Marcus,

thanks for helping me!

Putting UI5 controls aside for a moment, I think that the main problem is that the IoT Cockpit is not sending sensor data to IoT AE. I tried to make some calls to the API outside the UI5 app and the response is null:

{{TimeSeriesURI}}/{{PackageName}}:{{PropertySet}}/measurements?$filter=id eq '{{Thing}}' and time ge datetime'2020-01-01T00:00:00' and time lt datetime'2020-07-30T00:00:00'

Here's the response:

Also, even the UI5 pre-built api call with time ranges (e.g. ?timerange=2020-08-04T08:45:50.445Z-2020-08-04T09:02:33.651Z) returns {value: []}.

Is there some kind of configuration that maybe I've missed?

Regards,

Vlad

0 Kudos

Hi, I have the same issue here, did you get a solution for this problem?

My iot cockpit instance and SAP iot instance connect and I can see devices and capabilities but all measured values are null...

Thank you!!

0 Kudos

When i say null I mean that they are empty...