homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
166 stars 24 forks source link

Streaming is extremely slow #100

Closed bgoncal closed 2 years ago

bgoncal commented 2 years ago

What happened?

While streaming my Dufy doorbell battery 2K, the video is extremely slow, I have the timestamp enabled and it takes 3 seconds to see the timestamp change

Device Type

Doorbell (Supported)

Plugin Version

v2.0.x (Supported)

HomeBridge Version

v1.4.x (Supported)

NodeJS Version

v16 (Supported)

Operating System

Raspbian 10+ (Supported)

Relevant log output

[06/07/2022, 01:15:54] Homebridge v1.5.0 (HAP v0.10.2) (Homebridge 62BC) is running on port 51635.
[7/6/2022, 1:16:01 AM] [EufySecurity-2.1.0-beta.2] INFO:  You're using guest admin account with this plugin! This is recommanded way!
[7/6/2022, 1:16:01 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell is set to handle snapshots with cloud images. Snapshots might be older than they appear.
[7/6/2022, 1:16:02 AM] [EufySecurity-2.1.0-beta.2] INFO:  Updating accessory: Doorbell
[7/6/2022, 1:16:43 AM] [EufySecurity-2.1.0-beta.2] INFO:  Chime station livestream (P2P session) for Doorbell has started.
[7/6/2022, 1:16:43 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell Starting video stream: 1280x720, 30 fps, 299 kbps 
[7/6/2022, 1:16:45 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell Getting the first frames took 2.234 seconds.
[7/6/2022, 1:16:59 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell Stopped video stream.
[7/6/2022, 1:16:59 AM] [EufySecurity-2.1.0-beta.2] INFO:  Chime station livestream for Doorbell has stopped.
[7/6/2022, 1:16:59 AM] [EufySecurity-2.1.0-beta.2] INFO:  Connection closed by Eufy station.
[7/6/2022, 1:16:59 AM] [EufySecurity-2.1.0-beta.2] INFO:  ErrorCode ECONNRESET
[7/6/2022, 1:16:59 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell FFmpeg exited with code: 0 and signal: null (Expected)
[7/6/2022, 1:17:01 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell FFmpeg exited with code: null and signal: SIGKILL (Forced)
[7/6/2022, 1:30:46 AM] [EufySecurity-2.1.0-beta.2] INFO:  Chime station livestream (P2P session) for Doorbell has started.
[7/6/2022, 1:30:46 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell Starting video stream: 1280x720, 30 fps, 299 kbps 
[7/6/2022, 1:30:48 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell Getting the first frames took 1.608 seconds.
[7/6/2022, 1:30:57 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell Stopped video stream.
[7/6/2022, 1:30:57 AM] [EufySecurity-2.1.0-beta.2] INFO:  Chime station livestream for Doorbell has stopped.
[7/6/2022, 1:30:57 AM] [EufySecurity-2.1.0-beta.2] INFO:  Connection closed by Eufy station.
[7/6/2022, 1:30:57 AM] [EufySecurity-2.1.0-beta.2] INFO:  ErrorCode ECONNRESET
[7/6/2022, 1:30:57 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell FFmpeg exited with code: 0 and signal: null (Expected)
[7/6/2022, 1:30:59 AM] [EufySecurity-2.1.0-beta.2] INFO:  Doorbell FFmpeg exited with code: null and signal: SIGKILL (Forced)
github-actions[bot] commented 2 years ago

Did you check this Common Issues pages ?

bgoncal commented 2 years ago

I was suspecting that the issue was my raspberry pi not being strong enough to handle the streaming, and I was correct. I installed homebridge on my MacBook and now the plugin works flawless.

At least it's a good situation to add to your knowledge base, I hope I have contributed in some way haha

thieren commented 2 years ago

Hi @cpvbruno

I would think that there are some other users that can stream with a raspi just fine. Could you send me your config json? Maybe you have some bad settings in your videoConfig?

Apart from this a dedicated hardware is for sure better performance wise than a raspi.

bgoncal commented 2 years ago

In the end the problem was the power supply for the raspberry, I have the model 3B+ and in homebridge dashboard it was saying hat not enough supply was been provided, so I replaced the charger and now everything works like a charm

thieren commented 2 years ago

In the end the problem was the power supply for the raspberry, I have the model 3B+ and in homebridge dashboard it was saying hat not enough supply was been provided, so I replaced the charger and now everything works like a charm

Good to know. Thx for the feedback!