Any good expression that lets me create event frame notifications only as a value increases, that avoids dips and rebounds?

I have a weather based notification that has given me considerable trouble.

 

The goal is to measure Heat Index, and once it passes a threshold of 89, issue a notification.

However, if today the Heat Index has passed the threshold and a notification has been generated via event frame analysis, I DO NOT want to send a second notification if it dips then comes back up over 89 a second time the same day.

 

Ex: 87, 88, 89 (True for 15 mins - NOTIFY), 88, 88, 89 (DO NOT NOTIFY).

 

Here is how I have it set up:


Current Analysis.png
 

The logic here being:

From *-10h to *-15m, has the value of Heat Index been greater than or equal to 89 for greater than or equal to 29.98 minutes ( 1799 seconds, just shy of 30 minutes)?

 

The output will be True until this expression becomes True itself. If that expression becomes True, then we set the output as False. By setting it to False after we have surpassed our appropriate time limit, I aim to prevent the second, unwanted event frame of the day from generating.

 

I have tried limiting the TimeGE time to 900 seconds, or 15 minutes, to try to decrease the tolerance and match the overall 'True for' criteria of the start trigger, but that has led to events where Heat Index crawls above 89 very briefly, then drops, then when it crawls back up and is true for 15 minutes the total time of TimeGE is now >=900, so it will be set False and not fulfill the criteria to create the event frame at all.

 

The other two variables are pretty locked down and shouldn't be an issue - they behave as expected. The real problem is my HasHappened variable.

 

I don't think editing the non-repetition interval would work because that would just delay the second notification from being sent for X amount of time, not prevent it from generating in the first place. I don't want to create a second event frame and choose to ignore, I just don't want to create a second event frame at all.

 

Any thoughts?

 

Thanks for the support,

Jack

  • I would recommend just making a separate analysis that writes out to a PI Point the heat index whenever it surpasses 89 (along with whatever other logic you want.. like true for some time etc.), and use that PI Point as an event trigger on the Event Frame/Notification Rule.

    On the separate expression you can add some additional logic that would check if today's date is equal to the day on timestamp of the most recent recorded event on the PI Point.. If so then NoOutput(). There are probably a number of ways to accomplish this, but generally speaking try and separate out your PI Point logic from the event frame itself. Simply use the event frame to trigger on new data.

     

    -Philip Babb

  • I would suggest inserting an additional condition incorporating either "secsincechange", or the timestamp of the first occurrence of Heat Index > 89. If the timestamp is in the same day, then don't trigger the notification. Or if the number of seconds is less than what remains in the current day after the first notification... don't send another notification.

    -John Pooler