plugin icon indicating copy to clipboard operation
plugin copied to clipboard

[enhancement]: Home Kit Secure Video (HKSV)

Open lenoxys opened this issue 3 years ago • 95 comments

Describe the solution you'd like

In homebridge 1.4.0 HSV is included. The request is to include HSV in this plugin.

https://github.com/samemory/homebridge-eufy-security/issues/337

lenoxys avatar Apr 11 '22 12:04 lenoxys

Did you check this Road Map pages ?

github-actions[bot] avatar Apr 11 '22 12:04 github-actions[bot]

What’s the status guys? I`m looking forward to this feature.

TheSentinel0101 avatar May 29 '22 12:05 TheSentinel0101

Hello @simonaa1, sorry we just need spare time to work on it. We're focusing on debug and security fix as of today.

lenoxys avatar May 29 '22 16:05 lenoxys

Hello @simonaa1, sorry we just need spare time to work on it. We're focusing on debug and security fix as of today.

👍 Keep it up heroes!

TheSentinel0101 avatar May 29 '22 17:05 TheSentinel0101

Hi guys. Is there any news on this?

TheSentinel0101 avatar Jun 10 '22 08:06 TheSentinel0101

Hi everyone!

Just a quick update: I have a first draft of HKSV up and running but encountered a few obstacles.

It breaks down to the motion detection not working reliable for eufy devices.

The way it's supposed to work is: the eufy device detects a motion and the plugin starts recording. It then sends the video data to the HomeKit controller. It does so until the device tells it that the motion has ended. And here is the caveat.

Since we need the device to record, the eufy cloud things that we actually watch the stream and therefore it won't send us the 'motion stopped' signal. Since we do not get this signal, we never know when to actually end the recording.

It would be doable to just set a timer, but that wouldn't lead to the best user experience.

The best thing I could get up with for the moment would be to write a manual motion detection algorithm to determine when the motion has stopped. the packacke camera-ui does something similar.

Anyway since I can't test for rtsp streams, it would be nice if someone could get me the info, if this happens there also. e.g. watch the stream via plugin and rtsp (make sure it's really rtsp) and then deliberately walk in front of the camera. Is there a motion detected trigger? And if so, is it reset after you leave the view of the camera?

a snippet of the debug log while the stream is running would be nice!

thieren avatar Aug 04 '22 06:08 thieren

I have to revise my last comment a bit:

technically the stop of motion detection is not all that necessary since HomeKit seems to only use the snippets that have motion in them. So the problem would only be that every time the camera records an event it will only stop after a timeout (for now that's 3 minutes) but HomeKit would only use the few seconds of the actual event that itself has analysed.

Maybe that's a way to get HKSV up and running, but there's definitely room for improvement.

thieren avatar Aug 04 '22 07:08 thieren

Great that you've started with HKSV! I have a battery doorbell without rtsp and two battery camera's with rtsp. Let me know what kind of log you need so I can provide it.

adekka avatar Aug 04 '22 11:08 adekka

Great that you've started with HKSV! I have a battery doorbell without rtsp and two battery camera's with rtsp. Let me know what kind of log you need so I can provide it.

Hey @adekka

Thx for the offer. Could you send me a dm on discord? It would be easier to discuss the details there...

thieren avatar Aug 04 '22 12:08 thieren

Not sure what happened, but Discord just threw me out. Perhaps telegram?

adekka avatar Aug 04 '22 16:08 adekka

Not sure what happened, but Discord just threw me out. Perhaps telegram?

Nevermind, I actually just bought an Indoor P24 which should be RTSP capable. It should arrive tommorow and I can test with this.

But thx again for the effort!

thieren avatar Aug 05 '22 05:08 thieren

Ok guys. It's finally here. Try the latest 2.2.0-beta.1 with HomeKit Secure Video support!

A few things I've already noticed:

  • it does not seem to work if homebridge runs on windows. Unfortunately I was not able to find out why this is yet.
  • The recording is ended prematurely if RTSP-streaming is enabled
  • The recording will also end early if motion tracking is enabled on Pan&Tilt devices. I think this has something to do with Apples server not being able to analyse the image properly if the camera pans

Maybe you guys can test these three situations yourself and report back if you find the same.

thieren avatar Aug 07 '22 18:08 thieren

Ok guys. It's finally here. Try the latest 2.2.0-beta.1 with HomeKit Secure Video support!

A few things I've already noticed:

  • it does not seem to work if homebridge runs on windows. Unfortunately I was not able to find out why this is yet.
  • The recording is ended prematurely if RTSP-streaming is enabled
  • The recording will also end early if motion tracking is enabled on Pan&Tilt devices. I think this has something to do with Apples server not being able to analyse the image properly if the camera pans

Maybe you guys can test these three situations yourself and report back if you find the same.

I'm testing it now. I'm using two T8414 cameras and have some issues...

  1. I can't get them to detect motion.
  2. Because of 1 I can't record any video based on motion..

jhaleit avatar Aug 08 '22 04:08 jhaleit

Hi @jhaleit

Please elaborate on 1.

Do you mean your eufy device is not trigger the motion detected event, or is it triggered (and hence the recording is started) and you don't get a push notification from HomeKit?

thieren avatar Aug 08 '22 04:08 thieren

Hi @jhaleit

Please elaborate on 1.

Do you mean your eufy device is not trigger the motion detected event, or is it triggered (and hence the recording is started) and you don't get a push notification from HomeKit?

Motion detection doesn't work at all. No notifications, nothing happens when using it for automation, etc..

jhaleit avatar Aug 08 '22 04:08 jhaleit

I can chat with you on discord.

jhaleit avatar Aug 08 '22 04:08 jhaleit

I did some testing as well. I don't get the timeline which I do get with other HKSV camera's (see screenshot).

image

adekka avatar Aug 08 '22 08:08 adekka

Hey @adekka

Could you write to me on discord to discuss this in detail?

  1. Am I understanding you right, that you don't get the timeline at all, for the camera?
  2. Which camera are you using, with what config?
  3. Does the log state, that the recording process is starting (and subsequently cosing/finishing)?

I'll write up an extensive wiki article about HKSV, since there are a bunch of caveats with it at the moment. But I can say, that (for me at least) it's working quite well at the moment.

thieren avatar Aug 08 '22 09:08 thieren

  1. yes, correct
  2. T8210 (battery camera doorbell)
  3. see a snippet of the log: ...

I'll get in touch via discord when I've sorted out my issue with Discord.

adekka avatar Aug 08 '22 16:08 adekka

@adekka oh, yes you had issues with discord right.

Your log output is really bad formatted and hard to read this way. Also it doesn't seem as if you have debug messages enabled. But even so, I don't see any mention of a record process starting.

Do you get motion trigger events through HomeKit? This is necessary for HKSV to work properly. See here for more details.

thieren avatar Aug 08 '22 17:08 thieren

Hi guys,

Awesome work on this, thanks. Is it correct that it won't record based on a doorbell press, though? I only have motion on at night and when I'm out of the house, so I don't know if that's correct that a press won't trigger a recording.

DaveM8686 avatar Aug 09 '22 09:08 DaveM8686

Hi guys,

Awesome work on this, thanks. Is it correct that it won't record based on a doorbell press, though? I only have motion on at night and when I'm out of the house, so I don't know if that's correct that a press won't trigger a recording.

I am 98% sure that doorbell presses will trigger the recording. ^^

thieren avatar Aug 09 '22 09:08 thieren

Hmmm, thanks. In that case there might be something wrong because it's definitely not doing that.

DaveM8686 avatar Aug 09 '22 13:08 DaveM8686

Hmmm, thanks. In that case there might be something wrong because it's definitely not doing that.

Can you enable debug messages and send me a log of such situation?

Maybe write me on discord.

thieren avatar Aug 09 '22 16:08 thieren

  1. yes, correct

  2. T8210 (battery camera doorbell)

  3. see a snippet of the log:

...

I'll get in touch via discord when I've sorted out my issue with Discord.

At first I didn't see a timeline either. I didn't have notifications for motion active and I didn't have an activity zone setup either. Once I added both of these I still didn't get a time line when opening the feed from the Home app. It wasn't until I received a motion notification and clicked on it to open the notifications that I got the timeline. I now see the timeline when I open the live stream.

andyrooo82 avatar Aug 09 '22 17:08 andyrooo82

Can you enable debug messages and send me a log of such situation?

Maybe write me on discord.

Hi, I don't actually have Discord sorry. I've dropped it here though. This is everything from the second I pushed the doorbell for three minutes after.

[8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: ringing true [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: pictureUrl https://security-app.eufylife.com/v1/s/g/51SDqggEO [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Got picture Url from eufy cloud: https://security-app.eufylife.com/v1/s/g/51SDqggEO [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Snapshot handler detected ring event. [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell DoorBell ringing [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceBattery: 98 [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceMotionDetected: false [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET EventSnapshotsActive: 1 [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET HomeKitCameraActive: 1 [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET PeriodicSnapshotsActive: 1 [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceEnabled: true [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceStatusLed: false [8/10/2022, 8:47:35 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceMotionDetection: false [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell requesting recording for HomeKit Secure Video. [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: HKSV and plugin are set to record audio. [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell RTSP rtspStream:false [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Looks like not compatible with RTSP [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell New instance requests livestream. There were 0 instance(s) using the livestream until now. [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Start new station livestream (P2P Session)... [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell Chime station livestream (P2P session) for Doorbell has started. [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Stream metadata: {"videoCodec":0,"videoFPS":15,"videoHeight":480,"videoWidth":640,"audioCodec":1} [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell New livestream started. Proxy stream has id: 2. [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [HSV Recording Process] Stream command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -use_wallclock_as_timestamps 1 -i tcp://127.0.0.1:19668 -i tcp://127.0.0.1:12303 -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level:v 4.0 -filter:v scale='min(1920,iw)':'min(1080,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)2' -b:v 2000k -force_key_frames expr:gte(t,n_forced4) -bsf:a aac_adtstoasc -acodec libfdk_aac -profile:a aac_eld -flags +global_header -b:a 32k -ar 24k -ac 1 -movflags frag_keyframe+empty_moov+default_base_moof -max_muxing_queue_size 1024 -f mp4 tcp://127.0.0.1:19829 -progress tcp://127.0.0.1:17331 [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [HSV Recording Process] Starting video stream: 1920x1080, 30 fps, 2000 kbps [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [HSV Recording Process] Starting audio stream: 24 kHz, 32 kbps, codec: libfdk_aac [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Raw Property Changes: 1142 -47 [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: wifiRssi -47[39m [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: handleSnapshotRequest [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Snapshot requested: 1280 x 720 Doorbell undefined [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Waiting on cloud snapshot... [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: handleSnapshotRequest [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Snapshot requested: 1280 x 720 Doorbell undefined [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Waiting on cloud snapshot... [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: handleSnapshotRequest [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Snapshot requested: 1280 x 720 Doorbell undefined [8/10/2022, 8:47:36 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Waiting on cloud snapshot... [8/10/2022, 8:47:37 AM] [EufySecurity-2.2.0-beta.1] DEBUG: handleSnapshotRequest [8/10/2022, 8:47:37 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Snapshot requested: 1280 x 720 Doorbell undefined [8/10/2022, 8:47:37 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Waiting on cloud snapshot... [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Recording completed (HSV). Send 1278 bytes. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Audiostream was stopped after transmission of 52 data chunks. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Videostream was stopped after transmission of 49 data chunks. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell One stream instance (id: 2) released livestream. There are now 0 instance(s) using the livestream. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell All proxy instances to the livestream have terminated. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Stopping station livestream. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell Chime station livestream for Doorbell has stopped. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [HSV Recording Process] process started. Getting the first response took 3.087 seconds. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: end of recording acknowledged! [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell Closing recording process [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Stopping recording session. [8/10/2022, 8:47:39 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [HSV Recording Process] FFmpeg exited with code: null and signal: SIGKILL (Forced) [Doorbell DB8B] The image snapshot handler for the given accessory is slow to respond! See https://homebridge.io/w/JtMGR for more info. [Doorbell DB8B] The image snapshot handler for the given accessory is slow to respond! See https://homebridge.io/w/JtMGR for more info. [Doorbell DB8B] The image snapshot handler for the given accessory is slow to respond! See https://homebridge.io/w/JtMGR for more info. [Doorbell DB8B] The image snapshot handler for the given accessory is slow to respond! See https://homebridge.io/w/JtMGR for more info. [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: ringing false [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell stored new snapshot from cloud in memory. [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell cloud snapshot is most recent one. Storing this for future use. [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] Process command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)*2' -f image2 pipe:1 -progress tcp://127.0.0.1:13419 [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] Process command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)*2' -f image2 pipe:1 -progress tcp://127.0.0.1:19192 [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] Process command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)*2' -f image2 pipe:1 -progress tcp://127.0.0.1:13586 [8/10/2022, 8:47:47 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] Process command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)*2' -f image2 pipe:1 -progress tcp://127.0.0.1:19531 [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] process started. Getting the first response took 0.101 seconds. [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: snapshot byte lenght: 47583 [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] process started. Getting the first response took 0.069 seconds. [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] process started. Getting the first response took 0.084 seconds. [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] process started. Getting the first response took 0.099 seconds. [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: snapshot byte lenght: 47583 [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: snapshot byte lenght: 47583 [8/10/2022, 8:47:48 AM] [EufySecurity-2.2.0-beta.1] DEBUG: snapshot byte lenght: 47583 [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceMotionDetected: false [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceMotionDetection: false [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceBattery: 98 [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceMotionDetected: false [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET EventSnapshotsActive: 1 [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET HomeKitCameraActive: 1 [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET PeriodicSnapshotsActive: 1 [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceEnabled: true [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceStatusLed: false [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell GET DeviceMotionDetection: false [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: handleSnapshotRequest [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Snapshot requested: 1280 x 720 Doorbell undefined [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] Process command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -i pipe: -frames:v 1 -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)*2' -f image2 pipe:1 -progress tcp://127.0.0.1:13147 [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Snapshot Resize Process] process started. Getting the first response took 0.055 seconds. [8/10/2022, 8:49:52 AM] [EufySecurity-2.2.0-beta.1] DEBUG: snapshot byte lenght: 47583 [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell stream prepare request with session id f368ff00-f793-4f23-ad94-fc635e0b23ad was received. [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Received request to start stream with id f368ff00-f793-4f23-ad94-fc635e0b23ad [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell VIDEOCONFIG: {"audio":true} [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell RTSP rtspStream:false [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Looks like not compatible with RTSP [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell New instance requests livestream. There were 0 instance(s) using the livestream until now. [8/10/2022, 8:49:53 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Start new station livestream (P2P Session)... [8/10/2022, 8:49:54 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Raw Property Changes: 1142 -53 [8/10/2022, 8:49:54 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: wifiRssi -53 [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell Chime station livestream (P2P session) for Doorbell has started. [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Stream metadata: {"videoCodec":0,"videoFPS":15,"videoHeight":480,"videoWidth":640,"audioCodec":1} [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell New livestream started. Proxy stream has id: 3. [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Video Process] Stream command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -use_wallclock_as_timestamps 1 -i tcp://127.0.0.1:11762 -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -preset ultrafast -tune zerolatency -filter:v scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease,scale='trunc(iw/2)*2:trunc(ih/2)*2' -b:v 299k -bufsize 598k -maxrate 299k -payload_type 99 -ssrc 2280254 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params 9+b6VDsLBAgvq9pTiv4uUpfLgKU5czaj4bKZ40n5 srtp://192.168.1.2:49803?rtcpport=49803&pkt_size=1128 -i tcp://127.0.0.1:10695 -vn -sn -dn -acodec libfdk_aac -profile:a aac_eld -flags +global_header -b:a 24k -ar 16k -ac 1 -payload_type 110 -ssrc 6824929 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params bV5IAh2Q5LA5LJQg/bmIFw8d9aWgkWUaUZqxyrIx srtp://192.168.1.2:49668?rtcpport=49668&pkt_size=188 -progress tcp://127.0.0.1:11772 [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [Video Process] Starting video stream: 1280x720, 30 fps, 299 kbps [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [Video Process] Starting audio stream: 16 kHz, 24 kbps, codec: libfdk_aac [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Talkback Process] Stream command: /homebridge/node_modules/homebridge-eufy-security/node_modules/ffmpeg-for-homebridge/ffmpeg -hide_banner -loglevel level+verbose -protocol_whitelist pipe,udp,rtp,file,crypto,tcp -f sdp -c:a libfdk_aac -i tcp://127.0.0.1:11320 -vn -sn -dn -acodec libfdk_aac -b:a 20k -ar 16k -ac 1 -f adts pipe:1 -progress tcp://127.0.0.1:18470 [8/10/2022, 8:49:55 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [Talkback Process] Starting audio stream: 16 kHz, 20 kbps, codec: libfdk_aac [8/10/2022, 8:49:56 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Raw Property Changes: 1142 -55 [8/10/2022, 8:49:56 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: wifiRssi -55 [8/10/2022, 8:49:58 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Raw Property Changes: 1142 -56 [8/10/2022, 8:49:58 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Property Changes: wifiRssi -56 [8/10/2022, 8:49:58 AM] [EufySecurity-2.2.0-beta.1] DEBUG: [Doorbell] [Video Process] process started. Getting the first response took 2.862 seconds. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Receive Apple HK Stop request{"sessionID":"f368ff00-f793-4f23-ad94-fc635e0b23ad","type":"stop"} [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Stopping session with id: f368ff00-f793-4f23-ad94-fc635e0b23ad [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell RTSP rtspStream:false [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Looks like not compatible with RTSP [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Audiostream was stopped after transmission of 97 data chunks. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Videostream was stopped after transmission of 99 data chunks. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell One stream instance (id: 3) released livestream. There are now 0 instance(s) using the livestream. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell All proxy instances to the livestream have terminated. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] DEBUG: Doorbell Stopping station livestream. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell Stopped video stream. [8/10/2022, 8:50:01 AM] [EufySecurity-2.2.0-beta.1] INFO: Doorbell Chime station livestream for Doorbell has stopped. [8/10/2022, 8:50:03 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [Talkback Process] FFmpeg exited with code: null and signal: SIGKILL (Forced) [8/10/2022, 8:50:03 AM] [EufySecurity-2.2.0-beta.1] INFO: [Doorbell] [Video Process] FFmpeg exited with code: null and signal: SIGKILL (Forced)

DaveM8686 avatar Aug 09 '22 23:08 DaveM8686

  1. yes, correct
  2. T8210 (battery camera doorbell)
  3. see a snippet of the log:

... I'll get in touch via discord when I've sorted out my issue with Discord.

At first I didn't see a timeline either. I didn't have notifications for motion active and I didn't have an activity zone setup either. Once I added both of these I still didn't get a time line when opening the feed from the Home app. It wasn't until I received a motion notification and clicked on it to open the notifications that I got the timeline. I now see the timeline when I open the live stream.

Hey @andyrooo82

The activity zone is actually not necessary. This just determines which zones in the image is analysed by the apple servers. If you disable it, the whole image will be processed.

thieren avatar Aug 10 '22 04:08 thieren

@DaveM8686

So the recording process is starting correctly for you at least.

But a few observations:

  1. it states that your video from the doorbell is just 640x480. That's the raw video format from your device and I didn't know it could go this low. Is there a setting in your eufy app, where you can increase this maybe? I'll have to test if 'video quality' would influence this.

Since HKS is very picky about it's stream configuration that it receives, it could be that.

  1. The recording process is ended (without error) before the encoding process even could start. I don't see why this is - has maybe something to do with 1. but am not sure yet.

  2. What hardware are you running on? If it doesn't have the needed computing power for HKSV, I am afraid it will be hard to get working for you. Had a few users now that have problems running this with a RPi.

thieren avatar Aug 10 '22 04:08 thieren

@thieren, thanks for the replies.

  1. I've got it set to Low Quality in the Eufy app based on the setting in the plugin that says doing so will help speed up live stream and notification connections, but I've now changed that to High to see if it makes a difference.
  2. Not sure about this one, but I guess we'll see.
  3. I'm running it on a Synology NAS through Docker. Do you think that could be the problem?

DaveM8686 avatar Aug 10 '22 05:08 DaveM8686

I'm running it on a Synology NAS through Docker. Do you think that could be the problem?

Could well be. You can try the 'copy' preset in advanced video config. Some users have reported good results with this.

thieren avatar Aug 10 '22 05:08 thieren