# Rules

Automation rules enable automatic control of filtration devices based on air quality measurements from AirWatch sensors.

## Accessing Automation

Navigate to `/sites/[id]/automation` or click "Automation" in the site sidebar.

## Concept

Automation rules connect:

* **Trigger device**: AirWatch sensor measuring PM10
* **Target devices**: Filtration devices to control
* **Threshold**: PM10 level that activates the rule

When PM10 exceeds the threshold, target devices start. When PM10 falls below, they stop.

## Rule Components

### Trigger Device

AirWatch sensors that can be triggers:

* AirWatch 3.0
* AirWatch LTE Europe
* AirWatch LTE America

### Target Devices

Filtration devices that can be controlled:

* AirDome
* Clean Air Tower (Self-Cleaning)
* Clean Air Tower (Disposable)

### PM10 Threshold

The PM10 value (in µg/m³) that triggers action:

* Below threshold: Target devices stop
* Above threshold: Target devices start

Typical suggested thresholds:

* Conservative: 50 µg/m³
* Standard: 100 µg/m³
* High activity: 150 µg/m³

#### PM10 Threshold Helper

A visual helper shows:

* Current PM10 level
* Historical averages
* Suggested threshold range
* WHO guideline reference

## Creating Rules

### Add Rule Modal

{% stepper %}
{% step %}

### Select Create

Click "Create Automation Rule".
{% endstep %}

{% step %}

### Choose Trigger

Select trigger AirWatch device.
{% endstep %}

{% step %}

### Choose Targets

Select target filtration device(s).
{% endstep %}

{% step %}

### Set Threshold

Set PM10 threshold.
{% endstep %}

{% step %}

### Save

Save rule.
{% endstep %}
{% endstepper %}

### Threshold Selection

The system suggests thresholds based on:

* Historical PM10 data
* Average readings
* Recommended ranges

Typical thresholds:

* Conservative: 50 µg/m³
* Standard: 100 µg/m³
* High activity: 150 µg/m³

## Rule Cards

Each rule displays as a collapsible card.

### Card Header

* Rule name (auto-generated or custom)
* Trigger device name
* Enable/Disable toggle
* Edit/Delete buttons

### Card Content

* Trigger device with current PM10 value
* Target device(s) list
* Threshold value
* Rule status

## Managing Rules

### Enable/Disable

Toggle rules on/off:

* Disabled rules don't trigger
* Keep rules for later use
* Quickly pause automation

### Edit Rule

Modify existing rules:

* Change threshold
* Add/remove targets
* Update name

### Delete Rule

Remove rules:

* Confirmation required
* Cannot be undone

## Rule Behavior

### Start Rule

{% stepper %}
{% step %}

### Condition

AirWatch reports PM10 > threshold.
{% endstep %}

{% step %}

### Detection

System detects condition.
{% endstep %}

{% step %}

### Command

Start command sent to targets.
{% endstep %}

{% step %}

### Action

Target devices begin filtering.
{% endstep %}
{% endstepper %}

### Stop Rule

{% stepper %}
{% step %}

### Condition

AirWatch reports PM10 < threshold.
{% endstep %}

{% step %}

### Detection

System detects condition.
{% endstep %}

{% step %}

### Command

Stop command sent to targets.
{% endstep %}

{% step %}

### Action

Target devices stop filtering.
{% endstep %}
{% endstepper %}

### Paired Rules

Automation creates paired rules internally:

* One rule for starting (PM10 > threshold)
* One rule for stopping (PM10 < threshold)

These paired rules are managed together as a single rule in the UI.

## Live Status

Rule cards show real-time:

* Current PM10 from trigger
* Whether threshold is exceeded
* Target device status

## Best Practices

### Threshold Selection

* Consider normal background levels
* Allow for fluctuations
* Test before deploying

### Target Selection

* Start with devices nearest sensor
* Consider air flow patterns
* Multiple targets for large areas

### Monitoring

* Review rule effectiveness
* Adjust thresholds as needed
* Check historical data

## Empty State

If no rules exist:

* Message indicating no automation
* "Create Rule" button

## Permissions

Creating/editing rules requires:

* Member or Admin role
* Access to trigger and target devices
* Active licenses on devices

## Related Documentation

* [Schedulers](broken://pages/6a965e1dbdaf8fbac4d277148e35412c62efbcad) - Time-based control
* [Notifications](broken://pages/051e9b028bbd84763eebe2cf8123e6858cc5331c) - Email alerts
* [AirWatch](file:///6726661/asset-types/airwatch/overview.md) - Trigger devices
* [AirDome](file:///6726661/asset-types/airdome/overview.md) - Target devices


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kemperconnect.de/automation/rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
