11-06-2017 12:18 PM - edited 02-04-2024 2:47 AM
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.
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.
3. And also tried creating a rule using IOT service APIs in the script based rule.
Below is the script I have used.
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Regards,
Medini H K
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.
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.
Regards,
Medini H K
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.