bropat / eufy-security-ws

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

Have server indicate that Captcha is required #333

Open dweeden opened 1 month ago

dweeden commented 1 month ago

Describe the solution you'd like

As I commented in question https://github.com/bropat/eufy-security-ws/issues/320, the server seems to hang on start if eufy is wanting captcha unless one provide a -v verbose param.

It would be really helpful if the server logged that captcha is required at Info level in a manner similar to the way it does for 2FA (bold below). It took me quite awhile to figure this out and it would be nice to save others that time going forward.

Ideally, it would also emit the base64 data too with a suggestion to enter it into an online decoder such as https://www.base64decode.net/base64-image-decoder

2024-05-22 20:29:40.498 INFO eufy-security-ws Eufy Security server listening on host localhost, port 3000 2024-05-22 20:29:41.363 INFO eufy-security-ws:eufy-security-client [http] [HTTPApi.sendVerifyCode] Requested verification code for 2FA 2024-05-22 20:30:31.720 INFO eufy-security-ws:eufy-security-client [http] [HTTPApi.addTrustDevice] 2FA authentication successfully done. Device trusted.