Access control with Shelly
Upgrade your door lock to a smart solution. Use a Shelly relay with a keypad, fingerprint scanner, or RFID reader to enable remote control, schedules, and notifications — without replacing the lock itself.
Last updated: April 2026
Quick start — find your scenario
Use Shelly 1 Gen4 with a 12 V/24 V lock and Auto-Off Timer (3 seconds)
No keypad required — trigger from the app
Read more →Wire the keypad/scanner output to Shelly’s SW input
Works with any 12 V/24 V third-party device
Read more →Use Shelly’s built-in scheduling
Open only during business hours, ignore codes outside
Read more →Lock types — what you need to know
Most 12 V or 24 V electronic locks work with Shelly. The three most common types are:
Magnetic lock (maglock)
- Powered ON to stay locked
- Releases when power is cut
- Door opens if power fails
- Holding force typically 150–500 kg
Common for: emergency exits, glass doors
Electric strike (latch release)
- Powered briefly to release the latch
- Lock stays mechanically engaged otherwise
- Door stays locked if power fails
- Available in AC or DC variants
Common for: office doors, residential gates
Electromechanical lock
- Motor-driven lock with multiple states
- Can be fail-safe or fail-secure (configurable)
- Often includes status feedback
- Higher current draw during cycle
Common for: high-security or commercial installations
Choose fail-safe for emergency exits and locations where being locked in is a safety risk. Choose fail-secure where preventing unauthorized entry during a power failure is the priority. Always check your local building regulations and the lock manufacturer’s documentation.
Compatibility table
A complete access-control setup with Shelly typically uses these components:
| Component | Recommended | Power | Notes |
|---|---|---|---|
| Relay | Shelly 1 Gen4 | 12 V DC, 24–48 V DC, or 110–240 V AC | Universal supply matches most lock systems; potential-free output. |
| Lock | 12 V or 24 V electronic lock (any type) | Powered separately | Magnetic, electric strike, or electromechanical. |
| Keypad / scanner | Third-party 12 V/24 V device | Powered separately | Output wires to Shelly’s SW input. |
| Door sensor (optional) | Reed switch + Shelly Plus Add-On | Powered by Shelly 1 Gen4 | Detects door open/closed for status and alerts. |
Installation
Six steps from planning to verification. Read the safety notice above before starting.
Plan your installation
When to use this approach: any 12 V or 24 V electronic lock controlled by a momentary signal. The Shelly 1 Gen4’s universal supply (12 V DC, 24–48 V DC, or 110–240 V AC) makes it compatible with virtually any lock system.
Confirm before starting:
- The lock’s voltage and power requirements
- Whether the lock is fail-safe or fail-secure (affects wiring logic)
- Whether you’ll add a keypad/fingerprint scanner now or later
- That a mechanical backup (key cylinder) is in place
Wire the relay
Wire the Shelly 1 Gen4 according to the diagram below.
The relay’s potential-free output (terminals O and I) controls power to the lock. The keypad or fingerprint scanner’s relay output connects to the SW input — when the scanner’s output activates, it triggers the Shelly relay just like a manual switch press.
Set the Auto-Off Timer (critical)
The Auto-Off Timer ensures the lock automatically re-locks after a set time. Without this, the door would remain unlocked indefinitely after each access.
Configure as follows:
- Open your Shelly 1 Gen4 in the Shelly Smart Control app
- Go to Timer settings
- Enable Auto-Off
- Set duration to 3 seconds (recommended) — adjust based on how long a user needs to open the door
Connect the keypad or fingerprint scanner
Most third-party keypads and fingerprint scanners include a relay output designed to control a lock directly. Instead of wiring this output to the lock, wire it to the Shelly 1 Gen4’s SW input.
The scanner’s output acts as a momentary switch — when a valid code or fingerprint is recognized, the output activates briefly. The Shelly relay detects this and turns on for the configured Auto-Off duration.
For installations without a keypad: skip this step. The relay can be triggered remotely from the Shelly Smart Control app.
Configure schedules and notifications (optional)
Once the basic installation works, you can add smart features in the Shelly Smart Control app:
Scheduling — open only during business hours
Disable the relay outside business hours so codes and fingerprints are ignored. Useful for offices, shops, or holiday rentals.
- Open Shelly 1 Gen4 in the app
- Go to Schedules
- Create a schedule that disables the device outside chosen hours
Notifications — alert when the door opens
Get a push notification every time the door is unlocked, or only outside working hours.
- Open Shelly 1 Gen4 in the app
- Go to Actions or Notifications
- Configure a trigger on the relay’s “ON” state
For more advanced status (door physically open vs. closed), add a Shelly Plus Add-On with a reed switch on the door frame.
Test and verify
Test the complete chain:
- From the keypad/scanner: enter a valid code → lock should release for 3 seconds, then re-lock
- From the app: tap the relay → same behaviour
- From a schedule (if configured): codes outside the active window should be ignored
- Mechanical backup: confirm the key cylinder still works as expected
Tips & best practices
- Always install a mechanical key backup. Never rely solely on electronic access — smart locks must not be the only way in or out.
- If the lock doesn’t release: verify the Auto-Off Timer is enabled and that the lock voltage matches the supply.
- If the lock buzzes or hums: check whether your lock is AC or DC. Some 12 V locks require AC for proper operation.
- If the keypad won’t trigger Shelly: the scanner may use a dry contact (open/close) instead of a voltage signal — check the scanner’s documentation and configure the SW input accordingly.
- For fail-safe locks: a power failure releases the lock. Plan a UPS backup if continuous lock state is critical.
- For fail-secure locks: a power failure leaves the door locked. Always pair with a mechanical override on the inside.
- Add a door reed switch. Pair a Shelly Plus Add-On with a reed contact to track real door state — useful for detecting forced entry or doors left ajar.