mrlt8 / docker-wyze-bridge

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container
GNU Affero General Public License v3.0
2.47k stars 151 forks source link

Stream goes down, does not restart. #1018

Closed superdong69 closed 8 months ago

superdong69 commented 8 months ago

I have two Wyze Doorbells, original version. Front Doorbell never has an issue. Added a back doorbell, and it randomly loses connection, and doesn't restart on its own. I have to keep manually starting the stream from within the Wyze Docker Bridge app in HA. Docker Wyze Bridge version 2.4.0 Home Assistant version: 2023.10.3 Home Assistant OS: 11.0 Here's the log:

[WyzeBridge] 📕 Client stopped reading from front-doorbell
[WyzeBridge] 📖 New client reading from front-doorbell
[WyzeBridge] 📕 Client stopped reading from front-doorbell
[WyzeBridge] 📖 New client reading from front-doorbell
[back_doorbell] WARNING: Audio pipe closed
[back_doorbell] [CONTROL] ERROR - error=TutkError(-20018), cmd=('param_info', '1,2,3,4,5,6,7,21,22,27,50')
[front-doorbell] WARNING: Audio pipe closed
[front-doorbell] [CONTROL] ERROR - error=TutkError(-20010), cmd=('param_info', '1,2,3,4,5,6,7,21,22,27,50')
[back_doorbell] Stream did not receive a frame for over 15s
[front-doorbell] Stream did not receive a frame for over 15s
[WyzeBridge] ❌ '/front-doorbell' stream is down
[WyzeBridge] 📕 Client stopped reading from front-doorbell
[WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - Front Doorbell on 192.168.1.32
[front-doorbell] 📡 Getting 180kb/s HD stream (H264/20fps) via LAN mode (WiFi: 100%) FW: 4.25.1.314 🔒 (DTLS) (2/3)
[front-doorbell] 🔊 Audio Enabled - PCM > LIBOPUS/8,000Hz
[front-doorbell] Re-encoding using libx264 [transpose='clock']
[front-doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4)
[WyzeBridge] ✅ '/front-doorbell stream is UP! (3/3)
[WyzeBridge] 📖 New client reading from front-doorbell
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET / HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /static/site.css HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /img/front-doorbell.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /img/back_doorbell.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /static/webrtc.js HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /static/site.js HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /img/back_doorbell.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /img/front-doorbell.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /api/sse_status HTTP/1.1" 200 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /img/back_doorbell.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:17] "GET /img/front-doorbell.jpg HTTP/1.1" 304 -
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:22:44] "GET /api/back_doorbell HTTP/1.1" 200 -
[WyzeBridge] [CONTROL] SET back_doorbell state=start
[WyzeBridge] 🎉 Connecting to WyzeCam Doorbell - Back_doorbell on 192.168.1.37
[WyzeBridge] 172.30.32.2 - - [17/Oct/2023 13:23:06] "GET /api/back_doorbell/state/start HTTP/1.1" 200 -
[back_doorbell] 📡 Getting 180kb/s HD stream (H264/20fps) via LAN mode (WiFi: 99%) FW: 4.25.1.314 🔒 (DTLS) (2/3)
[back_doorbell] 🔊 Audio Enabled - PCM > LIBOPUS/8,000Hz
[back_doorbell] Re-encoding using libx264 [transpose='clock']
[back_doorbell] WARNING: Skipping smaller frame at start of stream (frame_size=4)
mrlt8 commented 8 months ago

You could try setting ON_DEMAND=False to keep the connection open/reconnect on its own. If you still have issues, you may need to tweak your network settings.

superdong69 commented 8 months ago

You could try setting ON_DEMAND=False to keep the connection open/reconnect on its own. If you still have issues, you may need to tweak your network settings.

Ok, where do I make that change? What network settings would I need to adjust and where, on the devices themselves or in the wyze bridge app?

mrlt8 commented 8 months ago

The ON_DEMAND toggle should be in Home Assistant > Setting > Add-ons > Docker Wyze Bridge > Configuration.

As for network setting, some IGMP related setting may need to be tweaked if streaming from multiple cameras at the same time is causing issues. There's an ongoing topic for Unifi gear: https://github.com/mrlt8/docker-wyze-bridge/discussions/891

superdong69 commented 8 months ago

The ON_DEMAND toggle should be in Home Assistant > Setting > Add-ons > Docker Wyze Bridge > Configuration.

As for network setting, some IGMP related setting may need to be tweaked if streaming from multiple cameras at the same time is causing issues. There's an ongoing topic for Unifi gear: #891

Appreciate you! I'll look into it and post my findings. It's weird. Camera hasn't gone down since restating the stream. It's completely random.

superdong69 commented 8 months ago

The ON_DEMAND toggle should be in Home Assistant > Setting > Add-ons > Docker Wyze Bridge > Configuration.

As for network setting, some IGMP related setting may need to be tweaked if streaming from multiple cameras at the same time is causing issues. There's an ongoing topic for Unifi gear: #891

On_demand fixed it. Haven't lost a stream in 2 days. Thanks!