Skip to Content
0

Problem in creating Alarms in IOT 4.0

Nov 06, 2017 at 12:18 PM

114

avatar image

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

iot2.jpg (130.2 kB)
iot1.jpg (111.0 kB)
iot5.jpg (19.3 kB)
iot6.jpg (220.3 kB)
iot3.jpg (119.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member
Nov 06, 2017 at 03:43 PM
0

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.

Show 10 Share
10 |10000 characters needed characters left characters exceeded

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

capability.jpg (87.5 kB)
0
Former Member

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

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

my-data.jpg (14.8 kB)
response.jpg (88.1 kB)
0
Former Member

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

Hi Flavio,

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

info.jpg

Regards,

Medini H K

info.jpg (67.1 kB)
0
Former Member

Hi Medini,

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

Thanks.

Best regards

Flavio B.

0

Hi Flavio,

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

api.jpg

Regards,

Medini H K

api.jpg (28.4 kB)
0
Former Member

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
Former Member

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

Hi Flavio,

I have sent you the link in PM.

Regards,

Medini H K

0