bropat / eufy-security-ws

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

[Feature request]: Initialization flow #211

Closed fuatakgun closed 1 year ago

fuatakgun commented 1 year ago

Describe the solution you'd like

Cont. from https://github.com/bropat/eufy-security-ws/issues/150

I am having issues to receive captcha/verification (2fa) events from WS on container, assuming that before I can even reach to start listening state, WS on container had already tried logging in and received respective events.

So timeline perspective;

Suggestions;

bropat commented 1 year ago

As soon as eufy-security-ws receives a captcha request, it is cached so that every client that connects and executes start listening also receives the event as long as no client has sent the captcha. Look here and here. What has not been implemented is whether a captcha has expired in the meantime (this information is not available and could only be implemented with a simple timer), but if the captcha request is answered incorrectly, you get another one right away ;)

we can create a new command to initiate login flow.

There is already a command to initiate a connection. See here.

fuatakgun commented 1 year ago

I remember it was the case but yesterday i tried with 1.4.1 and i didn't receive captcha event. Even after trying driver.connect didn't receive respective events, let me double check and share the logs

This gets more problematic when user had enabled 2fa because they will get multiple emails (one delivered at docker startup and one after driver connect)

fuatakgun commented 1 year ago

my findings;

fuatakgun commented 1 year ago

when I am running client against server, this is the response;

ts-node src/bin/client.ts 
{
  type: 'version',
  driverVersion: '2.5.1',
  serverVersion: '1.4.1',
  minSchemaVersion: 0,
  maxSchemaVersion: 17
}
{
  type: 'result',
  success: true,
  messageId: 'api-schema-id',
  result: {}
}
Hufflepuff-source commented 1 year ago

Is there any update to this? I think I have the same issue. When I start the integration, it says no entities found:

Screen Shot 2023-07-17 at 6 04 40 pm

When I went to the Eufy add on, it says "schema incomplete":

Screen Shot 2023-07-17 at 6 05 26 pm

It used to be working but have stopped working for few weeks now and can't seem to figure out why.

bropat commented 1 year ago

@fuatakgun checkout latest version (1.6.0).