Get Started
Conditions

Conditions

Add conditions to choose what a rule watches.

  1. In the rule, click + Add condition.Twelve condition types appear.
  2. Select the type that matches what you want to watch.For camera video choose AI Camera; for days and times, Schedule; for sensor readings, I/O Device.
  3. Fill in the panel that opens to add the condition.
The list of condition types
What a condition can monitor.
What each condition type monitors
ConditionMonitors
AI CameraCamera video: people, faces, plates, fire, codes, text, or targets you trained.
ScheduleDays of the week and time ranges.
IntervalA repeating cycle at a fixed interval.
I/O DeviceA sensor reading or a board input.
MQTT · Modbus · OPC UA · User Defined CommValues received from a broker, a PLC, or a custom protocol.
TelegramMessages received by your bot.
Sound ClassificationSounds such as breaking glass, a barking dog, or an alarm.
Speech To Text (STT)A spoken phrase.
Custom ConditionEvaluations the other types cannot express, written with blocks or a script.

With several conditions, the rule runs when all of them are met. A camera condition plus a schedule gives "a person, at night only"; plus a sensor reading, "a person, only while the machine is running".

Setting Up a Camera Condition

  1. Select the camera and the analysis.If none exists, create it from this panel.
  2. Choose the evaluation in the Condition list.The list depends on the analysis. For example, a face analysis offers known/unknown, a plate analysis registered/unregistered.
  3. If the Target value field appears, select the target.It is an object class, a person, a plate, or text.
  4. Adjust the confidence (how certain a detection must be) if needed, and set Sustained for.The remaining settings are under Advanced.
  5. Click Add.
Caution Target values are compared exactly as written. Select objects from the list rather than typing them.
Automatic case correction of target values

Object names (lower case) and plates (upper case) are corrected automatically. Names you define yourself are compared exactly as entered.

Sub conditions: checking once, at the moment the rule runs

Conditions are normally checked continuously. Changing one to a sub condition makes it checked once, at the moment all other conditions are met, to decide whether the actions run.

Example: when the doorbell is pressed (ordinary condition), check at that moment whether the face at the door is registered (sub condition). The second camera does not need to be analyzed all day.

  1. In the condition's row menu, click Change to sub condition.The list shows a Sub badge. Sub conditions have no hold time setting.

A rule needs at least one ordinary condition. Reflex blocks a change that would leave only sub conditions, and explains why.

Ask LLM: double-checking a detection with an LLM

With Ask LLM on, Reflex captures photos the moment the condition matches and sends them to an LLM. The actions run only if the LLM approves. Use it for conditions prone to false positives. The switch is directly below Sustained for in the camera condition panel (outside Advanced).

FieldDescription
LLM connectionThe LLM provider to query. Create one from this panel if none exists.
QueryThe question sent to the LLM. Required. Example: "Is a person actually knocking on the door?"
ShotsNumber of photos to send. 1 to 10.
IntervalTime between shots. 0 to 5,000 ms.

Each rule can have at most one, and a camera condition is required to enable it.