Appearance
Rules
Overview
A rule watches one value, or waits for one event, and carries out one or more actions when the condition is met. Configuring a rule consists of choosing the value to watch, setting the threshold, and deciding how often the rule may notify.
- Menu path: Rules > All rules (
/admin/manage/rule). - Message templates: Rules > Message templates.
This chapter describes how to build a rule by hand, the faster ways to create one (a ready-made check, a template, a starter pack or a description in plain language), the Rules list, and how to diagnose a rule that stays silent or sends too many messages.
Prerequisites
SPECIFICATION
view-rules: see the Rules list and open Test.create-rules: save a new rule, use New from template and Describe it, and create message templates.edit-rules: edit a rule, switch it on or off, use Run it now, and edit message templates.delete-rules: delete a rule or a message template.- As shipped, Admin has all four, Manager all but
delete-rules, and Viewer hasview-rulesonly.
| Prerequisite | Reason |
|---|---|
| Something that produces the value | A rule on a metric that nothing produces never fires, and looks exactly like a working rule with nothing to report. |
| For email, SMS, WhatsApp or Telegram: the connector | Configured under Connectors. An In-App Alert needs no connector, which makes it the recommended first action. Email falls back to the platform's mailer when no SMTP connector exists. |
| For Describe it: AI switched on and a provider key | Set on System > Configuration > AI. Without them, the Describe the rule panel opens with a warning naming what is missing (The AI assistant is switched off for this tenant. or No AI provider key is configured. Set one in Configuration → AI.) and the text box stays disabled. |
Choosing the value to watch
The most common reason a rule never fires is that its check has no value for what the rule watches. Two questions settle it.
Does this place or device have that value at all? radar_people needs a zone with a calibrated radar. zone_utilisation needs a zone in which something counts people. enter_count needs a counting sensor on a door. temperature needs a sensor in that zone that reports one. Once the rule's Watch is chosen, the Check list offers only the checks that work for it.
Is the value live, or rolled up? Radar, density, utilisation, energy and Sensor reading (any field) are computed when the rule is checked. Temperature, humidity, battery, dwell and the counting metrics are read from tables rebuilt every five minutes, so a rule on them can be up to five minutes behind. This suits "too warm for an hour" and does not suit "the server-room door has just opened".
Rule metrics lists every check, split by that distinction, with its unit and the operators it accepts.
Energy rules count each meter once
Power Draw Now and Energy Used Today add up the top-level meters in the rule's place: a sub-board whose parent meter is also in the place is not added a second time. Meters marked as generating power (solar, a generator) are subtracted, so the figure is net, and it can go below zero while the site is exporting. This matches the Energy app's own totals. Rules written before 3 October 2026 on a place with an incomer and its sub-boards saw a figure up to twice too high; check their thresholds.
Rule builder
Rules > All rules > Add Rule opens the builder. The top bar holds, from left to right: the back arrow to the Rules list, the rule's name, Describe it (new rules only), the On switch, the view button, Test and Save.
The builder shows the same rule in two views. The view button in the top bar switches between them: it reads Card view while the Flow view is shown, and Flow view while the Card view is shown. The builder opens on the Flow view and then remembers the last view chosen.
| View | Content |
|---|---|
| Flow view | A canvas. A Watches box is already on it. Condition and Action are dragged from the Nodes palette on the left, and each joins the chain by itself. Clicking a box opens its settings in the panel on the right. Zoom In, Zoom Out and Reset View are under Canvas controls. |
| Card view | The rule as four cards read top to bottom: Watches, When, Then and Checked, with Ready-made checks on the right. Clicking a row opens its settings inside the row; the bin icon (Remove) removes a condition or action. |
On the Flow view, Priority and the Checked settings (days, hours, repeat at most every and the note) are in the right-hand panel, headed Rule settings, whenever no box is selected; clicking an empty part of the canvas brings them back. Ready-made checks and Several at once… are only on the Card view.
The line under the top bar states the whole rule in one sentence, starting with When: what it watches, the conditions (with the brackets the engine reads into them), what it does and how it is checked. Anything still missing is shown in place, in colour, so the sentence also serves as a checklist.
Building a rule
Applicable versions / plans
SPECIFICATION
- Permission:
create-rulesto save a new rule,edit-rulesto change an existing one. Test needsview-rulesonly. - Channels other than In-App Alert may need a connector (see Prerequisites).
Requirements
At Northwind Tower, Aisha Rahman, the Facilities Manager, wants to hear about the Server Room before Ravi Kumar, the Operations Lead, hears about it from someone else. She builds a rule that emails Ravi and raises an alert on the bell when the Server Room is too warm.
- Fire when the Server Room is above 27 °C for 15 minutes.
- Only on working days, and no more than once an hour.
- An In-App Alert carrying the temperature, plus an email to Ravi.
Restrictions
- Name: required, at most 120 characters. Note: at most 500 characters.
- Conditions: 1 to 10. Actions: 1 to 10. A condition's Value is at most 50 characters.
- Only after it has held for: 1 to 1440 minutes.
- Repeat at most every: 30 seconds to one day (86,400 seconds).
- Scheduled intervals: every 5, 15 or 30 minutes; every 1, 6 or 12 hours; daily; weekly.
- There is no "greater than or equal" operator. For "ten minutes or more", write Greater than 9.
- Conditions are evaluated top to bottom with no brackets (see Conditions).
- A rule cannot be saved without something to watch. A rule whose zone, device or label has since been deleted is refused with a message asking for a new choice.
Configuration roadmap
(1) Open the builder, name the rule and set its priority.
(2) Choose what the rule watches.
(3) Add the conditions.
(4) Add the actions.
(5) Set when the rule is checked and how often it may repeat.
(6) Test the rule and save it.
Procedure
- Choose Rules > All rules and click Add Rule. A new rule opens on what it watches, because that decides which conditions make sense.
- Carry out the parts below in order: name and priority, what the rule watches, conditions, actions, and when it may act.
- Click Test, then Save.
Name and priority
- Type the name in the box at the top (it shows Name this rule while empty). Name the rule for the situation, not the mechanism: "Server Room too warm" remains clear to whoever inherits it; "temp > 27" does not.
- Select a Priority (Low, Medium or High): on the Card view, at the bottom of the Then card beside Add an action; on the Flow view, at the top of Rule settings with no box selected.
Priority sorts the Rules list and colours its chip there; it does not change how the rule behaves.
What the rule watches
- Open what the rule watches: on the Flow view, click the Watches box (the panel is headed What this rule watches); on the Card view, click the row in the Watches card.
- Select the Watch type.
- Select Which one (a search box appears when the list is long).
| Watch | Applies to | Use |
|---|---|---|
| Location · Venue | A whole site; a building or floor | Questions about the place as a whole: people counts, energy, footfall, any gateway on the floor. Also any device there: see Device readings on a floor or site below. |
| Zone | A room or area | Any sensor in the room may satisfy it: "occupied becomes 1 in the male toilet" without naming the PIR. |
| Device (one tag or sensor) | One tag or sensor, by its MAC | That specific unit. If the tag is swapped, the rule stays with the old one. |
| Label | Every device carrying the label, and every person or asset carrying it (through the tag bound to them) | One rule for forty tables, every fridge, everyone on night shift. Each is judged on its own: "battery below 20" means that fridge's battery. |
| Person / asset | One person or asset, through whichever tag is bound to it at the time | A named person or asset, not the tag. Swapping the tag keeps the rule. |
| Gateway | One gateway | Gateway status for that gateway. For every gateway on a floor, watch the venue instead. |
| Geofence (GPS) | An outdoor place drawn on the Map tab of Space > Location | GPS trackers crossing it. |
Labels. A label is a name put on devices, gateways, people and assets ("Tools", "Night shift"), managed under System > Labels. A tag is the BLE device a person wears. The Which one list shows how many devices and people or assets carry each label, and shows nothing carries it yet for an empty label. Labelling a new sensor brings it under the rule; removing the label takes it out, with no rule to edit. The change reaches the engine within about ten minutes.
Device readings on a floor or site. A Venue or Location rule whose every condition is a reading of one device (Battery Level, Device Status, RSSI, Distance, Button Pressed, Custom Field or Sensor reading (any field)) is checked on each device's own reading, for every device on that floor or site: "battery below 20 anywhere on Level 5" fires for the device whose battery it is. Set Checked to Real-time for these. Only after it has held for is timed for each device, but the rule keeps one repeat at most every clock: after one device fires it, the others wait for that interval. To give each device its own clock, watch a Label instead. A floor rule on a place figure (people, temperature, humidity, noise) is still checked on the floor's own figures.
Only for: who may fire the rule. A Geofence, Zone, Venue or Location rule fires for any tag that crosses it: "left office campus" emails for every tracker and every tag a phone relays. Only for, under Which one, narrows that:
| Only for | Fires for |
|---|---|
| Anyone | Every tag (the default). |
| These devices | The tags ticked. |
| These people / assets | The people or assets ticked, through whichever tag each wears now; when a tag is swapped the rule follows. |
| Anyone with these labels | Any device, or any person or asset, carrying one of the labels ticked. |
| People only · Assets only | Any tag bound to a person, or to an asset. |
Only for applies to conditions about one tag: Entered / left a place, Geofence entered / left (GPS), a button, a battery, a sensor field. A room total such as people count has no single tag, so a rule on one cannot be saved with Only for set. Test replays only the tags it allows.
The same panel also has Checked, a copy of the Checked setting in the Checked card (see When the rule may act).
NOTE
A narrow scope produces fewer unexpected firings.
Conditions
- Add a condition: on the Card view, click Add a condition under the When card; on the Flow view, drag Condition from the Nodes palette onto the canvas. Either way it joins the chain after the last condition. The first condition is marked If.
- Set its fields (in the row on the Card view, in the panel on the Flow view):
| Configuration Item | Value | Note |
|---|---|---|
| Check | Temperature | Grouped (Events, People and occupancy, Environment, Devices, Energy, People and assets, and Outside (GPS) where the organisation has GPS trackers) and limited to what works for what the rule watches. An event is marked · real-time and a check that only runs on a clock · scheduled; selecting one switches the rule's Checked setting to match and says so. Sensor reading (any field) adds a Field box for any reading a sensor's decoder produces; see Rules on sensor readings. Entered / left a place on a device, label or person / asset adds a Place box; Label field (person / asset) adds a Label field box. |
| Operator | Greater than | Equal to, Not equal to, Less than, Greater than, Between, Contains, and for a sensor field also Becomes (changes to) and Changes (any change). An event with only one sensible operator has it preselected. |
| Value | 27 | The threshold. A check with a fixed set of values (Device Status, Button Pressed, Gateway status, the events) offers a list instead. |
| Max Value | — | Only for Between, which includes both ends. |
| Only after it has held for | 15 minutes | Optional, 1 to 1440 minutes. The condition must stay true this long without a break; any break restarts the clock ("occupied for 45 minutes"). Not offered for Becomes, Changes or an event, which happen once. |
| Join to the conditions above | AND | AND or OR, joining this condition to those before it. Not shown on the first condition. |
How AND and OR combine. Conditions are read from the top down, one at a time, with no brackets. A OR B AND C means (A OR B) AND C, never A OR (B AND C). The AND/OR set on a condition states how that condition joins everything above it. Each condition after the first carries an AND or OR badge (on its row in the When card and on its box on the canvas), and the sentence under the top bar shows the brackets. For A OR (B AND C), create two rules: one for A, one for B AND C.
Several at once. On the Card view, Several at once… under the When card opens Several conditions at once and builds a list in one step, for example Temperature greater than 30 AND Humidity greater than 70. Add to canvas turns each row into a condition, wired in order, with the AND/OR placed between the rows exactly as it will be evaluated.
Actions
- Add an action: on the Card view, click Add an action under the Then card; on the Flow view, drag Action from the Nodes palette. It attaches after the last condition. With no condition yet, the builder shows Add a condition first: what has to be true before anything happens.
- Select the Channel, then set the fields it shows.
A rule can have several actions, and each is delivered separately: three actions are three deliveries, and one failing does not stop the others.
| Channel | Delivered to | Needs |
|---|---|---|
| In-App Alert | The bell in the admin web app, the mobile app's Alerts tab, and Monitor > Central Alerts | A Message. Who sees it: leave empty for every active administrator of the organisation. |
| Mini app notification | The phone or desktop of a mini-app user (cleaner, guard, technician), even with the app closed. Opens (optional) sets the page it opens | The users have opened a mini app once and allowed notifications. |
| Mobile app push (native) | A notification from the installed Omaya app | The app signed in on a phone that allowed notifications. |
| The administrators ticked (at the address on their account) and any addresses typed, one copy each | At least one administrator or address, and a subject and message (or a message template). Uses the SMTP connector if one exists, the platform's mailer otherwise. | |
| Telegram · WhatsApp · SMS | Outside Omaya: a chat ID, or one or more numbers separated by commas | The matching connector. WhatsApp and SMS need a number and a message (or a template). |
| Slack · Microsoft Teams | A channel in Slack or Teams, with the title in bold and the message under it | The channel's incoming webhook URL, pasted into the action. Slack: add the Incoming Webhooks app to the channel. Teams: channel ⋯ > Workflows > Post to a channel when a webhook request is received. Only Slack's and Microsoft's own addresses are accepted. |
| Webhook (HTTP POST) | An external endpoint, with optional headers and a JSON payload. See webhook events | A URL. |
| MQTT Publish | A topic, for the organisation's own subscribers | A topic and a payload. |
| Home Assistant (Matter / Smart Home) | Switches a real device: a light, a switch, a lock, a blind, the air-conditioning, a scene | A smart-home connector, with the entity mapped on its Mappings page. Only mapped entities are offered. |
| Page these people | Administrators by email and in-app; app users by email, SMS, WhatsApp and push, on the channels ticked. The message states what was pressed, by whom and where, unless a custom message is written. This is what a panic button does: one made on Device > Panic Buttons is a rule with this action | At least one person. SMS and WhatsApp use the phone number on the app user's account and the connector. |
| Raise a work order | The shared work-order queue the Facility app works from | A title. See Work order action below. |
| Add a row to a data table | One of the organisation's own tables, for a report the platform does not provide | A table. See Data tables. |
| Locate badge now · Sound badge · Exit badge alarm | A badge Omaya can send commands to: report its position now, sound its alarm, or stop the alarm sounding | A badge model that takes commands. Badge can stay on the rule's own device for a Device, Label, Person / asset or Geofence rule. Not again for this badge within (seconds): 120 if blank, at least 10. Sound badge also has Stop after (seconds): 10 if blank, 0 keeps it sounding until stopped. |
Some apps add their own actions to this list when they are enabled: Toilet Hygiene adds two that raise cleaning work orders, and Roll Call adds Start Roll Call.
Two kinds of push, two sets of people. Mini app notification reaches the people who use the mini apps, who carry out the work. Mobile app push reaches the installed Omaya app, which is the administrators' view. They are separate lists and the picker shows each separately. Either way a phone must have accepted notifications once; before that there is nothing to deliver to. The picker shows how many of each person's devices can be reached, and flags a channel with nobody reachable rather than letting it appear armed.
Placeholders. A message can carry the reading; see Message placeholders.
Work order action. Raise a work order is the one action that does not repeat. Every other channel is fire-and-forget: sending twice produces two messages. A work order is something a person has to close, so a rule raises at most one per rule and subject (the place, or for a Label rule each device: forty fridges, up to forty jobs): none while one is open, and none for a cool-off period after one is closed, because closing a job does not make the condition false. Its fields:
| Configuration Item | Value | Note |
|---|---|---|
| Title | Server Room too warm | Required. Takes the same placeholders as a message. |
| Description | — | Same placeholders as the title. |
| Work type | maintenance | cleaning, electrical, plumbing, maintenance, inspection, replenishment, other. |
| Required role | — | Who should see it. Blank for anyone. |
| Priority | high | low, medium, high, urgent. Medium if blank. |
| Do not raise again for (hours) | — | After one is closed. 24 if blank, 0 for an immediate repeat. |
Batteries, anomalies and gateways raise their own work orders; do not build rules for those. The job then follows the Facility app.
When the rule may act
The Checked card holds the settings that apply to the whole rule. It is the fourth card on the Card view, and sits under Rule settings on the Flow view when no box is selected.
| Configuration Item | Value | Note |
|---|---|---|
| Checked | Real-time | Real-time: checked whenever a reading or event arrives; the usual choice. Scheduled: checked on the interval beside it (every 5, 15 or 30 minutes; 1, 6 or 12 hours; daily; weekly), for questions that only make sense periodically. The interval is how often the rule is checked, not how often it may fire. A scheduled Label or Person / asset rule is checked for each device or person under it. Manual: only when someone clicks Run it now on the Rules list. The same choice is on the Watches panel. |
| Days | Mon to Fri | The days the rule may fire. None ticked (none = every day): every day. |
| Hours | — | A start and a stop time, on the organisation's clock. A window whose stop is earlier than its start runs across midnight: 22:00 to 06:00 covers 23:30 and 02:00. Both empty (empty = all day): all day. With only one filled in, the summary asks for both. |
| Repeat at most every | 1 hours | How long after firing before it may fire again, as a number and a unit (sec, min, hours), from 30 seconds to one day. A new rule starts at 30 seconds. A value outside the range turns the box red and Save refuses it. See Firing control settings. |
| Note | — | Optional, at most 500 characters, for whoever reads the rule next. |
The On switch in the top bar decides whether the rule runs at all. When it is off, the rule is kept but never fires.
Testing the rule
Test checks the rule as it stands, saved or not. Nothing is saved or sent. The Test dialog has two parts.
Right now checks each condition against the live reading for what the rule watches, and states It would fire now. or It would not fire now. Each condition is listed with its reading and one of true now, not now or no reading yet. An event condition shows an event: fires when it happens and a Becomes or Changes condition fires on a change; with either, the headline is Part of it can only be judged when readings or events arrive. This part works for temperatures, people, power and sensor fields alike. It compares the reading only: it does not wait for Only after it has held for, and it ignores the days, hours and repeat at most every. A Label, Person / asset or Geofence rule has no single reading to compare, and says so.
The replay below it runs the rule over the last 7 days of tag movements (Look back 1, 7, 14 or 30 days at the bottom of the dialog, then Run again), applying its days, hours and repeat at most every. It states how many times the rule would have fired and for how many devices, with a bar per day and the Latest firings listed, or It would not have fired. If you expected it to, check the place, the label's members and the hours. It can only replay what tag movements show: entering and leaving places, signal strength, device status, and battery (at today's level, as there is no battery history). It does not replay Only after it has held for, and it does not replay rules watching a gateway or a geofence. If any condition is outside that list (temperatures, counts, sensor fields, events from other apps), the rule is not replayed at all rather than shown as "0 times", and the dialog names the conditions it cannot replay; Right now still answers for them.
Verification
- Save shows Rule saved successfully. and the rule appears on the Rules list.
- If a part is missing, Save names it, for example Start with the box on the canvas: choose what this rule watches., Add at least one condition: what has to be true for the rule to act. or "Repeat at most every" must be between 30 seconds and one day. See Troubleshooting.
Message placeholders
A message can carry the reading. In an alert, a push, an email, a message, a webhook or an MQTT payload, write placeholders in double braces:
| Placeholder | Gives |
|---|---|
{{value}} | The reading the first condition looked at |
{{temperature}}, {{people_count}} … | Any metric value, by its name |
{{rule_name}} | The rule's name |
{{zone.name}} · {{venue.name}} · {{device.name}} | The names of what the rule watches. For a Label or Person / asset rule, {{device.name}} and {{zone.name}} are the device that fired it and the zone it is in |
{{entity.name}} · {{entity.type}} · {{label.name}} | The person or asset wearing the device that fired it, and the label a Label rule watches |
{{place_name}} · {{place_event}} · {{to_zone_name}} | For Entered / left a place: the place, entered or left, and the room the tag is in now |
{{gateway_name}} · {{anomaly_type}} · {{work_order_title}} · {{incident_title}} | The facts each platform event brings (see Event conditions) |
{{occupied}}, {{press_type}} … | A sensor's own fields, for a Sensor reading (any field) rule |
An email, WhatsApp, SMS or in-app alert also has these, and Insert a variable under its message inserts them:
| Placeholder | Gives |
|---|---|
{{date}} · {{time}} · {{datetime}} | When it fired, on the organisation's clock |
{{geofence_name}} · {{geofence_event}} · {{map_link}} | For a geofence crossing: the geofence, entered or left, and a Google Maps link to where the tag was |
{{recipient.name}} · {{recipient.username}} · {{recipient.email}} | The recipient of this copy: an administrator's name, username and address. Blank for a typed address or number |
{{tenant.name}} | The organisation's name |
In those channels, a placeholder with no value (a map link for a rule with no GPS fix, a person for a tag bound to nobody) comes out blank, and a name in an email cannot break its layout. A message with no HTML is plain text: a blank line starts a paragraph and links become clickable.
A work order's Title and Description take the same double braces. Rules written with single braces ({rule_name}, {zone_name}) keep working.
Message templates
Applicable versions / plans
SPECIFICATION
- Menu: Rules > Message templates, with
view-rules. create-rulesto create a template,edit-rulesto change one,delete-rulesto delete one.
Restrictions
- Name: required, at most 120 characters, unique in the organisation (There is already a template with this name.).
- Note: at most 255 characters. Subject: at most 255 characters. Message (email): at most 20,000 characters. Short text: at most 2,000 characters.
- The email message, the short text, or both must be written (Write the email, the short text, or both.). An email message needs a subject (An email needs a subject.).
- A template that a rule still uses cannot be deleted.
Procedure
Choose Rules > Message templates and click New template.
Set the fields as follows.
Configuration Item Value Note Name Server Room too warmShown in the action's Message list. Note — Optional. Subject (Email) Server Room too warmAlso the in-app alert's title. Message (Email) — The email body. Short text — For WhatsApp, SMS and the in-app alert. Empty: they receive the email message as plain text. Variables lists every placeholder; click one to insert it where the cursor is. Preview shows the email as it arrives, filled with sample values and with the organisation's name and logo.
Click Save.
In an email, WhatsApp, SMS or in-app alert action, set Message to the template instead of Write it here.
Verification
- Saving shows Template saved. When the template is already in use, the message adds how many rules use it from now on.
- A rule using a template shows what it will say. Editing the template changes every rule that uses it.
- Deleting a template in use is refused with Still used by … and the names of the rules; select another template on them first. Otherwise Template deleted.
Firing control settings
Three settings separate a useful rule from one everybody mutes.
Repeat at most every. A condition that stays true is true every time it is checked, so a rule left at 30 seconds repeats for as long as the room stays warm. Set it to how soon a repeat is genuinely wanted: an hour for a drifting temperature, a day for a battery. A Label, Person / asset or Geofence rule keeps it for each device: over forty fridges, fridge 3 firing starts fridge 3's clock and the other thirty-nine can still fire. So does an event about one thing in a wider place: the second person into the server room, the second gateway down on the floor. The summary line shows for each device or person when that applies. Otherwise the rule is about one thing (a device, a room, a floor) and keeps one clock.
Hours. Prevents, for example, the "room left empty" rule from paging anyone at three in the morning.
Days. Combined with repeat at most every 24 hours, this builds a weekly note: Monday only, repeat at most every 24 hours. One day is the longest interval available.
Configuration examples
Server Room too warm. An email to the operations lead and an alert on the bell when the Server Room is above 27 °C for a quarter of an hour on a working day, no more than once an hour (the scenario in Building a rule).
| Configuration Item | Value |
|---|---|
| Rule name | Server Room too warm |
| Priority | High |
| Watches | Zone: Server Room |
| Condition | Temperature, Greater than, 27, only after it has held for 15 minutes |
| Action 1 | In-App Alert. Message: Server Room at {{value}} °C |
| Action 2 | Email to the operations lead. Subject: Server Room too warm |
| Checked | Real-time |
| Days | Mon to Fri |
| Repeat at most every | 1 hour |
Temperature is a rolled-up metric, so the rule sees the room's temperature up to five minutes late; for a server room this is an acceptable trade. "Held for 15 minutes" stops a door left open for a minute from emailing anyone, and repeating at most once an hour stops a hot afternoon becoming twelve emails.
Lights off after the last person leaves. Switch the Dev Room lights off ten minutes after the last person leaves: watch Zone: Dev Room; condition Area Empty For (radar) greater than 9; action Home Assistant → light.dev_room → turn off; repeat at most every 1 hour; hours 07:00 to 21:00, which keeps it out of the overnight hours when the lights are already off. The Room empty 10 min ready-made check sets this up.
Rules on footfall and capacity
Overview
Three metrics turn the Footfall report into rules. They move with the hourly roll-up, not with each packet, so they are checked on a schedule.
| Metric | Meaning |
|---|---|
| Footfall Today (people so far) | People heard in the place since local midnight, each counted once however often they returned. Up to about an hour behind. |
| Footfall vs Usual (% of a normal day so far) | Today so far as a % of a normal day for this weekday: each complete hour's presence added up, against the same hours on the last four same weekdays. 100 is a normal day, 150 half as busy again. It compares hour-by-hour presence, not distinct people: someone present all morning counts once per hour on both sides. |
| Most Inside Today (% of capacity) | The most people inside at once today from the door counters, as a % of the place's capacity. Only for places with a door counter and a capacity. |
Requirements
At Northwind Tower, Aisha Rahman wants to know when Level 2 is much busier than a normal day for that weekday, so the cleaners can be told before lunch.
- Compare Level 2 with a normal day for the same weekday, every hour.
- Alert when it reaches 150 % between 09:00 and 14:00.
- At most one note a day.
Restrictions
- Watch a Location, Venue or Zone.
- Checked must be Scheduled: selecting one of these metrics switches Checked to Scheduled, and every hour is sufficient. A real-time rule on them is refused on save with … is checked on a schedule: set the trigger to Scheduled (every hour suits it).
- A figure that cannot be given honestly is left blank and the rule does not fire: a day on which the place's gateways sent nothing (an outage is not an empty building), the first hour of the day for vs usual, no past weekday to compare against, no door counter, no capacity.
Procedure
Choose Rules > All rules and click Add Rule.
Set the rule as follows.
Configuration Item Value Rule name Level 2 busier than usual Watches Venue: Level 2 Checked Scheduled, every 1 hour Condition Footfall vs Usual, Greater than, 150 Action In-App Alert. Message: Level 2 is at {{value}} % of a normal {{venue.name}} dayHours 09:00 to 14:00 Repeat at most every 24 hours Click Save.
Repeating at most every 24 hours makes it one note a day at most. The same shape answers "the site came close to the fire limit": Most Inside Today greater than 90 on the venue whose capacity is set. Footfall vs Usual also carries {{footfall_presence_so_far}} and {{footfall_presence_usual}}, and Most Inside Today carries {{most_inside}} and {{capacity}}, for the message.
Verification
- When the figure crosses the threshold inside the hours, the alert appears on the bell.
- When the check cannot be made, it is shown under Not checked today, with the reason, on the Rules tab of Monitor > Live Monitor. On the Rules list the rule shows Not checked today, with a dashed circle, under Last fired for the rest of the day (hover for the reason), and counts under Needs a look. It is written once a day per reason, so a rule checked every hour through a day-long outage shows one line, not 24.
NOTE
A check that was not made is not a firing: it sends nothing, does not start the repeat at most every clock and is not counted in the Rules list's firings, the Rule & Alert Effectiveness report's firings, or alert counts. That report lists it under the rule as Not checked on N days.
Event conditions
Most conditions compare a reading. The checks below wake the rule when something happens in the platform, once per occurrence. They are in the Events group of the Check list and are real-time (Gateway status can also be checked on a schedule).
| Check | Fires when | Watch |
|---|---|---|
| Entered / left a place | A tag is confirmed in a new room. On a zone, venue or location: anyone or anything crossing it. On a device, label or person / asset: select the Place (a zone, a floor or a whole site) | Any of those |
| Gateway status | A gateway stops reporting (Offline) or starts again (Online): once per change, exactly when the gateway alert goes out, quiet hours respected | A gateway, or a venue / location for any gateway in it |
| Device anomaly detected | Anomaly detection (which runs hourly) flags a device: silent, frequency drop or spike, signal drop, battery drain, configuration, or Any kind | A device, label, person / asset or place |
| Work order opened / resolved | A work order is opened or resolved in the place. A location also receives work orders tied to no room. A rule never wakes on the work order it opened itself | A zone, venue or location |
| Security Watch incident | Security Watch opens an incident in the place | A zone, venue or location |
| Fall / man-down detected | A worn tag fell, or has stopped moving. Needs fall detection switched on under System > Configuration | A device, label or person / asset |
| Wi-Fi sign-in (Kiwire) | A guest signs in to the Wi-Fi through the Kiwire connector | A zone, venue or location |
| Button Pressed · Visitor event · Geofence entered / left (GPS) | A button press; a visit registered, approved, checked in and so on; a GPS tracker crossing a geofence | A device or label; a place; a geofence (Visitor events come from the Visitor app) |
CAUTION
Left a place means seen somewhere else. A tag that goes silent (carried out of range, battery exhausted) has not been seen leaving; use Device Status offline for that, on a schedule.
Example: tools leaving the floor. Watch the label Tools; condition Entered / left a place equal Left, Place Level 5 (the venue); action WhatsApp to security, {{entity.name}} left {{place_name}}, now in {{to_zone_name}}; repeat at most every 15 min. Each tool keeps its own clock, and a move between two rooms of Level 5 is not leaving Level 5.
Label fields. Label field (person / asset) reads a field defined on a label for each person or asset (Entity in the menu, then the Label Fields button at the top right of the page): a number, a word, or a date read as days from today, negative once passed. Service due within 7 days is less than 8. Watch the label or the person / asset; selecting this check switches the rule to Scheduled, daily.
Outside (GPS). Where the organisation has GPS trackers, the Check list also has an Outside (GPS) group (Time outside (GPS), Stopped outside a geofence (GPS), Not heard while outside (GPS), Speed (GPS)) for a device, label or person / asset.
Other ways to create a rule
Starter pack
System > Configuration > Starter Packs creates the rules an organisation of a given industry usually starts with, all at once: crowding, after-hours presence, cold-chain ranges, falls, panic buttons, leaks, power after hours, and GPS rules for vehicles and lone workers. Each rule is shown first, with where it watches, its value and its hours, and any of them can be unticked or changed. Rules that page people are created switched off until recipients are chosen. See Start from an industry pack.
Ready-made checks
Under Ready-made checks, on the right of the Card view, one click adds a ready condition, an In-App Alert if the rule has no action yet, the Checked setting and the repeat at most every the condition needs (if it is still at 30 seconds), a name if the rule has none, and a suggestion of what to watch:
| Group | Cards |
|---|---|
| People & assets | Panic button pressed · Fall / man-down · Leaves a place · Someone enters a room |
| Devices | Low battery (below 20 %, checked daily) · Tag or sensor offline (checked every 15 minutes) · Gateway offline (any gateway on a floor) |
| Outside (GPS) | Lone worker not heard (nothing for 30 min after being outside) · Outside a long time (more than 2 h) · Speeding (over 90 km/h, vehicles). Shown only where the organisation has GPS trackers |
| Rooms | Room empty 10 min (radar) · Over capacity |
| Environment | High temperature (above 30 °C) · Low temperature (below 18 °C) · High humidity (above 70 %) · High noise (above 80 dB) |
The panel then opens on what is still to be chosen: which label, zone or floor to watch, or the place to watch for. Over capacity starts with a placeholder and takes the zone's own capacity as the threshold once the zone is selected.
From a template
New from template, beside Add Rule on the Rules page (shown with create-rules), lists ready-made rules by category: Room too warm, Unusual power draw, Leak detected, Leak detected: raise a job, Door left open: raise a job and Tag too warm (cold chain) (Environment); Room at capacity too often, Room underused and Zone over capacity (Occupancy); Door left open (Security); Tag battery voltage low (Device health). Selecting one opens the builder already filled in; choose which zone, venue or devices it watches and check each box before saving. Zone over capacity replaces its placeholder threshold with the zone's own capacity once the zone is selected.
The two raise a job templates hand a technician a work order instead of only an alert. Both start switched off and watch the devices selected:
| Template | Fires when | Work order |
|---|---|---|
| Leak detected: raise a job | leak_detected becomes 1 | Urgent plumbing job |
| Door left open: raise a job | door_open stays 1 for 30 minutes | High-priority inspection job |
Each raises one job per device: never a second while that job is open, and not again for 24 hours after it is closed. The job is titled with the device's name, for example "Water at Pantry leak sensor" or "Cold room door left open".
Describing the rule to the AI assistant
SPECIFICATION
- Permission:
create-rules. New rules only. - AI switched on and a provider key set under System > Configuration > AI.
- Each request counts against the organisation's monthly AI allowance, the same one as the reporting assistant. See AI in Omaya.
In the builder's top bar, click Describe it (the sparkle button). The Describe the rule panel opens with three examples, such as:
Email ops@example.com if the Server Room goes above 30°C after 6pm on weekdays
WhatsApp security when anything labelled Tools leaves Level 5
Describe what should happen, in plain language, and click Draft.
Refine the draft by continuing the conversation ("make that 28", "also on Saturdays") until the card is correct.
Click Save as draft & open in builder, or Discard to drop it.
The assistant knows the organisation's venues, zones, devices, labels and metrics, so it selects temperature on the zone called Server Room rather than guessing. It answers in its own words and, when it has a rule, shows a card: Draft — not saved, will be created switched off, with what the rule applies to (by name), when it may fire, its conditions and what it does. The card shows repeat at most every in seconds.
Nothing is saved until Save as draft & open in builder is clicked. The draft lands in the builder switched off, with every field editable, to be checked with the real controls and switched on manually.
- Use the names Omaya uses. "Server Room" works if that is the zone's name; "the cold room at the back" does not. The card shows which zone it selected; check it.
- State the number and the time. "Too warm" becomes a guess; "above 30 °C for ten minutes, weekdays after 6pm" becomes the intended rule.
NOTE
If the draft is close but not right, correcting it in the builder is usually faster than describing it again.
Rules list
Rules > All rules opens with four counts across the top: On, Fired today, Needs a look (switched on but never fired, or today's scheduled check could not be made) and Off. Clicking On, Needs a look or Off opens that tab.
Under them are the tabs All, On, Needs a look and Off, and the filters Find a rule (by name), Watches anything (or one kind: Zone, Label, Venue …) and Any priority. Clear resets the filters.
The list shows the most recently changed rule first. Each row has:
| Column | Shows |
|---|---|
| Rule | The name, and under it the rule in one line: its conditions and what it does ("Temperature above 27 °C for 15 min → In-App Alert, Email") |
| Watches | What it watches, by name, with the kind under it |
| Checked | as it happens, the interval (every 15 min, hourly, daily …) or by hand |
| Priority | High, Medium or Low |
| Last fired | How long ago (3 min ago), with the number of firings under it, or Never. Not checked today appears here when today's scheduled check could not be made |
| On | The switch. Clicking it switches the rule on or off: Rule activated. or Rule deactivated. Read-only without edit-rules |
| (buttons) | Run it now (the play button; only while the rule is on, with edit-rules), Its alerts (the bell: Central Alerts filtered to this rule) and Delete (the bin, with delete-rules) |
Clicking anywhere else on a row opens the rule in the builder. A user without edit-rules cannot open the builder (there is no read-only view); the list shows You can see this rule but not change it. On a phone, Watches, Checked and Priority are hidden to leave room for the rule.
WARNING
Delete opens Delete Rule (Are you sure you want to delete …?) and removes the rule's conditions, actions and logs with it. This cannot be undone.
Commissioning a rule
- Click Test in the builder. Right now states whether the rule would fire on the current readings; for a rule about places, signal, device status or battery the replay also shows what the last week would have looked like.
- Save the rule with an In-App Alert as one of its actions, even if the real action is an email. The bell is the quickest place to see it fire.
- On the Rules list, click Run it now (the play button on the rule's row). The list shows Rule queued for immediate evaluation. The rule is checked immediately, with the usual gates: it must be on, inside its days and hours, past its repeat at most every, and its conditions must be true now. Run it now does not force a firing. To prove the actions, temporarily set a threshold that is true now (Temperature greater than 0), run it, then restore the real threshold.
- Read the Rules list. Last fired shows when it last fired, with the number of firings under it. The Rules tab of Monitor > Live Monitor counts it under Today, by rule, with all sent or N not sent, and lists any action that did not go out under Did not go through with the reason. Firings also appear in the live alerts on Monitor > Right Now & Live Alerts. A scheduled check that could not be made (no data that day, for example) is listed under Not checked today with the reason; it is not a firing. One exception: a rule whose action is Toilet Hygiene's Auto-create cleaning WO (dirty score) is fired by the toilet's score, so it counts on the Rules list but has no row there; its jobs are in Toilet Hygiene.
- Watch the first full day. The two failure modes are opposite and both show within a day: the rule never fires, or it fires constantly. See Troubleshooting.
Recommended first rules
| Rule | Condition | Settings |
|---|---|---|
| A room is left occupied after hours | People in Area (radar) greater than 0 | Hours outside working hours |
| A fridge or server room is drifting warm | Temperature greater than the limit, held for 15 minutes | Repeat at most every 1 hour |
| Tags going flat | Battery Level less than 20, watching the label the tags carry, checked daily (the Low battery card) | Repeat at most every 24 hours, emailed to whoever keeps the spares. A critical battery already raises a work order by itself (unless that is switched off under Work orders opened automatically in the Facility app's settings, Apps > Your apps); this rule is the earlier reminder |
| A room nobody uses | Utilisation, last 7 days, less than 25 (the Room underused template) | Scheduled, daily; Monday only; repeat at most every 24 hours: a weekly note, not a daily one |
| A floor using more power than usual | Energy Used Today greater than a normal day's total | Watch the venue; repeat at most every 24 hours |
| A floor much busier than usual | Footfall vs Usual greater than 150 | Watch the venue; Scheduled, every hour; repeat at most every 24 hours |
Notification volume
Overview
Example: a site loses power on Level 2 for half an hour. A Label rule on the forty fridges carrying the label Fridges, "Temperature greater than 8, email the operations lead, repeat at most every hour", sends forty emails at 14:05 and forty more at 15:05. A Server Room rule the same afternoon sends nothing.
Both rules did exactly what they were set to do. How many messages a rule sends is decided by a series of settings, each of which either multiplies or stops the count. The diagram in Firing control settings shows the gates one check passes through; the diagram below shows what each does to the count.
What decides the count
| Setting | Where | Effect on the count |
|---|---|---|
| Checked | The Checked card | Real-time checks on every reading or event; Scheduled on every tick of its interval. Each check whose conditions are true is a chance to fire. The interval is how often the rule is checked, not a limit on firing |
| Repeat at most every | The Checked card | After a firing, the rule may not fire again until this has elapsed: 30 seconds on a new rule, at most one day. This setting turns "true all afternoon" into one message an hour instead of one a minute. It starts before anything is sent, and covers all the rule's actions together |
| One clock per device | Follows from what the rule watches | A Label, Person / asset or Geofence rule keeps a separate repeat at most every for each device, and so does an event about one thing in a wider place (each gateway for Gateway status, each person for Entered / left a place). Forty fridges warming together are forty clocks expiring together: forty messages. The summary line under the top bar shows for each device or person when this applies. A Venue or Location rule on a device reading keeps one clock for the whole rule |
| Only after it has held for | Each condition | The condition must stay true this long without a break before the rule may fire. It stops a door left open for a minute from sending anything, and stops a reading hovering on the threshold from firing on every crossing |
| Days and Hours | The Checked card | Outside them the rule is not checked at all. Nothing is queued: an event at 03:00 on a rule with Hours 07:00 to 19:00 is never sent, even after 07:00 |
| Actions | Each action in the Then card (or Action box on the canvas) | Each action is its own delivery. Two email actions are two emails |
| Recipients | Inside the action | In-App Alert with Who sees it empty goes to every active administrator: one firing, one bell entry each. Mobile app push (native) with Who to notify empty goes to every phone signed in to the organisation. Mini app notification with Who to notify empty goes to every app user who has turned notifications on. Email, Telegram, WhatsApp and SMS go to the address, chat or number entered |
| Raise a work order | The action | The one action that does not repeat by itself: none while one is open for the same rule and subject, and none for Do not raise again for (hours) after it closes (24 if blank) |
There is no organisation-wide throttle. How often a rule may notify is determined by its own Repeat at most every and nothing else. System > Configuration used to show a Notification Throttle (minutes) on its Schedule card; nothing ever read it, and it has been removed rather than wired in, because a blanket gap would silently override a rule set to repeat more often (a panic button pressed twice, a door alarm wanted every time).
The platform's own notifications are not rules. Gateway offline and Gateway recovered, Positioning coverage degraded and restored go to every active administrator once per change and cannot be throttled or silenced per person. The same title and message to the same person within 10 minutes is shown once. See Being told when a gateway drops.
Why it sends nothing
After a firing, each action goes to its channel separately, and can stop there. An action that did not go out is listed under Did not go through on the Rules tab of Monitor > Live Monitor, with its outcome and the reason, for example telegram · skipped — No active Telegram connector:
| Symptom | Badge on the action | Action |
|---|---|---|
| The rule did not fire at all | Not under Today, by rule | Check the rule's settings: see Troubleshooting |
| The channel's connector is missing or switched off (Telegram, WhatsApp, SMS, Home Assistant) | skipped — No active Telegram connector (or WhatsApp, SMS, Smart Home Bridge) | Under Connectors, check that the channel's connector exists and is Active |
| The action has no address, chat ID, number or URL | skipped — No recipient set, No chat ID set, No URL set | Open the rule and complete the action |
| The provider refused it (wrong chat, bad number, no credit, mail server refused, webhook returned an error) | failed — the provider's own words, such as Bad Request: chat not found or HTTP 503 | Read the reason, then use the connector's test button with the same address |
| The job could not run at all, three times | failed — the error | Read the reason |
| An In-App Alert with no active administrator | skipped — No active administrator to show it to | System > Admins |
| Page these people with nobody on the list | skipped — Nobody is on the list to page | The action's people, or the panic button on Device > Panic Buttons |
| A push with nobody reachable | skipped — No phone signed in to receive it, or No app user has turned notifications on | The recipient picker in the action shows on how many devices each person can be reached |
| A work order not raised again | sent, with a note on hover: Not raised: one is already open | By design: see Actions |
Email does not need a connector. An email action uses the SMTP connector when one exists, and Omaya's own mailer otherwise, so it is never skipped for want of a connector, only for want of an address.
sent means the provider accepted the message. A message the provider accepts and loses later (an email that bounces an hour later, an SMS the carrier drops) still reads sent; only the provider's own records show the outcome.
A skipped action never reached a provider, so it is not on System > Usage. Every attempt that did reach one is there, sent or failed, with the same error.
Diagnosis
Work down the list; the first item that explains the behaviour is usually the answer.
- Rules > All rules (
/admin/manage/rule). Find the rule (Find a rule). Its Last fired shows when, with the number of firings under it. Forty emails with that count up by forty is a rule firing forty times (one clock per device, or a short repeat at most every). Forty emails with the count up by one is one firing with forty recipients or forty actions. An unchanged count means it never fired: see Troubleshooting. The bell button on its row (Its alerts) opens Central Alerts on that rule's alerts. - Monitor > Live Monitor (
/admin/monitor), Rules tab. Today, by rule gives each rule's firings today, the last one, its channels and all sent or N not sent. Did not go through lists each recent action that was skipped or failed, with the reason. Not checked today lists the scheduled checks that could not be made (not firings). The status filter and search narrow all three. - System > Usage (
/admin/usage). For the month: Messages sent, Messages failed, Messaging per channel, Messages by purpose (Rule alerts are the rules), and Recent failures: the last ten refusals with the channel, the masked recipient and the provider's error. An action skipped for a missing connector or recipient never reached a provider, so it is not on this page. - System > Activity Log (
/admin/activity). To check whether someone changed the rule, type the rule's name orOmayaRulein the search box (Search record, page address, IP…) and open the rows: the Field, Was and Now table shows, for example,action_everygoing from 3600 to 30. This covers the rule's own settings (name, priority, what it watches, Checked, Days, Hours, repeat at most every, On); a change to only a condition's threshold or an action's address does not currently get a row of its own. To check whether a connector started failing, open the System tab, which lists connectors that started or stopped failing. See Who did what. - Connectors (
/admin/connector). Open the channel's connector and test it (Test Connection; for Telegram, Send a test message) with the same address, chat ID or number the rule uses.
Reducing the number of messages
| Goal | Setting |
|---|---|
| A message for each fridge, but not every hour | Lengthen Repeat at most every (it keeps one clock per fridge) and add Only after it has held for 15 minutes |
| One message, not one per fridge | Keep the Label rule for an In-App Alert only, and email the day's firings instead: System > Schedule Report, Report type Alert Digest, Frequency Daily |
| Nothing at night | Hours 07:00 to 19:00; nothing is sent later for what happened outside the window |
| Fewer people on the bell | Select people in the In-App Alert's Who sees it instead of leaving it empty |
In the example above, the silent Server Room rule was outside its Hours, so it was not checked at all.
Troubleshooting
Symptom: the rule never fires. Check, in this order:
- Is it switched on (the On switch on its row; the Off tab lists the rules that are not)? Is today ticked in Days (or none ticked), and is the current time inside Hours? A row with no Run it now button is a rule that is switched off.
- Does the check have a value for what the rule watches? A radar metric on a room with no radar never has one.
- Does the room ever reach the threshold? Compare with the report for that metric.
- For a sensor-field or zone rule: has the device reported since the rule was saved, and is it assigned to that zone? For a Venue or Location rule on a device reading (battery, device status, a sensor field): is the device on that floor or site, and is the rule checked Real-time?
- For a Label rule: does anything carry the label? The Which one list shows it.
- The Needs a look tab lists rules that are on but have never fired, or whose scheduled check could not be made today.
| Symptom | Cause | Action |
|---|---|---|
| The rule fires all the time | Repeat at most every is shorter than the condition lasts, or the threshold sits on the room's normal value | Lengthen the interval, move the threshold, or add Only after it has held for |
| A Label rule fired once for a fridge and not again | That fridge is inside its own repeat at most every; the other devices carrying the label each have theirs | None; by design |
| The email never arrived, but the firing count went up | The rule fired; the delivery did not complete. On the Rules tab of Monitor > Live Monitor the rule shows all sent when every action was accepted; an action skipped (something it needs is not set up) or failed (the provider refused it) is listed under Did not go through with the reason. Sent with nothing in the inbox is a message lost after the provider accepted it: a spam folder, a later bounce | Check the address, and the connector under Connectors |
| The work order did not appear a second time | One is still open, or one was closed inside the cool-off | None; by design |
| The push reached nobody | Nobody on that list has allowed notifications on a device yet | The picker shows this; ask the recipients to allow notifications |
| Save shows "Repeat at most every" must be between 30 seconds and one day. | The value is outside the range; the box is red | Enter 30 seconds or more, and no more than 24 hours |
| Save shows Start with the box on the canvas: choose what this rule watches., Pick which one this rule watches., Add at least one condition: …, Condition 2 is not finished: … or Add an action: … | That part of the rule is missing or incomplete; the one-sentence summary shows it in colour | Add conditions with Add a condition (Card view) or by dragging Condition onto the canvas (Flow view); both join the chain by themselves. A condition or action marked Not joined on the Card view is not part of the rule and is not saved: remove it, or add it again |
| Save shows Action 1: choose who gets the email: tick an admin or type an address., … write the email subject and message, or pick a message template. or … type the phone number to send to. | An email, WhatsApp or SMS action is incomplete | Complete the action, or select a message template |
| Save shows … is checked on a schedule: set the trigger to Scheduled (every hour suits it). or … is raised the moment it is detected: set the trigger to Real-time. | That check only works one way | Set Checked to match |
| A Label rule ignores a newly labelled device | The label change has not reached the engine yet | Wait ten minutes |