bropat / eufy-security-ws

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

[Bug]: Command aged out after few days #328

Closed SimonCtl closed 1 month ago

SimonCtl commented 6 months ago

Version

1.8.0-2

Node version

N/A

Operating System type

Linux

Operating system version

HA 2024.5.3

Describe the bug

Hi,

I have a eufy S100 camera and every 2 or 3 days. I can no longer control it through HA. When I check in add-on logs, I see it cannot connect through eufy-security-client. I have to restart add-on and then it works again. Looks like it's a token issue ?

Thanks for your help !

To reproduce

.

Screenshots & Logfiles

image

Additional context

No response

domi8671 commented 5 months ago

I have the same issue. I am using 10 S100. After restarting the add-on all are working, the next day 2 are not working, restarting the add-on, all are working, the next day 9 are not working... and so on.

I have activated debug mode and it says error connection timeout. Today I took the following screenshot: Screenshot

SimonCtl commented 2 months ago

@bropat Hi, What would you need more to debug ? I don't have anymore logs related to eufy-security-ws extension.

Sticky12 commented 2 months ago

I also have this bug. My logs also state Command aged out. This only started happening a few days ago for me. I am on version 1.9.0 of the add-on.

bropat commented 2 months ago

This problem is related to connection problems with the device (very well visible here). As soon as a P2P command is sent and there is currently no P2P connection with the device, an attempt is made to establish it and if this is not established within a certain time, the command is cancelled (aged out).

In short, normal behaviour in this case.

domi8671 commented 2 months ago

But how can it be that it works via the Eufy app at the same time? The device can also be reached via the Alexa app at the same time. Just not via Home Assistant.

PhilippEngler commented 2 months ago

But how can it be that it works via the Eufy app at the same time? The device can also be reached via the Alexa app at the same time. Just not via Home Assistant.

Maybe your Home Assistant could not built up a p2p connection to the device due to network card / operating system problems or whatever.

In normal case, your log should have entries like Connected to station T80X on host XXX.XXX.XXX.XXX and port XXXXX. In the case of failing p2p connections, there should be log entries like Tried all hosts, no connection could be established to station T80X. and Timeout connecting to station T80X..