Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-14312

FIWARE.Question.Tech.perseo rules, how to get average of specific time window?.

    Details

    • Type: Monitor
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:

      Description

      Created question in FIWARE Q/A platform on 20-06-2018 at 13:06
      Please, ANSWER this question AT https://stackoverflow.com/questions/50947432/perseo-rules-how-to-get-average-of-specific-time-window

      Question:
      perseo rules, how to get average of specific time window?

      Description:
      How can I use patterns in perseo rules with time windows? I have tried many different combinations, following the directions of EsperTech Tutorials, though, none of them was successful each time I post it to perseo. Any example for time window and how to get the average of any value (e.g. temperature) during that time will be highly appreciated. Trust me, before asking I have made a ton of efforts
      One working query for me is the following:

      select *,\"temperature_range_XX-YY\" as ruleName, *, ev.temperature? as Temperature, ev.id? as Id, ev.datetime? as DateTime, ev.cid? as CID, current_timestamp as TS from pattern [every ev=iotEvent(cast(cast(temperature?,String),float)>XX or cast(cast(temperature?,String),float)<YY and type=\"sensors\")]

      Of course, this query returns only any temperature outside XX and YY range. What I need is to get an alert if temperature is outside the range for specific time and what is the average of all values during that time.

        Activity

        backlogmanager Backlog Manager created issue -
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-06-20 15:07|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2018-06-20 15:07|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        veronika Veronika Vlnkova made changes -
        Assignee Rafael Fernández [ rfernandez ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-06-21 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-06-21 15:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        rfernandez Rafael Fernández made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        rfernandez Rafael Fernández made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] perseo rules, how to get average of specific time window? FIWARE.Question.Tech.perseo rules, how to get average of specific time window?.
        veronika Veronika Vlnkova made changes -
        HD-Enabler Perseo [ 11301 ]
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        23h 58m 1 Backlog Manager 21/Jun/18 3:05 PM
        In Progress In Progress Answered Answered
        1h 4m 1 Rafael Fernández 21/Jun/18 4:10 PM
        Answered Answered Closed Closed
        8s 1 Rafael Fernández 21/Jun/18 4:10 PM

          People

          • Assignee:
            rfernandez Rafael Fernández
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: