Created question in FIWARE Q/A platform on 11-01-2016 at 07:01
Please, ANSWER this question AT https://stackoverflow.com/questions/34715787/how-to-detect-sudden-increase-or-decrease-in-value-for-an-event-using-proton-run
Question:
How to detect sudden increase or decrease in value for an event using proton run time?
Description:
I am developing an application using proton CEP and Orion Context Broker. I have sensor that updates the temperature and CEP gets the temperature update as an event. I want the CEP to produce an alert if there is a difference of 10 in two consecutive updates.
For example:
Last update from sensor is 35. If the next update is less than 26 or greater than 44 I need CEP to produce an alert.
How can I write a rule to achieve this?