Conditions
Add conditions to choose what a rule watches.
- In the rule, click + Add condition.Twelve condition types appear.
- 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.
- Fill in the panel that opens to add the condition.
What each condition type monitors
| Condition | Monitors |
|---|---|
| AI Camera | Camera video: people, faces, plates, fire, codes, text, or targets you trained. |
| Schedule | Days of the week and time ranges. |
| Interval | A repeating cycle at a fixed interval. |
| I/O Device | A sensor reading or a board input. |
| MQTT · Modbus · OPC UA · User Defined Comm | Values received from a broker, a PLC, or a custom protocol. |
| Telegram | Messages received by your bot. |
| Sound Classification | Sounds such as breaking glass, a barking dog, or an alarm. |
| Speech To Text (STT) | A spoken phrase. |
| Custom Condition | Evaluations 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
- Select the camera and the analysis.If none exists, create it from this panel.
- 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.
- If the Target value field appears, select the target.It is an object class, a person, a plate, or text.
- Adjust the confidence (how certain a detection must be) if needed, and set Sustained for.The remaining settings are under Advanced.
- Click Add.
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.
- 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).
| Field | Description |
|---|---|
| LLM connection | The LLM provider to query. Create one from this panel if none exists. |
| Query | The question sent to the LLM. Required. Example: "Is a person actually knocking on the door?" |
| Shots | Number of photos to send. 1 to 10. |
| Interval | Time between shots. 0 to 5,000 ms. |
Each rule can have at most one, and a camera condition is required to enable it.