Start a conversation

How to control remotely an electric lock with Ajax Relay


⚠️ Relay installation is done by a qualified electrician only! Regardless of the type of electrical circuit in which the device is placed.


Relay can be used to block access to the room by automatically locking the electric lock when the security system is armed. The latter can also be done in manual mode by controlling the power supply to the electric lock.

👆🏻 The relays are used to open and close electrical circuits and can be used to control the power supply to electrical appliances. Ajax Relay is a low-current remote control relay with a potential-free “dry contact”. It is controlled remotely via the Ajax application. It can react to the “night mode” as well as to arming and disarming of the security system.

How to choose electric lock

We will consider connecting the most popular types of electric locks in the article: electromechanical and electromagnetic. 

Electromechanical locks include pulse and bistable ones, electromagnetic — only bistable.

  • Pulse locks — open and close when a pulse is applied.

  • Bistable locks — open and close in the presence or absence of direct current.

Electromechanical locks



This type of lock is equipped with a small DC electric motor that controls the bolt when an electrical signal is applied.

With respect to fail-safety, the locks are divided into two types:

  • Normally closed: unlocking occurs when an electrical signal is applied. Such locks are forbidden to use along escape routes!
  • Normally open: the lock opens when there is no voltage. Such locks are used to build emergency exits and other passages where unimpeded opening of the door is necessary when the power is turned off.

Electromagnetic locks



They consist of a unit with an electromagnet and a strike plate made of metal. The principle of the lock’s operation is based on magnetic attraction. The unit with an electromagnet is mounted on the door frame, and the strike plate is mounted on the door. When power is applied, the lock attracts and holds the strike plate locking the door. In the absence of the power supply, the electromagnetic lock opens.

Backup power

It is recommended to supply any electric lock with backup power:

  • In the case of a normally closed lock, it will allow you to open the door when there is a loss of electricity in order to enter the room or leave it urgently.
  • Electromagnetic and normally open electromechanical lock without backup power does not prevent access to the room.
⚠️ Take care in advance of the feasibility of opening the door in the case of emergency! For example, by connecting a button to enable emergency opening of the lock.

Schematic diagram of connecting the Relay to a 12/24-volt electric lock


👆🏻 In order to connect according to the schematic diagram, you must have an external 12/24 V power source!
  1. Connect the power supply to the power terminals of the relay.
  2. Connect the power supply “+” to one of the relay contact terminals, and “+” of the electric lock to the other contact terminal of the relay.
  3. Connect “–” of the electric lock to the “–” of the power source.

This connection scheme enables the Relay to control the power supply to the electric lock.

Electromagnetic and bistable electromechanical lock control

Relay Setup

  1. Go to the Devices tab. 
  2. Enter the Relay menu, go to Settings (⚙️), and select Bistable operation mode, and also set Initial state of contact terminals: Normally closed.

Manual control of the electric lock

Click the switch in the Relay line — the state of the relay contact terminals will become the opposite.

When the relay contact terminals are closed, the electric lock is supplied with power remaining in the closed state. Upon opening, the lock is left without power supply and it is opened.

Automatic control of the electric lock (when the state of the security system changes)

In the relay settings, select react to disarming / arming as in the screenshot:

When the security system is armed, the relay closes and power is supplied to the lock. The door is locked until the system is disarmed or until the lock is manually opened.

In order to open/close the lock when the night mode is used, enable React to night mode option.

Pulse lock control

Relay setup

  1. Go to the Devices tab.
  2. Enter the Relay menu, go to Settings (⚙️) and select Pulse mode, Conact State, and also set the Pulse duration in the range of 0.5~15 seconds (the value and normal state will be indicated in the electric lock documentation).

Manual control of the electric lock

Click on the pulse icon in the Relay line to trigger a pulse and change the lock status.

Automatic control of the electric lock (when the state of the security system changes)

In the Relay settings, set react to arming/disarming as in the screenshot:

Upon arming and disarming, an impulse is applied to the lock, which will close and open the lock.

In order to open/close the lock when the night mode is used, enable React to night mode option.

Choose files or drag and drop files