Перейти до вмісту

Automation starters

Цей контент ще не доступний вашою мовою.

A starter is a ready-made alarm rule or automation with a few fields to fill in: the parameters it reads or writes, limits, times and who is notified. It builds an ordinary document that opens unsaved in the alarm rule form or the automation editor, where you review it, dry-run it and save it; nothing is created before you save. After that it is your document: change it like any other, and later changes to the starter do not touch it.

To use one, see start from a starter.

Names and messages are built in every language of the app, with the Name you enter in them as written. When you save without changing a text, it keeps all its languages.

Raises an alarm when a number parameter stays above or below a limit.

FieldMeaning
NameNames the rule (Tank level: above limit) and starts its message
ParameterA parameter of number type
Alarm when the value isAbove or below the limit
Limit, HysteresisThe alarm clears once the value is back past the limit by the hysteresis (0 by default)
Raise after, Clear afterHow long the value must stay past the limit, and back within it (60 s and 30 s)
SeverityWarning by default
Keep until acknowledgedLatching
Notify, Notify afterRecipients, and how long notifications wait (nobody, 0 s)
Alarm when unknown forOptional: raise the rule’s separate unavailable alarm when the value stays unknown this long

Builds an alarm rule with the input value, calculated limit (and clearLimit with hysteresis), the condition value > limit or value < limit, and the message {label}: {value}, above the limit of {limit} with the value rounded to two decimals. Inputs are read as often as the workspace allows, at least every 10 s.

When values are unknown (stale, failed reads, disabled parameter) the alarm is neither raised nor cleared. Only Alarm when unknown for reports that, with a separate alarm.

Raises an alarm when an endpoint stays disconnected.

FieldMeaning
NameNames the rule (Boiler PLC: no connection) and starts its message
EndpointThe endpoint to watch
Raise afterHow long it must stay disconnected (2 min); shorter drops raise nothing
SeverityUrgent by default
Keep until acknowledged, Notify, Notify afterAs for the threshold alarm

Builds an alarm rule on the endpoint’s connection (not connected) that clears as soon as the endpoint reconnects, with the message {label}: no connection and how long it has been disconnected.

When the connection state is unknown, such as while the endpoint’s connector is offline, the rule’s unavailable alarm is raised after the same time.

Notifies more people when nobody acknowledges an alarm rule’s alarm in time.

FieldMeaning
NameNames the automation (Tank overflow: escalation) and starts its message
Alarm ruleThe rule whose alarm is watched
Escalate afterHow long the alarm may stay unacknowledged (15 min, up to 24 h)
Escalate toRecipients (owners and admins by default)
SeverityUrgent by default
Stop when the alarm clearsOn by default; turn it off for a latching alarm that must be acknowledged even after it clears

Builds an automation that reads the alarm’s state, not its transitions: the inputs active and unacknowledged ("state": "unacknowledged"), and the calculated waiting, which is active and unacknowledged (just unacknowledged when Stop when the alarm clears is off). A branch held on waiting for the delay sends {label}: not acknowledged for {delay}.

Failure behavior: acknowledging (or clearing) the alarm before the delay sends nothing, however fast the alarm changes, because the end of the wait reads the alarm as it is then. A notification already sent stays sent. One notification is sent per wait; the next waits until the alarm is raised and unacknowledged again. The wait runs only while the automation is enabled: disabling or deleting it stops the escalation, and enabling it forgets waits from before. Besides alarm changes, the alarm is checked every delay, so an alarm already raised when you enable the automation starts its full wait at the next check.

Writes a setpoint at times of day, every day or on chosen weekdays.

FieldMeaning
NameNames the automation (Office: setpoint schedule)
SetpointA writable parameter of number type
Schedule1–10 entries: time, weekdays (none chosen: every day), value
Write the current value when enabledOn by default

Two entries cannot share a time on a day they both have.

Builds an automation with a timeOfDay trigger for each entry, in the workspace timezone. Each runs one procedure, apply, that writes the value of the entry that fired last at that moment, so a time that runs late, such as one caught up after a restart, never brings back an older entry’s value. With Write the current value when enabled, onInit runs apply too, so the setpoint is right before the next time comes.

Failure behavior: a write that fails or that the device refuses is not repeated and shows in the run’s steps; the setpoint stays as it is until the next entry. Writes are limited to two a minute. While the automation is disabled nothing is written, and times missed by more than two minutes are skipped.

Runs one of two to four units (pumps, fans, compressors) at a time, hands duty to the next unit on a schedule, and fails over when the duty unit fails.

FieldMeaning
NameNames the automation (Booster: duty/standby) and starts its messages
Units2–4, in duty order: a writable Run command (boolean or number), optional Running feedback and Fault (boolean or number)
Switch duty at, Switch on weekdaysWhen duty moves to the next healthy unit (06:00, every day)
Fail over afterHow long the duty unit may report a fault or not report running (60 s)
SeverityOf failover notifications; warning by default
Notify about failoversOptional recipients

Each unit needs its own run command.

Builds an automation that keeps the duty unit in the state variable duty (1 for the first unit). Its run command gets true or 1, and the others false or 0; the new duty unit is started before the others are stopped. Commands are written when the automation is enabled, at the switch time, and on failover.

  • A unit is healthy while its fault input is known and clear and its running feedback is known, on or off; a unit with neither is always healthy. The duty unit fails while it is not healthy, or while its running feedback is not on.
  • Once the duty unit has failed for Fail over after, the next healthy unit in order takes over, the members chosen under Notify about failovers are notified, and the failover is logged in the run history. The new duty unit then gets the same time to report running.
  • When no other unit is healthy, the duty unit keeps running and the urgent alarm {label}: unit {from} failed, no standby available is raised. Until then every check tries the other units again, so one that recovers takes over; the alarm clears once the duty unit, whichever it is by then, works. Enabling the automation again while the failure lasts raises it again.
  • At the switch time, duty skips units that are not healthy; with none, it stays. The new duty unit’s wait to report running starts at the next check.

Unknown values count as a failure: a unit whose fault or feedback is unknown is not trusted to take over. Besides input changes, the units are checked every Fail over after, or the workspace’s shortest trigger interval when that is longer, because a value that becomes unknown triggers nothing by itself. A unit with neither feedback nor fault is never failed over. A write that fails is not repeated. Writes are limited to three per unit a minute, within the workspace’s writes per minute; a workspace that allows fewer writes a minute than there are units cannot save it, since a switch cut short would leave two units running.

Sends chosen members the current values of up to nine parameters at a time of day.

FieldMeaning
NameNames the automation and starts the message title
Send at08:00 by default
WeekdaysNone chosen: every day
Send toRecipients (owners and admins by default)
Values1–9 rows: a label and a parameter of any type

Builds an automation with a timeOfDay trigger that sends an information notification {label}: daily summary with one label: value line per row; numbers are rounded to two decimals.

Failure behavior: the inputs are read every 10 minutes, so a value can be up to about 20 minutes old. A value that is unknown shows as a dash, and the summary is still sent.

Starters are in the templates.automation procedures of the API; every member can read them, and the assistant uses them too.

ProcedureWhat it does
templates.automation.listStarters (id, kind, name, description, summary), filtered by kind (automation or alarmRule) and query
templates.automation.getOne starter with its placeholders in form order
templates.automation.instantiateBuilds the document from values; saves nothing

A placeholder has a name, a kind, a label and optional help, optional, bounds and default. Values are keyed by name:

KindValue
parameterA parameter id; valueTypes and writable say which parameters fit
endpoint, alarmRuleAn endpoint or alarm rule id
numberA number within min and max
durationMilliseconds within min and max; forms show them in unit (s, min, h)
timeOfDay"HH:MM"
weekdaysISO weekdays, 1 for Monday to 7 for Sunday; [] for every day
severityinfo, warning or urgent
recipients{ "kind": "roles", "roles": […] } or { "kind": "members", "userIds": […] }
booleantrue or false
choiceThe value of one of options
textPlain text of up to maxLength characters, saved as written
listAn array of minItems to maxItems rows, each keyed by the names of fields

A value left out takes the placeholder’s default; an optional one without a default is left out of the document. A placeholder with shownWhen (name and optional values) counts only while the placeholder it names has one of those values, or any value: otherwise forms hide it, and its value is neither required nor used. A list may name its rows with itemLabel. instantiate returns { ok: true, kind, document, diagnostics }, where diagnostics are the validator’s against the workspace, or { ok: false, problems }. Each problem has a JSON pointer path into values (/limit, /entries/1/time), a code and args:

CodeMeaning
required, invalid, unknown_placeholderMissing, malformed, or not a placeholder
out_of_range (min, max), too_few (min), too_many (max)Outside the bounds
duplicateRepeats an earlier row, such as one time on one day
parameter_not_found, parameter_type (expected, actual), parameter_not_writableThe parameter does not fit
endpoint_not_found, alarm_rule_not_found, member_not_foundNot in the workspace

Save the document with automation.create or alarmRule.create. An unknown starterId is automation_starter_not_found.