cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in creating Alarms in IOT 4.0

0 Kudos

Hi All,

I have a problem in creating alarms in IOT Service Cockpit.

Initially,

1. I have created a rule in rule wizard using physical nodes by giving certain threshold to the parameters and posted values using postman that reaches the threshold value.

Below are the images regarding rule creation using physical nodes and data posting in postman.

iot2.jpg iot1.jp iot3.jpg

2. I have also tried by creating a rule using groovy script by setting the security alert message and threshold values in the script.

Below is the groovy script I have used.

iot5.jpg

3. And also tried creating a rule using IOT service APIs in the script based rule.

Below is the script I have used.

iot6.jpg

In all the above cases, rule is created successfully, but alarm is not.

Please someone help me out in this regard.

Thanks in Advance,

Medini H K

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi Medini,

the data issued with Postman is in an old format.

Please check the SAP Help Portal then select under Configuration the link Internet of Things Gateway.

In the Table of Contents on the new window's left pane follow the path: Message Format -> Payload Format Examples for MQTT and REST -> Single Measurement.

In the page shown you can find examples of the new REST payload.

Best regards

Flavio B.

0 Kudos

Hi Flavio,

I found the new payload format for REST, thank you for that. But in the new format there is a parameter called capabilityAlternateId, can you please let me know where the Capability Alternate Id is.

Below image is the capability response body.

capability.jpg

Regards,

Medini H K

0 Kudos

Hi Medini,

the capabilityAlternateId is generated when you create the Capability via API in the platform.

Please check the SAP Help Portal then select under Tutorial the link Creating a Device Model Using the API.

Then in the Table of Contents on the new window's left pane follow the path: Getting started -> Create a Capability using the API that let you explain how to generate a new Capability and then Getting started -> Send Data that let you explain how to send data via REST.

Best regards

Flavio B.

0 Kudos

Hi Flavio,

I create a Capability where capabilityId, name and properties are generated in the response body, but capabilityAlternateId is not generated. Do I need to do any changes in the code? Please find the images of the json string and response body generated below.

my-data.jpg

response.jpg

Regards,

Medini H K

0 Kudos

Hi Medini,

could you please make a screenshot of the Info panel that you can popup from the Cockpit?

You can see it on left cockpit pane in your previous iot2.jpg attached image.

Best regards

Flavio B.

0 Kudos

Hi Flavio,

Yes sure. Below image is the screenshot of info panel.

info.jpg

Regards,

Medini H K

0 Kudos

Hi Medini,

could you please send me the complete URL of the API you're calling?

Thanks.

Best regards

Flavio B.

0 Kudos

Hi Flavio,

Below image gives the complete URL of the API I called.

api.jpg

Regards,

Medini H K

0 Kudos

Hi Medini,

thanks for the information. If it's not a problem for you I need also the server name. You can send it to me via private message so that the information is not shared.

To send a PMs to me you must “follow” me.

Regards,

Flavio B.

0 Kudos

Hi Medini,

we've checked about your problem and to support new features we must upgrade your instance to the latest version.

Phase let me know via PM the name of your instance (in previous PM you missed a part of the name) so that we can upgrade it.

Regards,

Flavio B.

0 Kudos

Hi Flavio,

I have sent you the link in PM.

Regards,

Medini H K