Hardware Matrix

Is RC522 13.56MHz RFID NFC Reader Compatible with Home Assistant (ESPHome)?

Verdict Badge
VERDICT: [ COMPATIBLE (MANUAL CONFIG REQUIRED) ]
Protocol: SPI Bus / 3.3V
Bridge Needed: NO

Electrical Specifications

Always confirm pin assignments against the manufacturer datasheet before wiring.

Not yet documented. Electrical specifications for this device have not been confirmed against a manufacturer datasheet, so none are shown here rather than showing estimates. Submit verified specifications if you have the datasheet to hand.

Compatibility Overview

RFID and NFC card access control scanner for smart door locks workshop tool authorization or personal keycard arming/disarming.

Wiring RC522 13.56MHz RFID NFC Reader to ESP32

Module pin ESP32 Note
3.3V 3V3 Not 5V. The MFRC522 has no regulator on this module and 5V destroys it.
GND GND
SDA (SS) GPIO5 Chip select, despite the silkscreen. cs_pin in the config.
SCK GPIO18
MOSI GPIO23
MISO GPIO19
RST unconnected Optional. reset_pin: lets ESPHome hard-reset a reader that has wedged; worth wiring on a clone.
IRQ unconnected

Host pins are the ones the configuration on this page uses. Move a pin here and change it in the YAML — they are documented together so they cannot disagree.

Technical Specification Matrix

Feature / Attribute Specification / Status
Hardware Protocol SPI Bus / 3.3V
Bridge Required NO
Border Router Needed None
Hardware Capabilities & Peripherals
Tag ID (HEX) NFC Card Scanner State Authorization Binary

Note: these entities come from the ESPHome configuration you flash — each one needs its matching component in that YAML before it appears.

Pairing Complexity Intermediate
Factory Reset Instruction Hold BOOT button for 3s.

Wire, Flash, Adopt, Check

1

Wire it up

Follow the wiring table above. The ESP32 pins there are the ones the configuration uses, so if you move one, change it in both places.

2

Flash the configuration

Create a new device in the ESPHome dashboard (the Home Assistant add-on) and paste the configuration below into it, or save it as emb_esp32_rc522_esphome.yaml and run esphome run emb_esp32_rc522_esphome.yaml. The first flash goes over USB. If it is not detected, hold BOOT button for 3s to put it in download mode. Every update after that is over the air.

3

Adopt it in Home Assistant

Settings → Devices & Services. A node on the same network shows up as a discovered ESPHome device within a minute of joining Wi-Fi; choose Configure and enter the API encryption key from your secrets.yaml. If discovery does not find it, add the ESPHome integration by hand with the node's IP address.

4

Check it works

The setup log reports the reader's firmware version, and a card on the antenna produces a tag_scanned event in Home Assistant's Tags page. A firmware version of 0x00 or 0xFF is SPI wiring, not the reader.

ESPHome Configuration

Starting configuration for RC522 13.56MHz RFID NFC Reader on ESP32. Untested on hardware — verify wiring and pins against your own board.

# ESPHome configuration for RC522 13.56MHz RFID NFC Reader
# Host: ESP32. Pin numbers below are host-side defaults — any free
# GPIO will do, and you should change them to match your own wiring.

esphome:
  name: emb_esp32_rc522_esphome
  friendly_name: "RC522 13.56MHz RFID NFC Reader"

esp32:
  board: esp32dev
  framework:
    type: esp-idf

logger:

api:
  encryption:
    key: !secret api_encryption_key

ota:
  - platform: esphome
    password: !secret ota_password

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

spi:
  clk_pin: GPIO18
  mosi_pin: GPIO23
  miso_pin: GPIO19

rc522_spi:
  cs_pin: GPIO5
  update_interval: 1s
  on_tag:
    then:
      - homeassistant.tag_scanned: !lambda 'return x;'

Before you flash: the !secret values come from your secrets.yaml, and the GPIO numbers are host-side defaults rather than properties of this part — change them to match how you actually wired it.

What Appears in Home Assistant

Tag scanned
event

Each read fires tag_scanned in Home Assistant with the UID, the same as the PN532: tags appear under Settings → Tags and trigger automations.

Per-card presence
binary_sensor

Optional: binary_sensor: platform: rc522 with a uid: is on while that card is on the reader.

Known Problems and Fixes

SDA is not I2C here

The pin labelled SDA is the SPI chip select. Wiring it to the ESP32's I2C pins and adding an i2c: block is the most common way this reader ends up "not found". (There are boards rewired for I2C, and an rc522_i2c platform for them — but the stock blue module is SPI.)

Clones

Many of the cheap boards carry a clone of the MFRC522. The setup log prints the firmware version it reads back: 0x91 and 0x92 are the NXP silicon; other values are clones, some of which read fine and some of which miss cards or lock up. A reset_pin gives the component a way to recover the latter.

Short range, short wires

Two to three centimetres for a card, less for a keyfob. SPI does not like long cables either: keep the reader within about 20cm of the ESP32, and mount the antenna away from metal.

Not for phones, not for 125kHz

It reads MIFARE Classic and Ultralight UIDs and NTAG UIDs. Phones present randomised UIDs, so they cannot be enrolled reliably; 125kHz EM4100 fobs are a different frequency entirely.

🛠️ Hardware Correction & Field Contributions

Report a Pinout Error or Submit Tested Code Snippets

Found a pin mapping quirk or built a custom ESPHome YAML driver for RC522 13.56MHz RFID NFC Reader? Submit a pull request or report corrections to our index.

Frequently Asked Questions

Does RC522 13.56MHz RFID NFC Reader work without an internet connection?
100% local SPI RFID scanning.
How is RC522 13.56MHz RFID NFC Reader powered and wired to the host board?
3.3V VCC (DO NOT APPLY 5V) SPI (SDA=GPIO5 SCK=GPIO18 MOSI=GPIO23 MISO=GPIO19 RST=GPIO22).
How does the host board reach Home Assistant (ESPHome)?
Wi-Fi 2.4GHz.

Alternatives

Related Compatibility Matrix Guides