Group Status

Any group may have an optional status that is dynamically calculated as a function of the state of its members. The status is indicated by the group's node color in the System Tree.

For example, a group of Devices is red if at least one device has an error, yellow if at least one device is offline, and green otherwise.

Group Status Calculation

The group status is calculated according to the following rules:

  • Every time a new member is added or an existing member's Member Status Variable is changed, the Member Status Expression is evaluated for the member, generating a member status string.

  • All member status strings are evaluated for against the Status Table, starting from the highest status then checking lower statuses until a match is found.

  • Once all member statuses are calculated, the group status is set according to the highest status of all the group members.

Let's assume that we have a group with five members. The Member Status Expression for each member is evaluated into a string value that is can be 100, 200, 300, 400 or 500 (string constants, not numbers). The example Status Table is made of these values:

Member Status Expression Result

Group Status (Color)

100

Green

200

Yellow

300

Red

400

Magenta

500

Blue

The table below illustrates what status will be applied to the group based on various member status string combinations and the above table:

Member Status Strings

Group Status (Color)

100, 200, 300, 400, 500

Green

500, 400, 300, 200, 100

Green

300, 300, 300, 400, 500

Red

500, 500, 500, 500, 500

Blue

500, 500, 200, 500, 500

Yellow

200, 200, 500, 200, 200

Yellow

100, 200, 300, 400, 123

Undefined

This example illustrates how device group status is calculated by default. Default group status settings of a device group are as follows:

Member Status Variable: contextStatus

Member Status Expression: ({status} % 10 != 2 && ({status} - {status} % 10) == 40 ? 1: ({status} % 10 == 1 || {status} % 10 == 2 ? 3: 2))

Status Table:  

Member Status Expression Result

Color

Description

1

Dark Red

Error

2

Dark Yellow

Offline

3

Dark Green

Online

The above group status configuration uses the context status information of each device to calculate the status of the device group. There are three defined statuses of a device group: Error (at least one device reports an error), Offline (no errors, but at least one device is offline or its connection state is unknown) and Online (all devices in the group are connected and report no errors).

The member status expression analyzes the integer status field of the contextStatus variable. This status can be parsed into:

  • The tens digit, indicating the device synchronization status (20 = synchronized, 40 = synchronization error, etc.)

  • The units place represents the device connection status (0 = offline, 1 = online, 2 = suspended, 3 = status unknown)

In this case, the device group individual member's status expression result is:

  • 1 (Error) if device is not suspended ({status} % 10 != 2) and reports a synchronization error (({status} - {status} % 10) == 40)

  • 3 (Normal) if device is suspended or online ({status} % 10 == 1 || {status} % 10 == 2)

  • 2 (Offline) otherwise

See Group Status configuration article for more information.

Was this page helpful?