LogoLogo
Website
  • Overview
  • Getting started
  • Integrations
    • MQTT Integration
    • HTTPS Integration
    • LORIOT Integration
    • Swisscom LPN Integration
    • TheThingsNetwork Integration
    • TheThingsIndustries Integration
    • Sigfox Integration
    • AWS IoT Integration
    • AWS Kinesis Integration
    • Azure Event Hub Integration
    • Azure IoT Hub Integration
    • Helium Network Integration
  • Key concept
    • Entities and relations
    • Entity Groups
    • Attributes
    • Device Profiles
    • Telemetry data
    • Device alarms
    • Version control
  • Dashboards
    • Dashboards
      • Dashboard Templates
      • IAQ Template
      • Aliases
    • Widget library
      • Energy management widgets
        • Summarized annual consumption
        • Daily profile
        • XY chart
  • Rule Engine
    • Rule Engine
      • Rule Engine Templates
        • General data proccessing concept
        • Weather data feed
      • Test Javascript function
      • Predefined Message Types
      • Filter rule nodes
        • check alarm status
        • check existence fields
        • check relation
        • gps geofencing filter
        • message type filter
        • message type switch
        • originator type filter
        • originator type switch
        • script filter
        • switch script node
      • Enrichment rule nodes
        • calculate delta
        • customer attributes
        • customer details
        • originator attributes
        • originator fields
        • originator telemetry
        • related attributes
        • related Device attributes
        • tenant attributes
        • tenant details
      • Transformation rule nodes
        • change originator
        • duplicate to group
        • duplicate to related
        • script transformation
        • to email transformation
        • M-Bus decoder
      • Action rule nodes
        • Add to group
        • Remove from group
        • Generate report
        • Integration Downlink
        • REST Call Reply
        • Change owner
        • Create alarm
        • Clear alarm
        • Delay messages
        • Generator
        • Log
        • RPC Call Reply
        • RPC Call Request
        • GPS geofencing events
        • Save attributes
        • Math Function
        • Asset Profiles Feature
        • fetch device credentials
        • delete attributes
        • split array msg
        • json path
        • delete keys
        • rename keys
        • copy keys
        • Save to Custom
        • Assign To Customer
        • Unassign From Customer
        • Create Relation
        • Delete Relation
        • Push to cloud
        • Pus to edge
        • Save timeseries
      • Analytics rule nodes
        • Aggregate Latest
        • Aggregate Stream
        • Alarms Count
      • Output connectors
        • AWS SNS
        • AWS SQS
        • MQTT
        • RabbitMQ
        • Kafka
        • Azure IoT Hub
        • Rest API
        • Priva
          • Realtime Telemetry API
          • Realtime Setpoint API
          • Data Insight Metadata API
          • Data Insight History API
          • Alarm Data Api
        • SOAP API
        • send email
        • send SMS
        • send Twilio SMS
      • Flow
        • Acknowledge
        • Checkpoint
        • Rule Chain
        • Output
  • Device Type Library
    • telemetry data keys
    • attribute data keys
      • Assets
        • Property
          • Building
          • Floor
          • Room
        • Facility
          • Component
        • City Zone
      • Devices
    • relation Type keys
  • API documentation
    • Admin Controller
  • CLI Tool
    • How to install the tool
    • Dataimport
  • Dynamic QR Codes
    • Dynamic QR Code App
Powered by GitBook
On this page

Was this helpful?

  1. Rule Engine
  2. Rule Engine
  3. Analytics rule nodes

Aggregate Stream

PreviousAggregate LatestNextAlarms Count

Last updated 3 years ago

Was this helpful?

Calculates MIN/MAX/SUM/AVG/COUNT/UNIQUE based on the incoming data stream. Groups incoming data stream based on originator id of the message (i.e. particular device, asset, customer), aggregation function (e.g. “Average”, “Sum”, “Min”, “Max”), aggregation interval value (e.g. 1 minute, 6 hours) into Intervals.

Intervals are periodically persisted based on interval persistence policy and interval check value. Intervals are cached in memory based on Interval TTL value. State of the Intervals are persisted as timeseries entities based on state persistence policy and state persistence value. In case there is no data for certain entity, it might be useful to generate default values for those entities. To lookup those entities one may select Create intervals automatically checkbox and configure Interval entities.

Generates ‘POST_TELEMETRY_REQUEST’ messages with the results of the aggregation for particular interval.

Configuration below will calculate average hourly temperature and will persist it within one minute once the hourly interval is ended. In case some delayed telemetry will arrive for the particular interval, the rule node will lookup it from internal cache or from telemetry values.

The results of aggregation will be persisted to the database once per minute. Alternatively you can persist the interval on each new message to avoid any data loss in case of server outage. In case devices for some building are not reporting any temperature readings, we can generate default value (zero) for such building on each interval by selecting “Create Intervals automatically” and specifying “Buildings” entity group.