bropat / eufy-security-client

This shared library allows to control Eufy security devices by connecting to the Eufy cloud servers and local/remote stations over p2p.
MIT License
508 stars 75 forks source link

[Bug]: Eufy Security add-on crashes during extended P2P to RTSP streaming #431

Closed V4ler1an closed 9 months ago

V4ler1an commented 11 months ago

Client version

1.7.1

Node version

Unsure how to get this?

Operating System type

Linux

Operating system version

HASSIO (Fully updated)

Describe the bug

When I P2P stream an S100 wall light camera through the RTSP Simple Server and leave it running it will always fail after a failry short amount of time. I would like to be able to have a camera stream up for longer periods. The Android Eufy mobile app seems to have no problem with this. My recent test crashed the add-on after 21 minutes. The HASSIO error is the screenshot. Eufy add-on logs have nothing because it crashed before logging any errors.

To reproduce

  1. Open the WebRTC card for the camera, click the 'Start P2P Stream' entity.
  2. Wait till it falls over.
  3. The moment it freezes, HASSIO registers the 'Connection to Eufy Security add-on is broken' error.
  4. Eufy Security add-on is now non functional and must be restarted. The 'Watchdog' feature seems unable to recover/restart it.

Screenshots & Logfiles

image

Additional context

I get these stream failures regardless of the camera. The cameras have very strong and reliable connections. The length of time the stream will run is variable. The shortest might be 5 minutes, the longest around 20.

ronaldt80 commented 11 months ago

+1; although its not necessarily related to long term streaming; I will debug for the coming 24 hours to see if something pops up.

Right now I get the same message per above, addon remains running (50%+ CPU usage) with a log message:

2024-01-02 10:44:44.129 INFO Client disconnected with ip: 127.0.0.1 port: 43094 code: 1006 reason: Abnormal Closure

fuatakgun commented 11 months ago

Same for me

kloodhu commented 10 months ago

Today i experinced the same every time a p2p streaming started. After ~3 seconds the started, immediatelly stopped (Idle state). Next streaming probe make the addon hangs and eventually crashes. In the mean time the memory consumption goes up to ~2 GB. Once i saw an error aftercrash-beforrestart. Something about java out of memory. I don't know, what changed, a few days ago there was no problem like this. Eufy api changed maybe?