> For the complete documentation index, see [llms.txt](https://portal-integracao.intelbras.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://portal-integracao.intelbras.com.br/ct-5000-4pb/configuracao-de-alarmes/alarme-de-antipassback.md).

# Alarme De Antipassback

### Obter Configurações de Alarme de Antipassback

Por meio da chamada abaixo é possível obter as configurações de Alarme de Antipassback do dispositivo.

#### Requisição - GET

`http://192.168.1.201/cgi-bin/configManager.cgi?action=getConfig&name=AntiPassback`

| param             | type   | description                   |
| ----------------- | ------ | ----------------------------- |
| `getConfig` \*    | String | Comando de Obter configuração |
| `AntiPassback` \* | String | Nome da Configuração          |

#### Exemplo de Retorno - *text/plain*

```sh
table.AntiPassback.Enable=false
table.AntiPassback.EventHandler.AlarmOutChannels[0]=0
table.AntiPassback.EventHandler.AlarmOutEnable=false
table.AntiPassback.EventHandler.AlarmOutTime=60
table.AntiPassback.EventHandler.BeepEnable=false
table.AntiPassback.EventHandler.BeepTime=900
```

#### Exemplos

{% tabs %}
{% tab title="Python" %}

```python
import requests
 
device_ip = '192.168.1.201'
username = 'admin'
password = 'acesso1234'
 
url = "http://192.168.1.201/cgi-bin/configManager.cgi?action=getConfig&name=AntiPassback".format(
                            str(device_ip),
                        )
 
digest_auth = requests.auth.HTTPDigestAuth(username, password)
rval = requests.get(url, auth=requests.auth.HTTPDigestAuth(username, password), stream=True, timeout=60, verify=False)
 
print(rval.text)
```

{% endtab %}

{% tab title="Node" %}

```javascript
   const { AxiosDigestAuth } = require('@lukesthl/ts-axios-digest-auth');
 
    class DeviceConfigManager {
      constructor(ip, username, password) {
          this.ip = ip;
          this.digestAuthClient = new AxiosDigestAuth({
              username: username,
              password: password,
          });
      }
 
      async getConfig(url) {
          try {
              const fullUrl = `http://${this.ip}/${url}`;
              const result = await this.digestAuthClient.get(fullUrl, {
                  timeout: 2000,
              });
 
              if (result.status !== 200) {
                  throw new Error();
              }
 
              return result.data;
          } catch (error) {
              throw new Error("ERROR - During Get Config");
          }
      }
    }
 
    // Example usage:
    const deviceConfigManager = new DeviceConfigManager('192.168.1.201', 'admin', 'senha');
    const configUrl = 'cgi-bin/configManager.cgi?action=getConfig&name=AntiPassback';
 
    deviceConfigManager.getConfig(configUrl)
      .then(response => console.log('Config retrieved successfully:', response))
      .catch(error => console.error('Error getting config:', error));
```

{% endtab %}
{% endtabs %}

### Definir Configurações de Alarme de Antipassback

Por meio da chamada abaixo é possível definir as configurações de Alarme de Antipassback do dispositivo.

#### Requisição - GET

`http://192.168.1.201/cgi-bin/configManager.cgi?action=setConfig&AntiPassback.Enable=true&AntiPassback.EventHandler.BeepEnable=true&AntiPassback.EventHandler.BeepTime=900&AntiPassback.EventHandler.AlarmOutTime=60&AntiPassback.EventHandler.AlarmOutEnable=false`

| param               | type    | description                                           |
| ------------------- | ------- | ----------------------------------------------------- |
| `setConfig` \*      | String  | Comando de Obter configuração                         |
| `Enable` \*         | Boolean | Habilita/Desabilita Alarme                            |
| `BeepEnable` \*     | Boolean | Habilita/Desabilita Alarme Sonoro para Antipassback   |
| `BeepTime` \*       | Boolean | Define o tempo de Alarme Sonoro                       |
| `AlarmOutEnable` \* | String  | Habilita/Desabilita saida de alarme para Antipassback |
| `AlarmOutTime` \*   | String  | Define o tempo de Saida de Alarme                     |

#### Exemplo de Retorno - *text/plain*

```sh
OK
```

#### Exemplos

{% tabs %}
{% tab title="Python" %}

```python
import requests
 
device_ip = '192.168.1.201'
username = 'admin'
password = 'acesso1234'
 
url = "http://192.168.1.201/cgi-bin/configManager.cgi?action=setConfig&AntiPassback.Enable=true&AntiPassback.EventHandler.BeepEnable=true&AntiPassback.EventHandler.BeepTime=900&AntiPassback.EventHandler.AlarmOutTime=60&AntiPassback.EventHandler.AlarmOutEnable=false".format(
                            str(device_ip),
                        )
 
digest_auth = requests.auth.HTTPDigestAuth(username, password)
rval = requests.get(url, auth=requests.auth.HTTPDigestAuth(username, password), stream=True, timeout=60, verify=False)
 
print(rval.text)
```

{% endtab %}

{% tab title="Node" %}

```javascript
const { AxiosDigestAuth } = require('@lukesthl/ts-axios-digest-auth');
 
class DeviceConfigManager {
    constructor(ip, username, password) {
        this.ip = ip;
        this.digestAuthClient = new AxiosDigestAuth({
            username: username,
            password: password,
        });
    }
 
    async setConfig(url) {
        try {
            const fullUrl = `http://${this.ip}/${url}`;
            const result = await this.digestAuthClient.get(fullUrl, {
                timeout: 2000,
            });
 
            if (result.status !== 200) {
                throw new Error();
            }
 
            return result.data;
        } catch (error) {
            throw new Error("ERROR - During Set Config");
        }
    }
}
 
// Example usage:
const deviceConfigManager = new DeviceConfigManager('192.168.1.201', 'admin', 'senha');
const configUrl = 'cgi-bin/configManager.cgi?action=setConfig&AntiPassback.Enable=true&AntiPassback.EventHandler.BeepEnable=true&AntiPassback.EventHandler.BeepTime=900&AntiPassback.EventHandler.AlarmOutTime=60&AntiPassback.EventHandler.AlarmOutEnable=false';
 
deviceConfigManager.setConfig(configUrl)
    .then(response => console.log('Config set successfully:', response))
    .catch(error => console.error('Error setting config:', error));
```

{% endtab %}
{% endtabs %}

### Definir Eventos de Alarme de Antipassback

Por meio da chamada abaixo é possível definir os eventos de Alarme de Antipassback do dispositivo.

#### Requisição - GET

`http://192.168.1.201/cgi-bin/configManager.cgi?action=setConfig&AccessControl[0].RepeatEnterAlarm=true`

| param                 | type    | description                                  |
| --------------------- | ------- | -------------------------------------------- |
| `setConfig` \*        | String  | Comando de configuração                      |
| `RepeatEnterAlarm` \* | boolean | Habilitar/Desabilitar Alarme de Antipassback |

#### Exemplo de Retorno - *text/plain*

```sh
OK
```

#### Exemplos

{% tabs %}
{% tab title="Python" %}

```python
import requests
 
device_ip = '192.168.1.201'
username = 'admin'
password = 'acesso1234'
 
url = "http://192.168.1.201/cgi-bin/configManager.cgi?action=setConfig&AccessControl[0].RepeatEnterAlarm=true".format(
                            str(device_ip),
                        )
 
digest_auth = requests.auth.HTTPDigestAuth(username, password)
rval = requests.get(url, auth=requests.auth.HTTPDigestAuth(username, password), stream=True, timeout=60, verify=False)
 
print(rval.text)
```

{% endtab %}

{% tab title="Node" %}

```javascript
  const { AxiosDigestAuth } = require('@lukesthl/ts-axios-digest-auth');
 
  class DeviceConfigManager {
      constructor(ip, username, password) {
          this.ip = ip;
          this.digestAuthClient = new AxiosDigestAuth({
              username: username,
              password: password,
          });
      }
 
      async setConfig(url) {
          try {
              const fullUrl = `http://${this.ip}/${url}`;
              const result = await this.digestAuthClient.get(fullUrl, {
                  timeout: 2000,
              });
 
              if (result.status !== 200) {
                  throw new Error();
              }
 
              return result.data;
          } catch (error) {
              throw new Error("ERROR - During Set Config");
          }
      }
  }
 
  // Example usage:
  const deviceConfigManager = new DeviceConfigManager('192.168.1.201', 'admin', 'senha');
  const configUrl = 'cgi-bin/configManager.cgi?action=setConfig&AccessControl[0].RepeatEnterAlarm=true';
 
  deviceConfigManager.setConfig(configUrl)
      .then(response => console.log('Config set successfully:', response))
      .catch(error => console.error('Error setting config:', error));
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://portal-integracao.intelbras.com.br/ct-5000-4pb/configuracao-de-alarmes/alarme-de-antipassback.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
