# Automatic detection

ENLYZE detects downtimes automatically based on a lead variable and a threshold. The configuration is done as part of the [OEE setup](https://docs.enlyze.com/en/production-optimization/oee).

{% hint style="info" %}
What downtimes are, how detection works conceptually, and which lead variables are typical, is explained under [Downtimes (Concepts)](https://docs.enlyze.com/en/concepts/downtimes).
{% endhint %}

## Prerequisites

Before downtime detection works, the following must be set up:

* A **lead variable** with **active** status (e.g. speed, throughput, cycle rate)
* A configured **threshold** and a **minimum downtime duration**

The configuration of these parameters is described under [Setting up OEE tracking](https://docs.enlyze.com/en/production-optimization/oee).

## No data

There are two causes for periods without data:

* The machine was turned off and is not sending data.
* There is a **connection problem**.

### Common causes of connection problems

Connection problems mean that data is expected but not arriving. The most common causes:

* The connection between the Edge Device and the data source (PLC, sensor) was interrupted (e.g. a cable was disconnected)
* The Edge Device lost power
* Firewall settings were changed from the [original configuration](https://docs.enlyze.com/en/connect/security)

{% hint style="warning" %}
If the connection to the data source or the power supply was interrupted, any unrecorded data is lost. If the Edge Device still has a connection to the data source, it can buffer up to one month of data locally. Once the connection to the cloud is restored, all buffered data is delivered.
{% endhint %}

## Related topics

* [Setting up OEE tracking](https://docs.enlyze.com/en/production-optimization/oee): Configure downtime detection.
* [Defining downtime reasons](https://docs.enlyze.com/en/production-optimization/downtimes/defining-reasons): Set up the reasons catalogue.
* [Downtime contextualisation](https://docs.enlyze.com/en/production-optimization/downtimes/contextualisation): Assign reasons.
* [Common issues](https://docs.enlyze.com/en/help/common-issues): Further help with connection problems.
