How Does an ESPHome W5500 PoE Door Lock Use TOTP and MQTT Face Recognition?
This ESPHome door lock combines W5500 Ethernet with a separate PoE adapter, rotating TOTP codes, MQTT face events, and UDP door-state checks.
0
Components
Hardware components
WIZnet - W5500
SPI Ethernet controller configured in ESPHome for the ESP32-S3 door-lock controller. PoE power conversion is provided separately.
Project description
๐ Overview
NonaSuomy's ESPHome PoE Door Lock is a 2025 project that converts a keypad deadbolt into a wired smart lock. It combines an ESP32-S3 controller, a WIZnet W5500 Ethernet module, a separate PoE power adapter, a 3x4 keypad, motor-position switches, and Home Assistant integration. The project was first published on GitHub in March 2025, introduced to the Home Assistant Community in May, and received functional source updates through September 2025.
Its most distinctive feature is the way several access methods meet at one controller. A visitor can enter a fixed PIN or a time-based one-time password on the keypad. A separate face-recognition system can send a match event through MQTT. Home Assistant provides another control path, while an independent door contact confirms that the door is closed before the regular locking action proceeds.
![]()
The modified keypad deadbolt shown in NonaSuomy's original Home Assistant Community post.
Project in one sentence: External ML recognizes a face, W5500 Ethernet delivers the MQTT event, and ESPHome requires local keypad confirmation. A separate UDP door-state path guards locking.
What ESPHome, PoE, TOTP, and MQTT Mean Here
Four technologies form the foundation of this project:
- ESPHome is a YAML-based firmware environment for devices such as the ESP32. It makes the lock's keypad, motor, switches, network services, and Home Assistant entities easier to describe and maintain.
- PoE, or Power over Ethernet, carries network data and electrical power through the Ethernet cable. In this prototype, the W5500 handles Ethernet communication and a separate modified PoE adapter converts the incoming power for the lock electronics.
- TOTP, or Time-based One-Time Password, is the rotating six-digit code commonly shown by authenticator apps. The app and the lock store the same shared secret value and use it with the current time to calculate a new code every 30 seconds.
- MQTT is a lightweight publish-and-subscribe messaging protocol. The vision system publishes a recognition result to a topic, and the ESPHome lock subscribes to that topic.
Face recognition is the project's machine-learning, or ML, function. The camera and an external recognition service analyze the image. The lock receives a compact result containing fields such as the matched name and a confidence score calculated by the recognition system, so image inference and physical motor control can remain on separate devices.
![]()
Generated illustration: alternative keypad and face-event paths, plus the door-state input used by the wired controller.
Inside the ESP32-S3 Door Lock
The published YAML targets an ESP32-S3 DevKitC-1 running ESP-IDF 5.4.2. A small W5500 module connects over SPI with clock on GPIO42, MOSI on GPIO44, MISO on GPIO40, chip select on GPIO39, interrupt on GPIO41, and reset on GPIO43. The Wi-Fi block is commented out, making wired Ethernet the active network path in the shared configuration.
Through that link, ESPHome can reach Home Assistant, subscribe to MQTT events, synchronize time for TOTP, receive OTA updates, and listen for the door-contact message sent over UDP. The ESP32-S3 then connects the network side to the physical side: keypad input, indicator LEDs, a buzzer, a motor driver, and two limit switches that report the locked and unlocked positions.
![]()
Generated technical diagram: network services and user inputs converge at the ESP32-S3 lock controller, while the PoE power stage remains separate.
TOTP Keypad Access
TOTP adds a rotating keypad credential alongside the project's stored 4 to 8 digit code. An authenticator app and the door lock are provisioned with the same shared secret. After the lock receives accurate time through the Simple Network Time Protocol, or SNTP, both sides independently calculate the same six-digit code for the current 30-second period.
The user types that six-digit value and presses E. ESPHome first checks the stored fixed code and then the current TOTP value. A valid entry starts the unlock script, and the configuration schedules an automatic lock request 30 seconds later. This design allows a temporary code to work locally at the keypad without sending the code from a cloud service for every entry.
Time synchronization is therefore part of the access path, not just a clock feature. The repository links to NonaSuomy's custom ESPHome TOTP component, and the Documents panel also includes RFC 6238 for builders who want to validate code generation against standard test vectors.
MQTT Face-Recognition Event Flow
The second distinctive access path begins outside the door lock. A camera and an external face-recognition service perform the ML inference. The project documentation names Frigate, CompreFace, and Double Take, while the active YAML subscribes to the Double Take-style topic double-take/cameras/hqbackyardcam.
When a message arrives, ESPHome reads the first result, requires its match field to be true, and checks the configured confidence threshold of greater than 95. A qualifying event turns on the green indication and opens a local action window for up to 30 seconds. The person at the door then presses E on the keypad. Depending on the current limit-switch state, that confirmation requests either unlock or lock.
![]()
Generated technical diagram: external recognition publishes an MQTT event, ESPHome evaluates it, and the visitor confirms the action at the keypad.
The vision host handles image processing and model inference, MQTT carries the result, and the ESP32-S3 handles the short confirmation window and motor action. The Ethernet door lock only needs the event data, not the camera's full video stream.
Door State, Motor Feedback, and Auto-Lock
Access credentials answer who or what requested an action. The door contact and limit switches answer whether the physical mechanism is ready to complete it.
A separate ESPHome alarm-panel project sends the door state to UDP port 18511. For the normal lock script to proceed, that status must be less than 20 seconds old and report that the door is closed. The two local limit switches identify the locked and unlocked motor positions, and the regular lock and unlock scripts stop after reaching a limit or after a five-second timeout.
After a successful keypad unlock, the YAML schedules a lock request 30 seconds later. Together, the door-contact check, motor-position feedback, and timeout make the automation aware of more than a network command alone.
โ๏ธ W5500 Ethernet and the PoE Power Stage
The W5500 provides the wired IP connection between the ESP32-S3 and the surrounding services. In this project, that path carries Home Assistant API traffic, MQTT face events, SNTP time, OTA communication, and UDP door-state messages. These services explain why Ethernet is central to the design: authentication time, remote events, supervisory control, and physical-state updates all meet at the same ESPHome controller.
![]()
The original project photo shows the modified PoE adapter mounted separately beside the lock prototype.
PoE supplies the power path through the cable, but the conversion stage is separate from the W5500 module. NonaSuomy describes the side-mounted adapter as a prototype arrangement and lists a more integrated PoE design among future improvements. That distinction is useful for anyone planning a smaller enclosure or calculating the power budget for the motor and controller.
Access Paths at a Glance
The shared configuration brings several requests into the same lock logic:
- A stored 4 to 8 digit PIN can unlock the door from the keypad.
- A rotating six-digit TOTP can unlock the door from the keypad.
- A qualifying MQTT face event opens a 30-second local
E-key confirmation window. - Home Assistant exposes the lock for dashboard and automation control.
- The UDP door-contact message guards the normal locking action by confirming a recent closed-door state.
These are alternative control and state paths rather than one fixed sequence that every user must complete. That flexibility is one reason the source is valuable as an ESPHome access-control reference.
Public Source and Before Installation
The repository is detailed enough to study the W5500 pin mapping, MQTT topic and JSON handling, TOTP check, UDP listener, motor scripts, limit switches, indicators, and Home Assistant entities. It is a public prototype rather than a complete installation package: the referenced local components/ directory and aes.hpp file are absent, and the exact deadbolt, PoE adapter, schematic, bill of materials, and enclosure design are not specified.
Before adapting it to a real entrance, builders should validate TOTP provisioning with known test vectors, use broker ACLs and encrypted transport such as TLS where supported, protect local network and UDP traffic, and test every motor timeout. Physical checks are equally important: preserve mechanical key access and manual interior egress, define behavior during a power failure, confirm electrical protection and motor current, and follow applicable lock and building requirements.
Best use of the source: Reproduce the network and control flow on a bench first, then complete the missing mechanical, electrical, security, and fail-safe design for the specific door.
Related WIZnet Maker Reading Path
The PoE ESPHome access panel with 3D face recognition and fingerprint is a useful next comparison because it places a dedicated 3D face sensor at the panel. The present door-lock project instead receives a recognition event produced by an external vision system.
For a broader wired access controller, the IntelliDrive ESP32-W5500 gate controller suite combines MQTT, BLE, OTA, and fingerprint functions around an ESP32 and W5500.
The W55RP20 Smart Doorbell Demo shows another ML boundary: pet classification runs on the device before an Ethernet alert is sent, while this lock receives a face-recognition result from elsewhere on the network.
Source-Backed Summary
NonaSuomy's project shows how an existing keypad deadbolt can become a wired ESPHome access controller with rotating TOTP codes, external ML events over MQTT, and physical door-state checks. The ESP32-S3 manages user input and the motor, the W5500 connects the network services, and the separate PoE stage supplies power through the Ethernet cable.
The project was published in 2025 and its source evolved through September of that year. Although additional files and installation engineering are needed for a reproducible door deployment, the public YAML provides a substantial reference for connecting Home Assistant, TOTP, MQTT-based face recognition, UDP state reporting, and wired Ethernet in one access-control prototype.
โ FAQ
Q1. What does ESPHome do in this door lock?
ESPHome defines the ESP32-S3 firmware in YAML, including W5500 Ethernet, keypad input, indicators, MQTT and UDP messages, Home Assistant entities, and motor-control scripts.
Q2. How is TOTP different from a fixed keypad PIN?
A fixed PIN remains the same until it is changed. TOTP uses a shared secret and current time to generate a new six-digit value every 30 seconds.
Q3. Where does face-recognition ML run, and what does MQTT carry?
ML inference runs on an external camera or recognition host. MQTT carries the resulting event data, including the match and confidence information used by the ESPHome automation.
Q4. What are the separate roles of W5500 and PoE?
W5500 provides SPI-based wired Ethernet for the ESP32-S3. The separate PoE adapter receives power from the Ethernet cable and converts it for the lock electronics.
Q5. What should be checked before reproducing the project?
Builders need to supply the missing custom-component and AES files, verify TOTP provisioning, select and document the lock and PoE hardware, secure the local network services, and test mechanical egress, key override, power-loss behavior, and motor fail-safes.
ํ๊ตญ์ด (Korean)
๐ ๊ฐ์
NonaSuomy์ ESPHome PoE Door Lock์ ๊ธฐ์กด ์ซ์ ํคํจ๋ ๋ฐ๋๋ณผํธ๋ฅผ ์ ์ ์ค๋งํธ ๋์ด๋ฝ์ผ๋ก ๊ฐ์กฐํ 2025๋ ํ๋ก์ ํธ์ ๋๋ค. ESP32-S3 ์ปจํธ๋กค๋ฌ, WIZnet W5500 Ethernet ๋ชจ๋, ๋ณ๋์ PoE ์ ์ ์ด๋ํฐ, 3x4 ํคํจ๋, ๋ชจํฐ ์์น ์ค์์น, Home Assistant ์ฐ๋์ ํ๋์ ์์คํ ์ผ๋ก ๊ตฌ์ฑํ์ต๋๋ค. GitHub์๋ 2025๋ 3์ ์ฒ์ ๊ณต๊ฐ๋๊ณ , 5์์ Home Assistant Community์ ์๊ฐ๋์ผ๋ฉฐ, ์ค์ ๊ธฐ๋ฅ ๋ณ๊ฒฝ์ 2025๋ 9์๊น์ง ์ด์ด์ก์ต๋๋ค.
์ด ํ๋ก์ ํธ์ ํน์ง์ ์ฌ๋ฌ ์ถ์ ๋ฐฉ๋ฒ์ด ํ๋์ ์ปจํธ๋กค๋ฌ์์ ๋ง๋๋ค๋ ์ ์ ๋๋ค. ๋ฐฉ๋ฌธ์๋ ๊ณ ์ PIN ๋๋ ์๊ฐ ๊ธฐ๋ฐ ์ผํ์ฉ ๋น๋ฐ๋ฒํธ๋ฅผ ํคํจ๋์ ์ ๋ ฅํ ์ ์์ต๋๋ค. ๋ณ๋์ ์ผ๊ตด ์ธ์ ์์คํ ์ MQTT๋ก ๋งค์นญ ์ด๋ฒคํธ๋ฅผ ๋ณด๋ผ ์ ์์ต๋๋ค. Home Assistant๋ ๋ณ๋์ ์ ์ด ๊ฒฝ๋ก๋ฅผ ์ ๊ณตํ๊ณ , ๋ ๋ฆฝ์ ์ธ ๋ฌธ ์ ์ ์ ๋ฌธ์ด ๋ซํ ๊ฒ์ ํ์ธํ ๋ค ์ผ๋ฐ ์ ๊ธ ๋์์ ์งํํ๋๋ก ๋์ต๋๋ค.
![]()
NonaSuomy๊ฐ Home Assistant Community ์๋ฌธ์ ๊ณต๊ฐํ ๊ฐ์กฐํ ํคํจ๋ ๋ฐ๋๋ณผํธ.
ํ ๋ฌธ์ฅ์ผ๋ก ๋ณด๋ ํ๋ก์ ํธ: ์ธ๋ถ ML์ด ์ผ๊ตด์ ์ธ์ํ๊ณ W5500 Ethernet์ด MQTT ์ด๋ฒคํธ๋ฅผ ์ ๋ฌํ๋ฉด ESPHome์ด ํ์ง ํคํจ๋ ํ์ธ์ ๋ฐ์ต๋๋ค. ๋ณ๋์ UDP ๋ฌธ ์ํ ๊ฒฝ๋ก๋ ์ ๊ธ ๋์์ ๋ณดํธํฉ๋๋ค.
์ด ํ๋ก์ ํธ์์ ESPHome, PoE, TOTP, MQTT๊ฐ ๋ปํ๋ ๊ฒ
์ด ํ๋ก์ ํธ๋ฅผ ์ดํดํ๋ ค๋ฉด ๋ค ๊ฐ์ง ๊ธฐ์ ์ ๋จผ์ ์๋ฉด ๋ฉ๋๋ค.
- ESPHome์ ESP32 ๊ฐ์ ์ฅ์น์ ํ์จ์ด๋ฅผ YAML ์ค์ ์ผ๋ก ๊ตฌ์ฑํ๋ ํ๊ฒฝ์ ๋๋ค. ๋์ด๋ฝ์ ํคํจ๋, ๋ชจํฐ, ์ค์์น, ๋คํธ์ํฌ ์๋น์ค, Home Assistant ์ํฐํฐ๋ฅผ ๋น๊ต์ ์ฝ๊ฒ ์ ์ํ๊ณ ๊ด๋ฆฌํ ์ ์์ต๋๋ค.
- PoE, ์ฆ Power over Ethernet์ Ethernet ์ผ์ด๋ธ ํ๋๋ก ๋คํธ์ํฌ ๋ฐ์ดํฐ์ ์ ๋ ฅ์ ํจ๊ป ์ ๋ฌํ๋ ๊ธฐ์ ์ ๋๋ค. ์ด ํ๋กํ ํ์ ์์๋ W5500์ด Ethernet ํต์ ์ ๋งก๊ณ , ๋ณ๋๋ก ๊ฐ์กฐํ PoE ์ด๋ํฐ๊ฐ ๋ค์ด์จ ์ ๋ ฅ์ ๋์ด๋ฝ ํ๋ก์ ๋ง๊ฒ ๋ณํํฉ๋๋ค.
- TOTP, ์ฆ Time-based One-Time Password๋ ์ธ์ฆ ์ฑ์์ ๋ณผ ์ ์๋ ์ฃผ๊ธฐ์ ์ผ๋ก ๋ฐ๋๋ 6์๋ฆฌ ์ฝ๋์ ๋๋ค. ์ฑ๊ณผ ๋์ด๋ฝ์ด ๊ฐ์ ๊ณต์ ๋น๋ฐ๊ฐ์ธ ์ํฌ๋ฆฟ๊ณผ ํ์ฌ ์๊ฐ์ ์ฌ์ฉํด 30์ด๋ง๋ค ์๋ก์ด ๊ฐ์ ๊ณ์ฐํฉ๋๋ค.
- MQTT๋ ๋คํธ์ํฌ ์ฅ์น๊ฐ ํน์ ํ ํฝ์ ๋ฉ์์ง๋ฅผ ๋ฐํํ๊ณ ๊ตฌ๋ ํ๋ ๊ฐ๋ฒผ์ด ํต์ ๋ฐฉ์์ ๋๋ค. ๋น์ ์์คํ ์ด ์ผ๊ตด ์ธ์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐํํ๊ณ , ESPHome ๋์ด๋ฝ์ด ํด๋น ํ ํฝ์ ๊ตฌ๋ ํฉ๋๋ค.
์ผ๊ตด ์ธ์์ ์ด ํ๋ก์ ํธ์ ๋จธ์ ๋ฌ๋, ์ฆ ML ๊ธฐ๋ฅ์ ๋๋ค. ์นด๋ฉ๋ผ์ ์ธ๋ถ ์ธ์ ์๋น์ค๊ฐ ์์์ ๋ถ์ํ๊ณ , ๋์ด๋ฝ์๋ ๋งค์นญ๋ ์ด๋ฆ๊ณผ confidence, ์ฆ ์ธ์ ์์คํ ์ด ๊ณ์ฐํ ์ผ์น ์ ์ ๊ฐ์ ๊ฒฐ๊ณผ๋ง ์ ๋ฌํฉ๋๋ค. ๋๋ถ์ ์ด๋ฏธ์ง ์ถ๋ก ๊ณผ ์ค์ ๋ชจํฐ ์ ์ด๋ฅผ ์๋ก ๋ค๋ฅธ ์ฅ์น์ ๋๋ ์ ์์ต๋๋ค.
![]()
์์ฑ ์ผ๋ฌ์คํธ: ํคํจ๋์ ์ผ๊ตด ์ด๋ฒคํธ๋ ์๋ก ๋ค๋ฅธ ์ถ์ ๊ฒฝ๋ก์ด๋ฉฐ, ๋ฌธ ์ํ ์ ๋ณด๋ ์ ๊ธ ํ๋จ์ ์ฌ์ฉ๋ฉ๋๋ค.
ESP32-S3 ๋์ด๋ฝ ๋ด๋ถ ๊ตฌ์ฑ
๊ณต๊ฐ YAML์ ESP-IDF 5.4.2๋ก ๋์ํ๋ ESP32-S3 DevKitC-1์ ๋์์ผ๋ก ํฉ๋๋ค. ์ํ W5500 ๋ชจ๋์ SPI๋ก ์ฐ๊ฒฐ๋๋ฉฐ ํด๋ก GPIO42, MOSI GPIO44, MISO GPIO40, ์นฉ ์ ํ GPIO39, ์ธํฐ๋ฝํธ GPIO41, ๋ฆฌ์ GPIO43์ ์ฌ์ฉํฉ๋๋ค. ๊ณต์ ๋ ์ค์ ์์ Wi-Fi ๋ถ๋ถ์ ์ฃผ์ ์ฒ๋ฆฌ๋ผ ์์ด ์ ์ Ethernet์ด ์ค์ ๋คํธ์ํฌ ๊ฒฝ๋ก๋ก ์ค์ ๋ผ ์์ต๋๋ค.
์ด ์ ์ ์ฐ๊ฒฐ์ ํตํด ESPHome์ Home Assistant์ ์ ์ํ๊ณ , MQTT ์ด๋ฒคํธ๋ฅผ ๊ตฌ๋ ํ๋ฉฐ, TOTP์ ํ์ํ ์๊ฐ์ ๋๊ธฐํํ๊ณ , OTA ์ ๋ฐ์ดํธ์ UDP ๋ฌธ ์ ์ ๋ฉ์์ง๋ฅผ ์ฒ๋ฆฌํฉ๋๋ค. ESP32-S3๋ ์ด ๋คํธ์ํฌ ๊ธฐ๋ฅ์ ํคํจ๋ ์ ๋ ฅ, ํ์ LED, ๋ถ์ , ๋ชจํฐ ๋๋ผ์ด๋ฒ, ์ ๊ธ๊ณผ ์ด๋ฆผ ์์น๋ฅผ ํ์ธํ๋ ๋ ๊ฐ์ ๋ฆฌ๋ฏธํธ ์ค์์น์ ์ฐ๊ฒฐํฉ๋๋ค.
![]()
์์ฑ ๊ธฐ์ ๊ตฌ์กฐ๋: ๋คํธ์ํฌ ์๋น์ค์ ์ฌ์ฉ์ ์ ๋ ฅ์ด ESP32-S3 ๋์ด๋ฝ ์ปจํธ๋กค๋ฌ๋ก ๋ชจ์ด๊ณ , PoE ์ ์ ๋จ๊ณ๋ ๋ณ๋๋ก ๊ตฌ์ฑ๋ฉ๋๋ค.
TOTP ํคํจ๋ ์ถ์
TOTP๋ ํ๋ก์ ํธ์ ์ ์ฅ๋ 4์๋ฆฌ์์ 8์๋ฆฌ ๊ณ ์ ์ฝ๋์ ํจ๊ป ์ฌ์ฉํ ์ ์๋ 30์ด๋ง๋ค ๋ฐ๋๋ ํคํจ๋ ์ธ์ฆ ๋ฐฉ์์ ๋๋ค. ์ธ์ฆ ์ฑ๊ณผ ๋์ด๋ฝ์ ๊ฐ์ ๊ณต์ ๋น๋ฐ๊ฐ์ ์ค์ ํ๊ณ , ๋์ด๋ฝ์ด SNTP๋ผ๋ ๋คํธ์ํฌ ์๊ฐ ๋๊ธฐํ ๋ฐฉ์์ผ๋ก ์ ํํ ์๊ฐ์ ๋ฐ์ผ๋ฉด ์์ชฝ์ ํ์ฌ 30์ด ๊ตฌ๊ฐ์ ํด๋นํ๋ ๋์ผํ 6์๋ฆฌ ์ฝ๋๋ฅผ ๊ฐ๊ฐ ๊ณ์ฐํฉ๋๋ค.
์ฌ์ฉ์๋ ์ด 6์๋ฆฌ ๊ฐ์ ์
๋ ฅํ ๋ค E ํค๋ฅผ ๋๋ฆ
๋๋ค. ESPHome์ ๋จผ์ ์ ์ฅ๋ ๊ณ ์ ์ฝ๋๋ฅผ ํ์ธํ๊ณ , ์ด์ด์ ํ์ฌ TOTP ๊ฐ์ ๋น๊ตํฉ๋๋ค. ์ฌ๋ฐ๋ฅธ ๊ฐ์ด๋ฉด ์ด๋ฆผ ์คํฌ๋ฆฝํธ๋ฅผ ์์ํ๊ณ , ์ค์ ์ 30์ด ๋ค ์๋ ์ ๊ธ ์์ฒญ์ ์์ฝํฉ๋๋ค. ๋งค๋ฒ ํด๋ผ์ฐ๋์์ ๋น๋ฐ๋ฒํธ๋ฅผ ๋ฐ์์ค์ง ์์๋ ํคํจ๋ ํ์ฅ์์ ์์ ์ฝ๋๋ฅผ ์ฌ์ฉํ ์ ์๋ ๊ตฌ์กฐ์
๋๋ค.
๋ฐ๋ผ์ ์๊ฐ ๋๊ธฐํ๋ ๋จ์ํ ์๊ณ ๊ธฐ๋ฅ์ด ์๋๋ผ ์ถ์ ๊ณผ์ ์ ์ผ๋ถ์ ๋๋ค. ์ ์ฅ์๋ NonaSuomy์ ์ฌ์ฉ์ ์ ์ ESPHome TOTP ์ปดํฌ๋ํธ๋ฅผ ์ฐ๊ฒฐํ๊ณ ์์ผ๋ฉฐ, Documents ํจ๋์๋ ์ฝ๋ ์์ฑ์ ํ์ค ํ ์คํธ ๊ฐ์ผ๋ก ํ์ธํ ์ ์๋๋ก RFC 6238๋ ํจ๊ป ์ ๋ฆฌํ์ต๋๋ค.
MQTT ์ผ๊ตด ์ธ์ ์ด๋ฒคํธ ํ๋ฆ
๋ ๋ฒ์งธ ํน์ง์ ์ธ ์ถ์
๊ฒฝ๋ก๋ ๋์ด๋ฝ ์ธ๋ถ์์ ์์ํฉ๋๋ค. ์นด๋ฉ๋ผ์ ์ธ๋ถ ์ผ๊ตด ์ธ์ ์๋น์ค๊ฐ ML ์ถ๋ก ์ ์ํํฉ๋๋ค. ํ๋ก์ ํธ ๋ฌธ์๋ Frigate, CompreFace, Double Take๋ฅผ ์ธ๊ธํ๊ณ , ์ค์ YAML์ Double Take ๋ฐฉ์์ double-take/cameras/hqbackyardcam ํ ํฝ์ ๊ตฌ๋
ํฉ๋๋ค.
๋ฉ์์ง๊ฐ ๋ค์ด์ค๋ฉด ESPHome์ ์ฒซ ๋ฒ์งธ ๊ฒฐ๊ณผ์ match ๊ฐ์ด true์ธ์ง ํ์ธํฉ๋๋ค. ์ด์ด์ ์ผ์น ์ ์๊ฐ 95๋ฅผ ๋๋ ์ด๋ฒคํธ๋ง ๋ค์ ๋จ๊ณ๋ก ๋ณด๋ด๊ณ , ์ด๋ก์ ํ์์ ํจ๊ป ์ต๋ 30์ด์ ํคํจ๋ ํ์ธ ์๊ฐ์ ์์ํฉ๋๋ค. ๋ฐฉ๋ฌธ์๊ฐ ๊ทธ ์์ E๋ฅผ ๋๋ฅด๋ฉด ํ์ฌ ๋ฆฌ๋ฏธํธ ์ค์์น ์ํ์ ๋ฐ๋ผ ์ด๋ฆผ ๋๋ ์ ๊ธ ๋์์ ์์ฒญํฉ๋๋ค.
![]()
์์ฑ ๊ธฐ์ ๊ตฌ์กฐ๋: ์ธ๋ถ ์ธ์ ์์คํ ์ด MQTT ์ด๋ฒคํธ๋ฅผ ๋ฐํํ๊ณ , ESPHome์ด ์กฐ๊ฑด์ ํ์ธํ ๋ค ๋ฐฉ๋ฌธ์๊ฐ ํคํจ๋์์ ๋์์ ํ์ ํฉ๋๋ค.
๋น์ ํธ์คํธ๋ ์์ ์ฒ๋ฆฌ์ ๋ชจ๋ธ ์ถ๋ก ์ ๋งก๊ณ , MQTT๋ ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ์ ๋ฌํ๋ฉฐ, ESP32-S3๋ ํ์ธ ์๊ฐ๊ณผ ๋ชจํฐ ๋์์ ๊ด๋ฆฌํฉ๋๋ค. Ethernet ๋์ด๋ฝ์๋ ์นด๋ฉ๋ผ ์์ ์ ์ฒด๊ฐ ์๋๋ผ ์ด๋ฒคํธ ๋ฐ์ดํฐ๋ง ์ ๋ฌ๋ฉ๋๋ค.
๋ฌธ ์ํ, ๋ชจํฐ ํผ๋๋ฐฑ, ์๋ ์ ๊ธ
์ถ์ ์ธ์ฆ ์ ๋ณด๊ฐ ๋๊ฐ ๋๋ ๋ฌด์์ด ๋์์ ์์ฒญํ๋์ง ์๋ ค์ค๋ค๋ฉด, ๋ฌธ ์ ์ ๊ณผ ๋ฆฌ๋ฏธํธ ์ค์์น๋ ์ค์ ๊ธฐ๊ตฌ๋ถ๊ฐ ๋์ํ ์ค๋น๊ฐ ๋๋์ง๋ฅผ ์๋ ค์ค๋๋ค.
๋ณ๋์ ESPHome ์๋ ํจ๋ ํ๋ก์ ํธ๊ฐ UDP 18511๋ฒ ํฌํธ๋ก ๋ฌธ ์ํ๋ฅผ ๋ณด๋ ๋๋ค. ์ผ๋ฐ ์ ๊ธ ์คํฌ๋ฆฝํธ๊ฐ ์งํ๋๋ ค๋ฉด ์ด ์ํ๊ฐ 20์ด ์ด๋ด์ ์์ ๋ ๊ฐ์ด๊ณ , ๋ฌธ์ด ๋ซํ ์๋ค๊ณ ๋ณด๊ณ ํด์ผ ํฉ๋๋ค. ๋ ๊ฐ์ ๋ก์ปฌ ๋ฆฌ๋ฏธํธ ์ค์์น๋ ์ ๊ธ ๋ฐ ์ด๋ฆผ ์์น๋ฅผ ํ์ธํ๋ฉฐ, ์ผ๋ฐ ์ ๊ธ๊ณผ ์ด๋ฆผ ์คํฌ๋ฆฝํธ๋ ํด๋น ์์น์ ๋๋ฌํ๊ฑฐ๋ 5์ด๊ฐ ์ง๋๋ฉด ๋ชจํฐ๋ฅผ ๋ฉ์ถฅ๋๋ค.
ํคํจ๋๋ก ์ ์์ ์ผ๋ก ์ฐ ๋ค์๋ YAML์ด 30์ด ํ ์ ๊ธ ์์ฒญ์ ์์ฝํฉ๋๋ค. ๋ฌธ ์ ์ ํ์ธ, ๋ชจํฐ ์์น ํผ๋๋ฐฑ, ํ์์์์ ํจ๊ป ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๋จ์ํ ๋คํธ์ํฌ ๋ช ๋ น๋ณด๋ค ์ค์ ๋ฌธ ์ํ๋ฅผ ๋ ๋ง์ด ๋ฐ์ํ ์ ์์ต๋๋ค.
โ๏ธ W5500 Ethernet๊ณผ PoE ์ ์ ๋จ๊ณ
W5500์ ESP32-S3์ ์ฃผ๋ณ ์๋น์ค ์ฌ์ด์ ์ ์ IP ์ฐ๊ฒฐ์ ์ ๊ณตํฉ๋๋ค. ์ด ํ๋ก์ ํธ์์๋ Home Assistant API ํธ๋ํฝ, MQTT ์ผ๊ตด ์ด๋ฒคํธ, SNTP ์๊ฐ, OTA ํต์ , UDP ๋ฌธ ์ํ ๋ฉ์์ง๊ฐ ์ด ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์ธ์ฆ์ ํ์ํ ์๊ฐ, ์๊ฒฉ ์ด๋ฒคํธ, ๊ด๋ฆฌ ์ ์ด, ๋ฌผ๋ฆฌ ์ํ ์ ๋ณด๊ฐ ํ๋์ ESPHome ์ปจํธ๋กค๋ฌ์์ ๋ง๋๋ค๋ ์ ์ด Ethernet์ ํต์ฌ ์ญํ ์ ๋๋ค.
![]()
์๋ณธ ํ๋ก์ ํธ ์ฌ์ง์์ ๊ฐ์กฐ๋ PoE ์ด๋ํฐ๊ฐ ๋์ด๋ฝ ํ๋กํ ํ์ ์์ ๋ณ๋๋ก ์ฅ์ฐฉ๋ ๋ชจ์ต์ ๋ณผ ์ ์์ต๋๋ค.
PoE๋ ์ผ์ด๋ธ์ ํตํ ์ ์ ๊ฒฝ๋ก๋ฅผ ์ ๊ณตํ์ง๋ง ์ ๋ ฅ ๋ณํ ๋จ๊ณ๋ W5500 ๋ชจ๋๊ณผ ๋ณ๊ฐ์ ๋๋ค. NonaSuomy๋ ์์ ์ฅ์ฐฉํ ์ด๋ํฐ๋ฅผ ํ๋กํ ํ์ ๊ตฌ์ฑ์ผ๋ก ์ค๋ช ํ๊ณ , ํฅํ ๊ฐ์ ํญ๋ชฉ์ผ๋ก ๋ ํตํฉ๋ PoE ์ค๊ณ๋ฅผ ์ ์ํ์ต๋๋ค. ๋ ์์ ์ผ์ด์ค๋ฅผ ์ค๊ณํ๊ฑฐ๋ ๋ชจํฐ์ ์ปจํธ๋กค๋ฌ์ ์ ๋ ฅ ์์ฐ์ ๊ณ์ฐํ ๋ ๊ผญ ๊ตฌ๋ถํด์ผ ํ๋ ๋ถ๋ถ์ ๋๋ค.
ํ๋์ ๋ณด๋ ์ถ์ ๋ฐ ์ ์ด ๊ฒฝ๋ก
๊ณต๊ฐ ์ค์ ์ ์ฌ๋ฌ ์์ฒญ์ ํ๋์ ๋์ด๋ฝ ๋ก์ง์ผ๋ก ์ฐ๊ฒฐํฉ๋๋ค.
- ์ ์ฅ๋ 4์๋ฆฌ์์ 8์๋ฆฌ PIN์ผ๋ก ํคํจ๋์์ ๋ฌธ์ ์ด ์ ์์ต๋๋ค.
- ์ฃผ๊ธฐ์ ์ผ๋ก ๋ฐ๋๋ 6์๋ฆฌ TOTP๋ก ํคํจ๋์์ ๋ฌธ์ ์ด ์ ์์ต๋๋ค.
- ์กฐ๊ฑด์ ๋ง์กฑํ MQTT ์ผ๊ตด ์ด๋ฒคํธ๋ ์ต๋ 30์ด ๋์ ํ์ฅ์์
Eํค๋ก ํ์ธํ ์ ์๊ฒ ํฉ๋๋ค. - Home Assistant๋ ๋์๋ณด๋์ ์๋ํ์์ ๋์ด๋ฝ์ ์ ์ดํ ์ ์๊ฒ ํฉ๋๋ค.
- UDP ๋ฌธ ์ ์ ๋ฉ์์ง๋ ์ต๊ทผ์ ํ์ธ๋ ๋ซํ ์ํ๋ฅผ ๊ธฐ์ค์ผ๋ก ์ผ๋ฐ ์ ๊ธ ๋์์ ๋ณดํธํฉ๋๋ค.
์ด ๊ธฐ๋ฅ๋ค์ ๋ชจ๋ ์ฌ์ฉ์๊ฐ ํ ๋ฒ์ ๊ฑฐ์น๋ ํ๋์ ๊ณ ์ ์์๊ฐ ์๋๋ผ, ์๋ก ๋ค๋ฅธ ์ ์ด ๋ฐ ์ํ ๊ฒฝ๋ก์ ๋๋ค. ์ด๋ฐ ์ ์ฐ์ฑ์ด ์ด ์์ค๋ฅผ ESPHome ์ถ์ ์ ์ด ์ฐธ๊ณ ์๋ฃ๋ก ๋ณผ ๋งํ ์ด์ ์ ๋๋ค.
๊ณต๊ฐ ์์ค์ ์ค์น ์ ์ ํ์ธํ ์
์ ์ฅ์์๋ W5500 ํ ๋ฐฐ์น, MQTT ํ ํฝ๊ณผ JSON ์ฒ๋ฆฌ, TOTP ํ์ธ, UDP ์์ , ๋ชจํฐ ์คํฌ๋ฆฝํธ, ๋ฆฌ๋ฏธํธ ์ค์์น, ํ์ ์ฅ์น, Home Assistant ์ํฐํฐ๋ฅผ ์ดํด๋ณผ ์ ์์ ๋งํผ ์์ธํ ๋ด์ฉ์ด ์์ต๋๋ค. ๋ค๋ง ์์ฑ๋ ์ค์น ํจํค์ง๋ณด๋ค๋ ๊ณต๊ฐ ํ๋กํ ํ์
์ ๊ฐ๊น์ต๋๋ค. YAML์ด ์ฐธ์กฐํ๋ ๋ก์ปฌ components/ ๋๋ ํฐ๋ฆฌ์ aes.hpp ํ์ผ์ด ์๊ณ , ์ ํํ ๋ฐ๋๋ณผํธ์ PoE ์ด๋ํฐ ๋ชจ๋ธ, ํ๋ก๋, BOM, ์ผ์ด์ค ์ค๊ณ๋ ์ ์๋์ง ์์์ต๋๋ค.
์ค์ ์ถ์ ๋ฌธ์ ์ ์ฉํ๊ธฐ ์ ์๋ ํ์ค ํ ์คํธ ๊ฐ์ผ๋ก TOTP ์ค์ ์ ๊ฒ์ฆํ๊ณ , ๋ธ๋ก์ปค ACL์ ์ ์ฉํ๋ฉฐ ๊ฐ๋ฅํ ํ๊ฒฝ์์๋ TLS ๊ฐ์ ์ํธํ ์ ์ก์ ์ฌ์ฉํด์ผ ํฉ๋๋ค. ๋ก์ปฌ ๋คํธ์ํฌ์ UDP ํต์ ์ ๋ณดํธํ๊ณ , ๋ชจ๋ ๋ชจํฐ ํ์์์๋ ์ํํด์ผ ํฉ๋๋ค. ๊ธฐ๊ตฌ์ ์ธ ํ์ธ๋ ์ค์ํฉ๋๋ค. ๊ธฐ๊ณ์ ์ด์ ์ ์ค๋ด ์๋ ํ์ถ ๊ฒฝ๋ก๋ฅผ ์ ์งํ๊ณ , ์ ์ ์ ๋์, ์ ๊ธฐ ๋ณดํธ, ๋ชจํฐ ์ ๋ฅ๋ฅผ ํ์ธํ๋ฉฐ, ํด๋น ์ง์ญ์ ๋์ด๋ฝ ๋ฐ ๊ฑด์ถ ๊ด๋ จ ์๊ตฌ ์ฌํญ์ ๋ฐ๋ผ์ผ ํฉ๋๋ค.
๊ฐ์ฅ ์ข์ ํ์ฉ ๋ฐฉ๋ฒ: ๋จผ์ ๋ฒค์น ํ๊ฒฝ์์ ๋คํธ์ํฌ์ ์ ์ด ํ๋ฆ์ ์ฌํํ ๋ค, ์ค์ ๋ฌธ์ ๋ง๋ ๊ธฐ๊ตฌ, ์ ์, ๋ณด์, ํ์ผ์ธ์ดํ ์ค๊ณ๋ฅผ ์์ฑํ๋ ๊ฒ์ ๋๋ค.
๊ด๋ จ WIZnet Maker ์ฝ์๊ฑฐ๋ฆฌ
3D ์ผ๊ตด ์ธ์๊ณผ ์ง๋ฌธ ๊ธฐ๋ฅ์ ๊ฐ์ถ PoE ESPHome ์ถ์ ํจ๋์ ์ ์ฉ 3D ์ผ๊ตด ์ผ์๋ฅผ ํจ๋์ ๋ฐฐ์นํ ์ฌ๋ก์ ๋๋ค. ์ด๋ฒ ๋์ด๋ฝ์ด ์ธ๋ถ ๋น์ ์์คํ ์์ ์์ฑํ ์ผ๊ตด ์ธ์ ์ด๋ฒคํธ๋ฅผ ๋ฐ๋ ๋ฐฉ์๊ณผ ๋น๊ตํด ๋ณผ ์ ์์ต๋๋ค.
๋ ํญ๋์ ์ ์ ์ถ์ ์ปจํธ๋กค๋ฌ๊ฐ ๊ถ๊ธํ๋ค๋ฉด IntelliDrive ESP32-W5500 ๊ฒ์ดํธ ์ปจํธ๋กค๋ฌ์์ MQTT, BLE, OTA, ์ง๋ฌธ ๊ธฐ๋ฅ์ด ESP32์ W5500 ์ฃผ๋ณ์ ์ด๋ป๊ฒ ๊ตฌ์ฑ๋๋์ง ๋ณผ ์ ์์ต๋๋ค.
W55RP20 Smart Doorbell Demo๋ ๋ ๋ค๋ฅธ ML ์ญํ ๋ถ๋ฆฌ๋ฅผ ๋ณด์ฌ์ค๋๋ค. ์ด ๋์ด๋ฝ์ ๋คํธ์ํฌ์ ๋ค๋ฅธ ์ฅ์น์์ ๋ง๋ ์ผ๊ตด ์ธ์ ๊ฒฐ๊ณผ๋ฅผ ๋ฐ๋ ๋ฐ๋ฉด, ํด๋น ๋์ด๋ฒจ์ ์ฅ์น์์ ๋ฐ๋ ค๋๋ฌผ ๋ถ๋ฅ๋ฅผ ์คํํ ๋ค Ethernet ์๋ฆผ์ ๋ณด๋ ๋๋ค.
์์ค ๊ธฐ๋ฐ ์์ฝ
NonaSuomy์ ํ๋ก์ ํธ๋ ๊ธฐ์กด ํคํจ๋ ๋ฐ๋๋ณผํธ๋ฅผ ์ฃผ๊ธฐ์ ์ผ๋ก ๋ฐ๋๋ TOTP, MQTT ์ธ๋ถ ML ์ด๋ฒคํธ, ์ค์ ๋ฌธ ์ํ ํ์ธ์ ๊ฐ์ถ ์ ์ ESPHome ์ถ์ ์ปจํธ๋กค๋ฌ๋ก ๋ง๋๋ ๋ฐฉ๋ฒ์ ๋ณด์ฌ์ค๋๋ค. ESP32-S3๊ฐ ์ฌ์ฉ์ ์ ๋ ฅ๊ณผ ๋ชจํฐ๋ฅผ ๊ด๋ฆฌํ๊ณ , W5500์ด ๋คํธ์ํฌ ์๋น์ค๋ฅผ ์ฐ๊ฒฐํ๋ฉฐ, ๋ณ๋์ PoE ๋จ๊ณ๊ฐ Ethernet ์ผ์ด๋ธ์ ํตํด ์ ์์ ๊ณต๊ธํฉ๋๋ค.
ํ๋ก์ ํธ๋ 2025๋ ์ ๊ณต๊ฐ๋๊ณ ์์ค๋ ๊ฐ์ ํด 9์๊น์ง ๋ฐ์ ํ์ต๋๋ค. ์ค์ ๋ฌธ์ ๊ทธ๋๋ก ์ฌํํ๋ ค๋ฉด ์ถ๊ฐ ํ์ผ๊ณผ ์ค์น ์ค๊ณ๊ฐ ํ์ํ์ง๋ง, ๊ณต๊ฐ YAML์ Home Assistant, TOTP, MQTT ์ผ๊ตด ์ธ์, UDP ์ํ ๋ณด๊ณ , ์ ์ Ethernet์ ํ๋์ ์ถ์ ์ ์ด ํ๋กํ ํ์ ์ผ๋ก ์ฐ๊ฒฐํ๋ ์ถฉ๋ถํ ์ฐธ๊ณ ์๋ฃ๋ฅผ ์ ๊ณตํฉ๋๋ค.
โ FAQ
Q1. ์ด ๋์ด๋ฝ์์ ESPHome์ ์ด๋ค ์ญํ ์ ํ๋์?
ESPHome์ W5500 Ethernet, ํคํจ๋ ์
๋ ฅ, ํ์ ์ฅ์น, MQTT์ UDP ๋ฉ์์ง, Home Assistant ์ํฐํฐ, ๋ชจํฐ ์ ์ด ์คํฌ๋ฆฝํธ๋ฅผ ํฌํจํ ESP32-S3 ํ์จ์ด๋ฅผ YAML๋ก ๊ตฌ์ฑํฉ๋๋ค.
Q2. TOTP๋ ๊ณ ์ ํคํจ๋ PIN๊ณผ ์ด๋ป๊ฒ ๋ค๋ฅธ๊ฐ์?
๊ณ ์ PIN์ ์ฌ์ฉ์๊ฐ ๋ฐ๊พธ๊ธฐ ์ ๊น์ง ๊ฐ์ ๊ฐ์
๋๋ค. TOTP๋ ๊ณต์ ์ํฌ๋ฆฟ๊ณผ ํ์ฌ ์๊ฐ์ ์ฌ์ฉํด 30์ด๋ง๋ค ์๋ก์ด 6์๋ฆฌ ๊ฐ์ ๋ง๋ญ๋๋ค.
Q3. ์ผ๊ตด ์ธ์ ML์ ์ด๋์์ ์คํ๋๊ณ MQTT๋ ๋ฌด์์ ์ ๋ฌํ๋์?
ML ์ถ๋ก ์ ์ธ๋ถ ์นด๋ฉ๋ผ ๋๋ ์ธ์ ํธ์คํธ์์ ์คํ๋ฉ๋๋ค. MQTT๋ ESPHome ์๋ํ๊ฐ ์ฌ์ฉํ๋ ๋งค์นญ ์ฌ๋ถ์ ์ผ์น ์ ์๋ฅผ ํฌํจํ ๊ฒฐ๊ณผ ์ด๋ฒคํธ๋ฅผ ์ ๋ฌํฉ๋๋ค.
Q4. W5500๊ณผ PoE๋ ๊ฐ๊ฐ ์ด๋ค ์ญํ ์ ํ๋์?
W5500์ ESP32-S3์ SPI ๊ธฐ๋ฐ ์ ์ Ethernet์ ์ ๊ณตํฉ๋๋ค. ๋ณ๋์ PoE ์ด๋ํฐ๋ Ethernet ์ผ์ด๋ธ์์ ์ ๋ ฅ์ ๋ฐ์ ๋์ด๋ฝ ํ๋ก์ ๋ง๊ฒ ๋ณํํฉ๋๋ค.
Q5. ํ๋ก์ ํธ๋ฅผ ์ฌํํ๊ธฐ ์ ์ ๋ฌด์์ ํ์ธํด์ผ ํ๋์?
๋๋ฝ๋ ์ฌ์ฉ์ ์ ์ ์ปดํฌ๋ํธ์ AES ํ์ผ์ ์ค๋นํ๊ณ , TOTP ์ค์ ์ ๊ฒ์ฆํ๋ฉฐ, ๋์ด๋ฝ๊ณผ PoE ํ๋์จ์ด๋ฅผ ์ ํํด ๋ฌธ์ํํด์ผ ํฉ๋๋ค. ๋คํธ์ํฌ ์๋น์ค๋ฅผ ๋ณดํธํ๊ณ , ์ค๋ด ์๋ ํ์ถ, ๊ธฐ๊ณ์ ์ด์ , ์ ์ ์ ๋์, ๋ชจํฐ ํ์ผ์ธ์ดํ๋ ์ํํด์ผ ํฉ๋๋ค.
Documents
-
Home Assistant Community Project
Original project article, installation photos, and system description.
-
ESPHome Door Lock Repository
Primary repository with README, firmware YAML, helper, photos, and demo media.
-
ESPHome Door Lock YAML
Main configuration showing W5500 pins, MQTT face-match handling, TOTP checks, UDP door state, and motor logic.
-
Custom ESPHome TOTP Component
TOTP component branch linked by the author. Builders should validate secret provisioning and test-vector compatibility.
-
RFC 6238 TOTP Standard
IETF specification for time-based one-time passwords and reference test vectors.
-
Double Take Repository
Face-recognition event aggregator named by the project and reflected in its MQTT topic.
-
Frigate Face Recognition Documentation
Current Frigate documentation explaining face-recognition processing and configuration.
-
ESPHome Alarm Panel Repository
Related source project for the separate UDP door-state provider referenced by the lock README.
-
ESPHome Ethernet Component
Official ESPHome documentation for wired Ethernet configurations including W5500.
-
W5500 Product Documentation
Official WIZnet documentation for the SPI Ethernet controller used in the project.