iot central rules

Eddie Soong 0 Reputation points
2023-09-13T06:23:16.8833333+00:00

Hello everybody i am facing a problem with the rules part in iot central application where i have defined an condition that if a parameter value is increased from 0 to 1 it sends an email,

but the problem is that it is sending the email multiple times but i want it to send the email only once....

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
357 questions
{count} votes

2 answers

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,871 Reputation points
    2023-09-13T14:19:55.1233333+00:00

    Hi @Eddie Soong Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.

    You can leverage the Time aggregation option when setting up the Alert to aggregate the alerts and trigger an action once. The platform allows you to aggregate the telemetry for a maximum period of 60 minutes. You can choose different aggregation options from the available list. Please find the below image to get more details on this setting and different options available.

    User's image

    With aggregation enabled, the rule triggers if the aggregate value of the telemetry data points in the time window meets the condition.

    In your case, if you want the rule to trigger once an hour, you can set up an Aggregation type to Sum and Operator Is greater than or equal to and set the value to 1. This way, the alert will get triggered even when the value is increased to 1 at least once within an hour.

    Please refer the documentation Configure the rule conditions for reference. Hope this helps. Let us know if you need any additional information or further assistance on this.

    Update:

    If you choose to create an alert for each occurrence of the event without any delay, a work around approach could be to create another telemetry variable and pass this value to it. Once the value changes, you can trigger that action based on that.


    If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.


  2. Eddie Soong 0 Reputation points
    2023-09-21T02:27:13.4233333+00:00

    Thanks for the comments and suggestions. I've found a way to only trigger an action once by having another telemetry variable to indicate if the a threshold has been crossed, at which time the action will be taken.