homebridge-eufy-security / plugin

Homebridge plugin to control certain Eufy Security devices
Apache License 2.0
167 stars 23 forks source link

[Bug]: Cameras not responding in homekit #20

Closed ziggitipop closed 2 years ago

ziggitipop commented 2 years ago

What happened?

They show up as cameras in homekit but they don't stream at all.

Device Type

Doorbell (Supported)

Plugin Version

v1.0.x (Supported)

HomeBridge Version

v1.4.x (Supported)

NodeJS Version

v12 (Supported)

Operating System

Mac OS X 11+ (Supported)

Relevant log output

[5/4/2022, 4:15:16 PM] [EufySecurity] Backyard FFmpeg process creation failed: spawn ffmpeg ENOENT
[Backyard] Snapshot request handler provided empty image buffer!
[5/4/2022, 4:15:18 PM] [EufySecurity] Doorbell FFmpeg process creation failed: spawn ffmpeg ENOENT
[Doorbell] Snapshot request handler provided empty image buffer!
github-actions[bot] commented 2 years ago

Did you check this Common Issues pages ?

lenoxys commented 2 years ago

Hello please use the beta version

ziggitipop commented 2 years ago

Hello please use the beta version

I am on Beta

lenoxys commented 2 years ago

Can you enable debug mode and send us the log ?

https://github.com/homebridge-eufy-security/plugin/wiki/Basic-Troubleshooting#debug-mode

dan1916 commented 2 years ago

Same issue. After moving to the beta version, my Eufy Solocam stopped working in Homekit with this plugin. The cameras can change modes, but when one tries to play the live stream, it says not responding.

dewoert commented 2 years ago

My doorbell also stopped working since v2.0.0-beta.3 Was working fine with v2.0.0-beta.2 Log when starting camera:

TypeError: this.platform.eufyClient.getStationDevice(...).getSerial is not a function
    at Station.<anonymous> (/homebridge/node_modules/homebridge-eufy-security/src/accessories/streamingDelegate.ts:213:93)
    at Station.emit (node:events:538:35)
    at Station.onStartLivestream (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/station.ts:450:14)
    at P2PClientProtocol.<anonymous> (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/station.ts:57:148)
    at P2PClientProtocol.emit (node:events:526:28)
    at P2PClientProtocol.emitStreamStartEvent (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1556:18)
    at P2PClientProtocol.handleDataBinaryAndVideo (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1216:34)
    at P2PClientProtocol.handleData (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1028:18)
    at P2PClientProtocol.parseDataMessage (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:954:26)
    at P2PClientProtocol.handleMsg (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:776:26)
kempkenj commented 2 years ago

Hi, same version, same error.

TypeError: this.platform.eufyClient.getStationDevice(...).getSerial is not a function
    at Station.<anonymous> (/homebridge/node_modules/homebridge-eufy-security/src/accessories/streamingDelegate.ts:213:93)
    at Station.emit (node:events:538:35)
    at Station.onStartLivestream (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/station.ts:450:14)
    at P2PClientProtocol.<anonymous> (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/http/station.ts:57:148)
    at P2PClientProtocol.emit (node:events:526:28)
    at P2PClientProtocol.emitStreamStartEvent (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1556:18)
    at P2PClientProtocol.handleDataBinaryAndVideo (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1216:34)
    at P2PClientProtocol.handleData (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1028:18)
    at P2PClientProtocol.parseDataMessage (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:954:26)
    at P2PClientProtocol.handleMsg (/homebridge/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:776:26)
lenoxys commented 2 years ago

Should be fix on the latest beta

dewoert commented 2 years ago

Should be fix on the latest beta

Install latest beta, and working fine again.

ziggitipop commented 2 years ago

Can you enable debug mode and send us the log ?

https://github.com/homebridge-eufy-security/plugin/wiki/Basic-Troubleshooting#debug-mode

Here you go
[5/5/2022, 4:55:15 PM] [EufySecurity] Doorbell GET DeviceBattery: 53
[5/5/2022, 4:55:15 PM] [EufySecurity] Doorbell GET EventSnapshotsActive: 0
[5/5/2022, 4:55:15 PM] [EufySecurity] Doorbell GET HomeKitCameraActive: 0
[5/5/2022, 4:55:15 PM] [EufySecurity] Doorbell GET DeviceEnabled: true
[5/5/2022, 4:55:15 PM] [EufySecurity] Doorbell GET DeviceStatusLed: true
[5/5/2022, 4:55:15 PM] [EufySecurity] Doorbell GET DeviceMotionDetected: false
[5/5/2022, 4:55:16 PM] [EufySecurity] Doorbell RTSP rtspStream:false
[5/5/2022, 4:55:16 PM] [EufySecurity] Doorbell Looks like not compatible with RTSP
[5/5/2022, 4:55:18 PM] [webostv] [TV] Connecting to TV
[5/5/2022, 4:55:18 PM] [EufySecurity] current_path /Users/ZIG/.homebridge/eufysecurity/2.sock
[5/5/2022, 4:55:18 PM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories
[5/5/2022, 4:55:18 PM] [EufySecurity] current_path /Users/ZIG/.homebridge/eufysecurity/4.sock
[5/5/2022, 4:55:18 PM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell VIDEOCONFIG: {"stillImageSource":"-i https://cdn-eu.eufylife.com/thumb/2022/05/05/station/T8010P132129146B/FpOF8x6RUET4xcSQ.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJYLV2KOLW6PU4FSA%2F20220505%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=2080b6b4d91e193fea57f34ceaa5312617b76bba3812edec","maxWidth":640,"maxHeight":480,"maxFPS":10,"maxStreams":2,"maxBitrate":99,"vcodec":"libx264","packetSize":188,"source":"-i unix:/Users/ZIG/.homebridge/eufysecurity/2.sock","acodec":"libfdk_aac","encoderOptions":"-preset ultrafast -tune zerolatency","forceMax":false}
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell Starting video stream: 640x480, 30 fps, 299 kbps 
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell Stream command: ffmpeg -hide_banner -loglevel level -use_wallclock_as_timestamps 1 -i unix:/Users/ZIG/.homebridge/eufysecurity/2.sock -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(640,iw)':'min(480,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 16493496 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params o4B50sQVALRg/CUBORapFtm60z51FWer0NAH3c0L srtp://192.168.86.54:54674?rtcpport=54674&pkt_size=188 -i unix:/Users/ZIG/.homebridge/eufysecurity/4.sock -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 4603394 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params EqkLdwhcw+5OSXecal05iURUrdhq1CWSAnjWHo9V srtp://192.168.86.54:62071?rtcpport=62071&pkt_size=188 -progress pipe:1
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell FFmpeg process creation failed: spawn ffmpeg ENOENT
[5/5/2022, 4:55:18 PM] [EufySecurity] Stopping session with id: 7c321ea6-598b-42b6-b6d3-9cbf9ebcf13c
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell_video Closed NamePipeStream
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell_audio Closed NamePipeStream
[5/5/2022, 4:55:18 PM] [EufySecurity] Doorbell Stopped video stream.'
lenoxys commented 2 years ago

Are you sure you're using the latest beta ? Can you check here if it's the case ? https://github.com/homebridge-eufy-security/plugin/wiki/Beta-Version

I don't see the version of the plugin which should be appear like that :

[5/5/2022, 3:13:46 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Salle à manger ON handlePropertyChange: { name: 'currentMode', value: 1 }
[5/5/2022, 3:13:46 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Salle à manger Raw Property Changes: 1151 1
[5/5/2022, 3:13:51 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Push Connected!
[5/5/2022, 3:14:24 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Doorbell Raw Property Changes: 2111 3
[5/5/2022, 3:14:24 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Doorbell Property Changes: chargingStatus 3
dan1916 commented 2 years ago

I am on EufySecurity-2.0.0-beta.4 with DEBUG mode on. But whenever I try to play the camera stream, it does not log anything on homebridge, not even a line, and right away says the camera is not responding in the home app.

ziggitipop commented 2 years ago

Are you sure you're using the latest beta ? Can you check here if it's the case ? https://github.com/homebridge-eufy-security/plugin/wiki/Beta-Version

I don't see the version of the plugin which should be appear like that :

[5/5/2022, 3:13:46 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Salle à manger ON handlePropertyChange: { name: 'currentMode', value: 1 }
[5/5/2022, 3:13:46 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Salle à manger Raw Property Changes: 1151 1
[5/5/2022, 3:13:51 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Push Connected!
[5/5/2022, 3:14:24 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Doorbell Raw Property Changes: 2111 3
[5/5/2022, 3:14:24 PM] [EufySecurity-2.0.0-beta.4] DEBUG: Doorbell Property Changes: chargingStatus 3

I'm on the 2.0.0-beta.4 version. I'm copying the logs from the homebridge homepage on mac. Is there somewhere else I should be getting the logs from?

ziggitipop commented 2 years ago

Here are some log readings from my indoor 2k camera which also doesn't stream.

[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room GET DeviceEnabled: true
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room GET DeviceStatusLed: true
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room GET DeviceMotionDetected: false
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room GET DeviceEnabled: true
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room GET DeviceMotionDetection: true
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room RTSP rtspStream:true
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room RTSP cameraConfig: true
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room RTSP false
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room : RTSP capabilities not enabled. You will need to do it manually!
[5/6/2022, 10:14:53 AM] [EufySecurity] current_path /Users/ZIG/.homebridge/eufysecurity/2.sock
[5/6/2022, 10:14:53 AM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories
[5/6/2022, 10:14:53 AM] [EufySecurity] current_path /Users/ZIG/.homebridge/eufysecurity/4.sock
[5/6/2022, 10:14:53 AM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room VIDEOCONFIG: {"audio":true,"stillImageSource":"-i https://cdn-eu.eufylife.com/thumb/2022/05/06/station/T8400P3121380698/lNMbF3sdOuAv8hBK.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJYLV2KOLW6PU4FSA%2F20220506%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220506T061400Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=ddfa158ef2710cf8cba05fbab1e9c75cf818d04f71d26e93830393c9971a6baf","maxWidth":640,"maxHeight":480,"maxFPS":10,"maxStreams":2,"maxBitrate":99,"vcodec":"libx264","packetSize":188,"source":"-i unix:/Users/ZIG/.homebridge/eufysecurity/2.sock","acodec":"libfdk_aac","encoderOptions":"-preset ultrafast -tune zerolatency","forceMax":false}
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room Starting video stream: 640x480, 30 fps, 299 kbps  (AAC-eld)
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room Stream command: ffmpeg -hide_banner -loglevel level -use_wallclock_as_timestamps 1 -i unix:/Users/ZIG/.homebridge/eufysecurity/2.sock -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(640,iw)':'min(480,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 5439332 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params zfx7kkYHDS0Dec0DhLHMnvVxI7ieS79gak+cHl7g srtp://192.168.86.54:50540?rtcpport=50540&pkt_size=188 -i unix:/Users/ZIG/.homebridge/eufysecurity/4.sock -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 7925571 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params SDIxe9BzM7j6KDvyCpFPzcwp0DO3ATOm6rwU05X/ srtp://192.168.86.54:57315?rtcpport=57315&pkt_size=188 -progress pipe:1
[5/6/2022, 10:14:53 AM] [EufySecurity] Living Room FFmpeg process creation failed: spawn ffmpeg ENOENT
[5/6/2022, 10:14:53 AM] [EufySecurity] Stopping session with id: e0b3172a-bac0-4b5f-9846-2fb88add7e17
[5/6/2022, 10:14:54 AM] [EufySecurity] Living Room Stopped video stream.
[5/6/2022, 10:14:54 AM] [Hue] Philips hue: request 15: GET /lights
[5/6/2022, 10:14:54 AM] [Hue] Philips hue: request 15: 200 OK
[5/6/2022, 10:14:55 AM] [webostv] [TV] Connecting to TV
[5/6/2022, 10:14:55 AM] [homebridge-dyson-pure-cool] YN6-SA-NNA0922A - MQTT message received: {"msg":"CURRENT-STATE","time":"2022-05-06T06:14:56.000Z","mode-reason":"ALXA","state-reason":"MODE","rssi":"-44","channel":"1","fqhp":"99920","fghp":"70280","product-state":{"fpwr":"ON","auto":"ON","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"11E1","wacd":"NONE","nmdv":"0004","fnsp":"AUTO","bril":"0002","corf":"ON","cflr":"0073","hflr":"0073","cflt":"CARF","hflt":"GHEP","sltm":"OFF","osal":"0175","osau":"0220","ancp":"CUST","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
[5/6/2022, 10:14:55 AM] [homebridge-dyson-pure-cool] YN6-SA-NNA0922A - MQTT message received: {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2022-05-06T06:14:56.000Z","data":{"tact":"2982","hact":"0053","pm25":"0015","pm10":"0012","va10":"0011","noxl":"0000","p25r":"0016","p10r":"0020","sltm":"OFF"}}
lenoxys commented 2 years ago

Which version of Mac OS are you using ?

ziggitipop commented 2 years ago

Big Sur 11.6.5

dan1916 commented 2 years ago

I am on Monterey 12.3.1 and I do not even see any traces of RTSP or live stream mentioned in the debug logs.

lenoxys commented 2 years ago

Big Sur 11.6.5

looks like an FFMPEG issue, can you test this : https://formulae.brew.sh/formula/ffmpeg

lenoxys commented 2 years ago

I am on Monterey 12.3.1 and I do not even see any traces of RTSP or live stream mentioned in the debug logs.

Did you see such log appear (you need to enable debug mode within advanced plugin setting first) when doing a livestream :

[5/6/2022, 10:14:53 AM] [EufySecurity] XXXXXXXXX command: ffmpeg -hide_banner -loglevel level -use_wallclock_as_timestamps 1 -i unix:/Users/ZIG/.homebridge/eufysecurity/2.sock -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(640,iw)':'min(480,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 5439332 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params zfx7kkYHDS0Dec0DhLHMnvVxI7ieS79gak+cHl7g srtp://192.168.86.54:50540?rtcpport=50540&pkt_size=188 -i unix:/Users/ZIG/.homebridge/eufysecurity/4.sock -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 7925571 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params SDIxe9BzM7j6KDvyCpFPzcwp0DO3ATOm6rwU05X/ srtp://192.168.86.54:57315?rtcpport=57315&pkt_size=188 -progress pipe:1
[5/6/2022, 10:14:53 AM] [EufySecurity] XXXXXXXXX  FFmpeg process creation failed: spawn ffmpeg ENOENT
ziggitipop commented 2 years ago

I installed FFMPEG, now I get the following errors:

[5/7/2022, 9:26:53 AM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories
[5/7/2022, 9:26:53 AM] [EufySecurity] Doorbell VIDEOCONFIG: {"audio":true,"stillImageSource":"-i https://cdn-eu.eufylife.com/thumb/2022/05/07/station/T8010P132129146B/UXp4fCdeH0MIQAZF.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJYLV2KOLW6PU4FSA%2F20220507%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220507T052501Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=984575d7b11c6c2c59906d63aabe6f7035681f552882a1f69a8b3b31ea4d7c95","maxWidth":640,"maxHeight":480,"maxFPS":10,"maxStreams":2,"maxBitrate":99,"vcodec":"libx264","packetSize":188,"source":"-i unix:/Users/ZIG/.homebridge/eufysecurity/6.sock","acodec":"libfdk_aac","encoderOptions":"-preset ultrafast -tune zerolatency","forceMax":false}
[5/7/2022, 9:26:53 AM] [EufySecurity] Doorbell Starting video stream: 640x480, 30 fps, 299 kbps  (AAC-eld)
[5/7/2022, 9:26:53 AM] [EufySecurity] Doorbell Stream command: ffmpeg -hide_banner -loglevel level -use_wallclock_as_timestamps 1 -i unix:/Users/ZIG/.homebridge/eufysecurity/6.sock -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(640,iw)':'min(480,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 8374639 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params hLaitgD6D8y9bVise257JB8R7wHc7EDnVy1TmpuF srtp://192.168.86.54:63312?rtcpport=63312&pkt_size=188 -i unix:/Users/ZIG/.homebridge/eufysecurity/8.sock -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 16580890 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params fU3t4BJlGO94EK0u9BirrpCzxhsyu0pg/S/SZWqc srtp://192.168.86.54:65225?rtcpport=65225&pkt_size=188 -progress pipe:1
[5/7/2022, 9:26:56 AM] [EufySecurity] Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
[5/7/2022, 9:26:56 AM] [EufySecurity] ErrorCode EPIPE
[5/7/2022, 9:26:56 AM] [EufySecurity] Doorbell_video Closed NamePipeStream
[5/7/2022, 9:26:56 AM] [EufySecurity] Error: This socket has been ended by the other party
    at Socket.writeAfterFIN [as write] (node:net:487:14)
    at Readable.ondata (node:internal/streams/readable:754:22)
    at Readable.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Readable.push (node:internal/streams/readable:228:10)
    at P2PClientProtocol.handleDataBinaryAndVideo (/usr/local/lib/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1220:77)
    at P2PClientProtocol.handleData (/usr/local/lib/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:1028:18)
    at P2PClientProtocol.parseDataMessage (/usr/local/lib/node_modules/homebridge-eufy-security/node_modules/eufy-security-client/src/p2p/session.ts:954:26) {
  code: 'EPIPE'
}
[5/7/2022, 9:26:56 AM] [EufySecurity] ErrorCode EPIPE
[5/7/2022, 9:26:56 AM] [EufySecurity] Doorbell_audio Closed NamePipeStream
[5/7/2022, 9:26:56 AM] [EufySecurity] Doorbell FFmpeg exited with code: 1 and signal: null (Error)
[5/7/2022, 9:26:56 AM] [EufySecurity] Stopping session with id: da3f32a9-7568-498c-828b-be9667da5c44
[5/7/2022, 9:26:56 AM] [EufySecurity] Doorbell_video Closed NamePipeStream
[5/7/2022, 9:26:56 AM] [EufySecurity] Doorbell_audio Closed NamePipeStream
[5/7/2022, 9:26:56 AM] [EufySecurity] Doorbell Stopped video stream.
dan1916 commented 2 years ago

@lenoxys In my case, sorry it was my mistake. The cameras were loaded as motion sensors only. I did not realize this. So even though it was showing camera with controls in the Home app, it could not play it. Perhaps a warning of some sort to let others like me know the fact that cameras are loaded as motion sensor only would help.

lenoxys commented 2 years ago

@lenoxys In my case, sorry it was my mistake. The cameras were loaded as motion sensors only. I did not realize this. So even though it was showing camera with controls in the Home app, it could not play it. Perhaps a warning of some sort to let others like me know the fact that cameras are loaded as motion sensor only would help.

Yeah I've one display when opening the plug-in settings. But looks like no one notice it.

lenoxys commented 2 years ago

@ziggitipop

Hum. Looks like it use an old FFMPEG not the one you installed.

Can you look it by running this command?

pwd ffmpeg
ziggitipop commented 2 years ago

@ziggitipop

Hum. Looks like it use an old FFMPEG not the one you installed.

Can you look it by running this command?

pwd ffmpeg

Can you tell me where to run it? I ran it in terminal but I got a "command not found" error. Sorry I don't have much experience in this.

ziggitipop commented 2 years ago

I updated FFMPEG and was able to access my doorbell camera only through my apple tv, still get no response when trying to access it through the home app on my iphone.

Here is the log for when I try to access doorbell camera through my phone:

[5/9/2022, 2:31:35 PM] [EufySecurity] current_path /Users/ZIG/.homebridge/eufysecurity/122.sock [5/9/2022, 2:31:35 PM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories [5/9/2022, 2:31:35 PM] [EufySecurity] current_path /Users/ZIG/.homebridge/eufysecurity/124.sock [5/9/2022, 2:31:35 PM] [EufySecurity] parent_dir /usr/local/lib/node_modules/homebridge-eufy-security/dist/accessories [5/9/2022, 2:31:35 PM] [EufySecurity] Doorbell VIDEOCONFIG: {"audio":true,"stillImageSource":"-i https://cdn-eu.eufylife.com/thumb/2022/05/09/station/T8010P132129146B/7ZPV5MUd5tLSm9V4.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJYLV2KOLW6PU4FSA%2F20220509%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Date=20220509T101702Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=9f4d29d40059d75e0b8fceb1ee0b6c5da6b25bd0eef4d8582af5ff95619d7602","maxWidth":640,"maxHeight":480,"maxFPS":10,"maxStreams":2,"maxBitrate":99,"vcodec":"libx264","packetSize":188,"source":"-i unix:/Users/ZIG/.homebridge/eufysecurity/122.sock","acodec":"libfdk_aac","encoderOptions":"-preset ultrafast -tune zerolatency","forceMax":false} [5/9/2022, 2:31:35 PM] [EufySecurity] Doorbell Starting video stream: 640x480, 30 fps, 299 kbps (AAC-eld) [5/9/2022, 2:31:35 PM] [EufySecurity] Doorbell Stream command: ffmpeg -hide_banner -loglevel level -use_wallclock_as_timestamps 1 -i unix:/Users/ZIG/.homebridge/eufysecurity/122.sock -an -sn -dn -r 30 -vcodec libx264 -pix_fmt yuv420p -color_range mpeg -f rawvideo -preset ultrafast -tune zerolatency -filter:v scale='min(640,iw)':'min(480,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 4145917 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params niLLHNbUoUukmeADfBQYciKPlYiIfBAKFYtZhNy0 srtp://192.168.86.39:65051?rtcpport=65051&pkt_size=188 -i unix:/Users/ZIG/.homebridge/eufysecurity/124.sock -vn -sn -dn -codec:a libfdk_aac -profile:a aac_eld -flags +global_header -ar 16k -b:a 24k -ac 1 -payload_type 110 -ssrc 9928760 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params mKNQEaBBY6u3iuO75xP9y5hV6CU46P8Xh/Wjyfas srtp://192.168.86.39:57297?rtcpport=57297&pkt_size=188 -progress pipe:1 [5/9/2022, 2:31:38 PM] [EufySecurity] Doorbell Getting the first frames took 3.113 seconds. [5/9/2022, 2:31:39 PM] [EufySecurity] Doorbell Device appears to be inactive. Stopping video stream. [5/9/2022, 2:31:39 PM] [EufySecurity] Stopping session with id: 23a020f2-8d5c-462e-b10c-ddc962a6502e [5/9/2022, 2:31:39 PM] [EufySecurity] Doorbell_video Closed NamePipeStream [5/9/2022, 2:31:39 PM] [EufySecurity] Doorbell_audio Closed NamePipeStream [5/9/2022, 2:31:39 PM] [EufySecurity] Doorbell Stopped video stream. [5/9/2022, 2:31:39 PM] [EufySecurity] Error: write EPIPE at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) { errno: -32, code: 'EPIPE', syscall: 'write' } [5/9/2022, 2:31:39 PM] [EufySecurity] ErrorCode EPIPE [5/9/2022, 2:31:39 PM] [EufySecurity] Doorbell_video Closed NamePipeStream [5/9/2022, 2:31:39 PM] [EufySecurity] Doorbell FFmpeg exited with code: 0 and signal: null (Expected)

Here is the log when I access it from apple tv:

[5/9/2022, 2:35:15 PM] [EufySecurity] Doorbell Receive Apple HK Stop request{"sessionID":"9da6db7d-48ba-474f-86fa-9900ca06ca21","type":"stop"} [5/9/2022, 2:35:15 PM] [EufySecurity] Stopping session with id: 9da6db7d-48ba-474f-86fa-9900ca06ca21 [5/9/2022, 2:35:15 PM] [EufySecurity] Doorbell_video Closed NamePipeStream [5/9/2022, 2:35:15 PM] [EufySecurity] Doorbell_audio Closed NamePipeStream [5/9/2022, 2:35:15 PM] [EufySecurity] Doorbell Stopped video stream. [5/9/2022, 2:35:17 PM] [EufySecurity] Doorbell FFmpeg exited with code: null and signal: SIGKILL (Forced)

JonoHaysom commented 2 years ago

i too have this issue

[Doorbell] Snapshot request handler provided empty image buffer! [5/21/2022, 11:10:26 AM] [EufySecurity-2.0.0-beta.9] WARN: Push Closed! [5/21/2022, 11:11:06 AM] [EufySecurity-2.0.0-beta.9] ERROR: Doorbell FFmpeg process creation failed: spawn ffmpeg ENOENT [Doorbell] Snapshot request handler provided empty image buffer!

ive checked common issues and I had streaming working in the last 1.0.8 build. ive trashed and reloaded the plugin too. is there a command to update ffmpeg other than the one listed in the common issues section?

thieren commented 2 years ago

The streaming process was changed quite a bit with the latest releases. If anyone is still experiencing issues, please let me know.