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:
Its status key. The latest value of one telemetry key, by defaultstatus:Latest value (any case, spaces ignored) Status critical,alarm,error,fault,danger,2,trueCritical warning,warn,1Warning any other value, for example ok,normal,0,runningOK no value (nothing known from the key)
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.
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
| Where | What |
|---|---|
| Sites board template | The 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 scenes | Items 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 page | Each 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:
Open the profile’s root flow (or the IoT host’s root flow).
After the incoming message, add a Calculate block with targetmsg.payload.statusand an expression, for example for a cold room:msg.payload.temperature > 8 ? "critical" : (msg.payload.temperature > 6 ? "warning" : "ok")
Make sure the branch ends in Save telemetry, sostatusis stored with the readings.
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 key | Alarm | |
|---|---|---|
| Comes from | The device’s latest value of the key | A rule, a flow or an operator |
| Stays | Until the next value | Until it is resolved |
| Notifies | No | Yes, if the rule says so |
| Needs alarm permission to see | No | Yes |
| Best for | Colouring places from the device’s own view of itself | Conditions people must act on |
Troubleshooting
| Problem | Cause |
|---|---|
| A place is Unknown | No 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 well | A 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 red | They may not view alarms, so open alarms do not count for them |
| A room in the 3D scene is not tinted | The item’s key does not match the room’s code, or the asset’s kind is not Room or Area |

