Star

ThingsBoard Documentation

Documentation for using ThingsBoard IoT Platform.

Analytics Nodes


ThingsBoard PE Feature


Only ThingsBoard Professional Edition supports PE Analytics Nodes feature.

See ThingsBoard PE Installation Options to install ThingsBoard PE.

Analytics Nodes that are specific to ThingsBoard PE. Used for analysis of streamed or persisted data.

Aggregate Latest Node

Since TB Version 2.1

image

Periodically does aggregation of child entities attributes or latest timeseries for specified set of parent entities.

Performs aggregation of attributes or latest timeseries fetched from child entities with configurable period.

Aggregation result then set to specified target timeseries attribute of parent entity.

Message of type POST_TELEMETRY_REQUEST is generated for each parent entity and aggregated attribute.

Configuration:

image

Mapping Configuration:

image

For each parent entity node will generate and forward via Success chain new messages of type POST_TELEMETRY_REQUEST, parent entity itself as originator and json body containing target telemetry with aggregated value. In case when aggregation of some child attributes will fail node will generate failure message with failure reason and parent entity as originator. Failure message is forwarded via Failure chain.


Aggregate Stream Node

Since TB Version 2.1

image

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.

image

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.

image

Alarms Count Node

Since TB Version 2.1

image

Periodically does count of alarms for selected set of entities.

Performs count of alarms for selected entities including their child entities if specified with configurable period.

Result of alarms count then set to specified target timeseries attribute of the entity.

Message of type POST_TELEMETRY_REQUEST is generated for each entity and alarms count result.

Configuration:

image

Mapping Configuration:

image

For each selected entity node will generate and forward via Success chain new messages of type POST_TELEMETRY_REQUEST and json body containing target telemetry with alarms count value. In case when alarms count for some entity will fail node will generate failure message with failure reason and entity as originator. Failure message is forwarded via Failure chain.