cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot define sensor to thing mapping in Leonardo IoT

Former Member
0 Likes
822

I have done the "getting started" documents for both SAP Cloud Foundry IoT and SAP Leonardo IoT services, and WebIDE.

Generally things are working: I got some sensor data flowing into SAP Cloud Foundry IoT Services, and things display there, even visualization works nicely, I am sending data with MQTT. So all good on that part.

I have started to set up things in Leonardo IoT and that's all going well, too, I defined things and was able to set up the Web IDE to display some thing master data - but no measurements yet.

The part where it breaks is I am unable to define mappings between CF IOT sensors to Leonardo IoT things.

There is a page "Thing Types" and "Things" where the "Connectivity" tab lets you add a mapping, then the mapping screen opens, but in the "Sensor Types", I just get "No Products found". For some reason, Leonardo IoT is not seeing the CP IoT sensor types.

On the other hand, if I check the Leonardo IoT - Data Ingestion Error Log, I can see an error: "Failed.No assignment found for the key b6e2393e-054e-4175-a32a-c37a98ac5232/35ca86e9-b5b0-4bcf-b054-cd06daf1a0cb", which means that sensor data is flowing from CP IoT to Leonardo IoT, it is just not being mapped, because I cannot define the mapping.

Please help!

Accepted Solutions (0)

Answers (2)

Answers (2)

fvviviani
Participant

Hello Janos,

You can try to define a mapping by using SAP Leonardo IoT APIs. By doing that you could have success, or at least have more insight on your problem based on the answer you will receive from the POST request.

If you provide the structure of your sensor/thing type pair i can give you an example. Otherwise refer to this documentation.

BR,

Federico

Former Member

Okay, I think I found the cause.

  • First, both metadata and measure selectors have to be set up in the IoT Services "processing", and must be bound to a "Leonardo IoT" configuration. I forgot the metadata.
  • And even after I did, I found a note in the documentation:
  • "Please be aware that only those measures are visible in your SAP Leonardo IoT, for which the Internet of Things Service device model was created after the SAP Leonardo IoT processing service configuration was modeled."

This means that once you do all the "getting started steps" with IoT services, then you find out that you're in trouble, because you should have set up the metadata processing BEFORE that

PS: one more tip: actually, you can update SensorType and the Capability (do a dummy update, just so IoT services saves it again), and it will propagate.

Former Member
0 Likes

Whoops, forgot the screenshots, here are some: