Add T8501 (Eufy Solo Smart Lock D20) lock/unlock support (V12 protocol)#928
Open
dastorie wants to merge 1 commit into
Open
Add T8501 (Eufy Solo Smart Lock D20) lock/unlock support (V12 protocol)#928dastorie wants to merge 1 commit into
dastorie wants to merge 1 commit into
Conversation
…V12 protocol The Eufy Solo Smart Lock D20 (T8501) reports device_type 53 (LOCK_WIFI_NO_FINGER) and is already detected as a lock with working state, but lock/unlock commands were silently dropped: lockDevice() routed it to the legacy wifi-lock P2P protocol, while the device only responds to the "V12" lock protocol (getLockV12P2PCommand, same family as the R10/R20 retrofit locks). Add an isLockWifiT8501 detector (device_type 53 + serial prefix "T8501", so other type-53 devices are unaffected, mirroring the T8510P/T8520P serial-prefix split) and route it through the V12 path in lockDevice, getLockParameters and getLockStatus; exclude it from the legacy branch. No DeviceType/DeviceProperties changes needed. Verified on real hardware: UNLOCK/LOCK return code 0, the bolt actuates, state reflects back; also end-to-end via eufy-security-ws + Home Assistant. Closes bropat#226 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Eufy Solo Smart Lock D20 (T8501) is already detected as a lock and its state reads correctly, but lock/unlock commands are silently ignored. Root cause: it's routed to the legacy wifi-lock P2P protocol, but the T8501 only responds to the "V12" lock protocol (
getLockV12P2PCommand, the same family as the R10/R20 retrofit locks). Routing it through V12 makes lock/unlock work. No newDeviceType/DevicePropertiesentries are needed.Closes #226.
Device facts (captured from a live unit)
device_typeLOCK_WIFI_NO_FINGER)device_modelT8501T8501…(it is its own station)P01.0.4.0Device.isLock(53)truelocked/lockStatus/battery)State arrives over MQTT (smart-lock message, eventType 770 lockState / 261 unlock / 264 lock), which is why state has always worked even though every command was being dropped.
Root cause
Station.lockDevice()dispatched device_type 53 viaisLockWifiNoFinger()into the legacy branch (getLockP2PCommand,P2P_ON_OFF_LOCK). The"P0"hardware superficially resembles the modern smart-lock family, but neither the legacy nor the smart-lock (getSmartLockP2PCommand) protocol gets any response from this device — onlygetLockV12P2PCommanddoes.Evidence (redacted P2P traces)
Both directions physically actuate the bolt and the state reflects back.
What changed
src/http/device.ts— addDevice.isLockWifiT8501(type, serial)(device_type 53 and serial starts withT8501, so other type-53 devices are unaffected — mirrors the existingT8510P/T8520Pserial-prefix split), plus the instance wrapper.src/http/station.ts— route T8501 through the V12 branch inlockDevice,getLockParametersandgetLockStatus; exclude it from the legacyisLockWifi()/isLockWifiNoFinger()branch. The RSA lock public key is still fetched (V12 needs it), so the public-key gate is unchanged.Builds clean (
tsc); the change follows the existing file style.Verification
return_code 0, the bolt physically moves,locked/lockStatusupdate, and MQTT lock/unlock events fire.fuatakgun/eufy_security→eufy-security-ws3.0.1 → patched client):lock.unlock/lock.lockactuate the real D20 and Home Assistant reflects the state.🤖 Generated with Claude Code