bropat / eufy-security-ws

Small server wrapper around eufy-security-client library to access it via a WebSocket.
MIT License
184 stars 29 forks source link

[Question]: Where to enter the 2fa code? #320

Closed Bandoffe closed 3 months ago

Bandoffe commented 7 months ago

Ask your question

I use my Eufy app with 2fa. Registration in the add-on is not possible because I can't find a way to enter my 2fa code. Am I missing something, or is this not possible?

tsmanz commented 6 months ago

I'm facing the same issue. I've searched for a solution and it appears some people have been able to authenticate with 2fa in place, but I can't find any step by step instructions on how to do it. Some people have suggested creating a separate eufy account without 2fa disabled to use with the app, but I'd like to avoid that. I get the email with 2fa code, but there doesn't appear to be anywhere to enter it.

PhilippEngler commented 6 months ago

As far as I remember, there must be a API-function called verify code or similar.

dweeden commented 6 months ago

I ran into this same problem (plus captcha) while running the server manually with this command: tsx src/bin/server.ts

Note that I'm using tsx as ts-node from the "try it out" instructions seems to struggle with ts files (filed bug https://github.com/bropat/eufy-security-ws/issues/332)

It strangely seemed to hang, but providing a -v param to the server invocation showed it was actually needing captcha, which it sends back via a base64 image you can copy into https://www.base64decode.net/base64-image-decoder for viewing.

Once you know that, you can set it from another terminal window (server has to keeping running in the first) as follows:

tsx src/bin/client.ts --command device.set_captcha -a abcd

Filed feature request https://github.com/bropat/eufy-security-ws/issues/333 to make this more easily apparent.

Once you're (potentially) past the captcha hurdle, you should get a verify code via email from eufy that can be set as follows:

tsx src/bin/client.ts --command device.set_verify_code -a 123456

rkbest13 commented 6 months ago
dweeden commented 6 months ago

I was running those commands on a linux machine after downloading this repo. Within HA you should download and follow the instructions for eufy_security. The HA OS should spawn dialogs for you to enter info for these fields. If it's not, changing the password within your eufy mobile app should trigger it to do so.