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 -
        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 ]
        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 ]

          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: