> 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/configuracoes-de-intertravamento/intertravamento-inteligente.md).

# Intertravamento Inteligente

{% hint style="warning" %}
Importante: As configurações devem ser feitas em cada dispositivo, observando a hierarquia de qual será o principal e qual será o secundário. Verifique sempre as configurações de rede do seu produto, como Endereço de IP e Gateway, para garantir que o mesmo esteja acessível na rede.
{% endhint %}

### Ativar sensor de porta:

Antes de iniciar qualquer configuração, deve-se garantir a ativação do sensor de porta, pois essa configuração não será possível a operação de Intertravamento.

#### Requisição - GET

`http://{{device_ip}}/cgi-bin/configManager.cgi?action=setConfig&AcessControl[0].SensorEnable=true`

| param             | type    | description                         |
| ----------------- | ------- | ----------------------------------- |
| `setConfig` \*    | String  | Comando para cadastrar configuração |
| `SensorEnable` \* | Boolean | Habilita/Desabilita a função        |

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

```sh
OK
```

### Habilitar módulo de segurança (XR 2201)

`http://{{device_ip}}/cgi-bin/configManager.cgi?action=setConfig&SerialMode[2].Mode=SecurityModule`

* Configurar Baud Rate para a porta RS-485: `http://{{device_ip}}/cgi-bin/configManager.cgi?action=setConfig&Comm[1].Attribute[0]=9600`

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

```sh
OK
```

### Habilitar Modo Intertravamento Inteligente

Faça a configuração em cada dispositivo, respeitando a posição de cada um no cenário.

#### Requisição - GET

`http://{{device_ip}}/cgi-bin/configManager.cgi?action=setConfig&InterLockCfg.DeviceIP=10.100.38.12&InterLockCfg.DoorPosition=0&InterLockCfg.LockType=2&InterLockCfg.Password=acesso1234&InterLockCfg.SecurityEnable=false&InterLockCfg.SecurityTimeOut=20&InterLockCfg.UserName=admin`

| param                | type    | description                                                                                                     |
| -------------------- | ------- | --------------------------------------------------------------------------------------------------------------- |
| `setConfig` \*       | String  | Comando para cadastrar configuração                                                                             |
| `DeviceIP` \*        | String  | IP do dispositivo que será conectado (outro dispositivo)                                                        |
| `DoorPosition` \*    | Number  | Definição da hierarquia da porta, sendo 0 para porta principal e 1 para porta secundária                        |
| `LockType` \*        | Number  | Modo de operação, padrão 0 para desabilitado, 1 para Intertravamento local e 2 para Intertravamento Inteligente |
| `Password` \*        | String  | Senha do dispositivo que será conectado                                                                         |
| `SecurityEnable` \*  | Boolean | Habilita/Desabilitar o modo de verificação de segurança.                                                        |
| `SecurityTimeOut` \* | Number  | Intervalo de operação para um evento de verificação de segurança, medido em Segundos. Recomenda-se o valor 20   |
| `UserName` \*        | String  | Usuário admin do dispositivo que será conectado                                                                 |

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

```sh
OK
```

#### Exemplos

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

```python
import requests
 
device_ip = '192.168.3.87'
username = 'admin'
password = 'acesso1234'
 
enable_dhcp = False
 
url = "http://{}/cgi-bin/configManager.cgi?action=setConfig&Network.eth0.DhcpEnable={}".format(
                            str(device_ip),
                            str(enable_dhcp).lower(), 
                        )
 
digest_auth = requests.auth.HTTPDigestAuth(username, password)
rval = requests.get(url, auth=digest_auth, stream=True, timeout=20, verify=False)
 
print(rval.text)
```

{% endtab %}
{% endtabs %}

### Definir Endereço de IP

#### Requisição - GET

`http://192.168.1.201/cgi-bin/configManager.cgi?action=setConfig&Network.eth0.IPAddress=192.168.5.115`

| param          | type   | description                             |
| -------------- | ------ | --------------------------------------- |
| `setConfig` \* | String | Comando para Definir configuração       |
| `IPAddress` \* | String | Endereço de IP Exemplo: `192.168.5.115` |

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

```sh
OK
```


---

# 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/configuracoes-de-intertravamento/intertravamento-inteligente.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.
