New: the AI firewall watches every module and explains each incident in plain words. See how it works

Site status and the status key

How a device's status comes from its status key, alarms and connection, how it rolls up to rooms, buildings and sites, and how to derive it in a flow.

Every place in Hermetry Twin has a status: Critical, Warning, OK or Unknown. Sites tables and maps colour sites by it, drill-down tables colour floors and rooms, and 3D scenes tint rooms and areas with it. This page explains where the status comes from.

A device’s status

A device’s status is the worst of three facts:


  1. Its status key. The latest value of one telemetry key, by default status:
    Latest value (any case, spaces ignored) Status
    critical, alarm, error, fault, danger, 2, true Critical
    warning, warn, 1 Warning
    any other value, for example ok, normal, 0, running OK
    no value (nothing known from the key)

  2. Its active alarms. Any open or acknowledged alarm makes the device at least Warning; a CRITICAL alarm makes it Critical. Alarms count only for people who may view alarms.

  3. Its connection. When neither of the above says anything, a device that is online, or was active in the last 10 minutes, is OK.

A device about which nothing is known (no status value, no alarm, not alive) is Unknown. The order from worst to best is Critical, Warning, OK, Unknown.

Note

true means Critical. If a device sends a boolean such as status: true to mean “running”, the place turns red. Send a different key for “running”, or derive a proper status (below).

Roll-up

A place’s status is the worst status of the devices placed on it or anywhere below it. A room takes its status from its devices, a floor from its rooms, a building from its floors, a site from everything under it. One critical sensor in one room makes the room, the floor, the building and the site critical.

Devices you may not read count for nothing. A place with no devices, or none you may read, is Unknown.

Where it is shown

WhereWhat
Sites board templateThe site table’s Status badge, the map markers’ colour, the site page’s header
Drill-down tables (Status under an asset)One row per child with its status, devices and open alarms, worst first
3D scenesItems whose key matches the code of a Room or Area asset are tinted with that asset’s status; a critical one pulses
Live values table on a site pageEach device’s own status

The Sites & Assets page and its map show alarms, not this status: the map is coloured by the worst active alarm.

Use another key

Each status table, map and site header reads one key, by default status. In the card’s data settings, Status key of the devices lets you use another key, for example state or health, with the same vocabulary. A key has up to 64 letters, digits, _, . or -.

Derive status in a flow

Most devices do not send a status key. Compute one from what they send, in the device’s root flow, and store it with Save telemetry:


  1. Open the profile’s root flow (or the IoT host’s root flow).

  2. After the incoming message, add a Calculate block with target msg.payload.status and an expression, for example for a cold room:
    msg.payload.temperature > 8 ? "critical" : (msg.payload.temperature > 6 ? "warning" : "ok")

  3. Make sure the branch ends in Save telemetry, so status is stored with the readings.

  4. Deploy the flow.

Tips:

  • Derive the status in the same message as the readings it comes from, so the two always agree. See Derived values.
  • Store text (ok, warning, critical) for the site colours. For charts, also store a number (status_code: 0, 1, 2), because charts read numbers.
  • A status computed from several devices (for example “any pump of the station stopped”) belongs to a device that represents the station, or to an alarm rule: open alarms raise the place’s status by themselves.
  • If an alarm rule already covers the condition, you may not need a status key at all: the alarm raises the place to Warning or Critical while it is open.

Status, alarms and colours compared

Status keyAlarm
Comes fromThe device’s latest value of the keyA rule, a flow or an operator
StaysUntil the next valueUntil it is resolved
NotifiesNoYes, if the rule says so
Needs alarm permission to seeNoYes
Best forColouring places from the device’s own view of itselfConditions people must act on

Troubleshooting

ProblemCause
A place is UnknownNo device under it sends the key, has an open alarm or was active in the last 10 minutes; or the devices are not placed under it
A place is red although all is wellA device sends true, 1, 2 or a word such as error in its status key; or a CRITICAL alarm is still open
A colleague sees green where you see redThey may not view alarms, so open alarms do not count for them
A room in the 3D scene is not tintedThe item’s key does not match the room’s code, or the asset’s kind is not Room or Area