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.58k stars 158 forks source link

Camera feed crashes on wyze app when server is up #656

Open KhantheDalek opened 1 year ago

KhantheDalek commented 1 year ago

I have just installed DWB on my raspberry pi 4 running homebridge. I have noticed when I have the bridge running and I open the wyze app to view the streams the app can't establish a connection to the cameras.

mrlt8 commented 1 year ago

Hmm, do you get an error in the app? Are your cameras on the latest firmware? Does changing the stream quality (SD/HD icon) in the app help?

jfarmer08 commented 1 year ago

I have the same issue. All devices go offline whenever running. It also causes my wyze homebridge plugin to return undefined for all calls. I can try and pull logs at a later date. Just to note after stopping the container alls devices come back online.

mrlt8 commented 1 year ago

wifi is probably getting flooded by multiple cameras.

can you see if setting the bridge to on-demand mode helps?

  environment:
    - ON_DEMAND=True
jfarmer08 commented 1 year ago

I enable the setting. And so far yes the devices are still on online. I have one rtsp stream going to homebridge and it seems to be working ok.

Now I do have 13 cameras and about 84 other wyze devices. No they are not all on the same wifi network. So the on-demand flag can you explain more of what's it's doing? I will let the system run for while and see what happens.

mrlt8 commented 1 year ago

By default, the bridge will try to connect to all the cameras on the account so that the streams are always available.

When on_demand mode is enabled, the bridge will only connect to the camera when someone requests one of the streams and then disconnects when the stream is closed.

jfarmer08 commented 1 year ago

Thank you for the answer. This seems to help a lot and I thought my network was doing good. Are there any recommendations on this subject like number of cameras or setup? The goal would be to use all cameras live stream for a display.

mrlt8 commented 1 year ago

You may need to tweak your router settings related to IGMP, multicasting, and beam forming.

Would be interesting to see what the simultaneous connection limit would be.

jfarmer08 commented 1 year ago

So the limit i hit is around 3 to 4. With 3 everthing comes online and goes offline, but with 4 everything goes offline.

mrlt8 commented 1 year ago

Hmm seems like your network is getting choked with the UDP traffic.

Unifi router/network by any chance? Those seem to really struggle with the wyze cameras for some reason.

talormanda commented 1 year ago

Hmm seems like your network is getting choked with the UDP traffic.

Unifi router/network by any chance? Those seem to really struggle with the wyze cameras for some reason.

I just installed a ubiquiti and my network loads instantly on the wyze app for my 20+ cameras, not sure if this is necessarily true. My old setup with tp-link choked under load.

ScottySTL commented 1 year ago

The ON_DEMAND setting helped me as well (and I use Unifi networking equipment)

James62370 commented 1 year ago

My system was choking as well, the ON_DEMAND setting stablized all of my wyze devices.

csdozier commented 1 year ago

I still have the issue with the ON_DEMAND setting as well. If I do 2-3 cameras, its fine, but if I go beyond that, everything goes down.
I've also got tp-link deco wifi6 mesh routers.. I see that mentioned above, maybe something with tp-link? Tp-link doesnt have any real customization in the deco app.

talormanda commented 1 year ago

I still have the issue with the ON_DEMAND setting as well. If I do 2-3 cameras, its fine, but if I go beyond that, everything goes down. I've also got tp-link deco wifi6 mesh routers.. I see that mentioned above, maybe something with tp-link? Tp-link doesnt have any real customization in the deco app.

Agreed. I can pull up the feeds one-by-one with the WebRTC/HLS/RTMP/RTSP link, but, using the webpage to view the static images is just junk and doesn't work. I have over 20 cameras.

James62370 commented 1 year ago

I should clarify that with the ON_DEMAND setting, I'm able to use the Wyze App along with this wyze-bridge setup. In the past, whenever I tried this, many of my Wyze devices would start dropping off making the Wyze App itself unuseable. For me, the ON_DEMAND setting has greatly helped with that. But as user jfarmer08 above mentions, I too am only able to get about 3 to 4 cameras working at the same time. I believe this maybe a limitation with the Wyze Servers since even within their app, you cannot stream more than 4 cameras simultaneously. Someone please correct me if I'm wrong. However, I'm still glad to even get a few rtsp streams without needing to modify the firmware on the cameras.

talormanda commented 1 year ago

I should clarify that with the ON_DEMAND setting, I'm able to use the Wyze App along with this wyze-bridge setup. In the past, whenever I tried this, many of my Wyze devices would start dropping off making the Wyze App itself unuseable. For me, the ON_DEMAND setting has greatly helped with that. But as user jfarmer08 above mentions, I too am only able to get about 3 to 4 cameras working at the same time. I believe this maybe a limitation with the Wyze Servers since even within their app, you cannot stream more than 4 cameras simultaneously. Someone please correct me if I'm wrong. However, I'm still glad to even get a few rtsp streams without needing to modify the firmware on the cameras.

This makes sense. You can't really get more than 4 working in landscape, so they might have implemented a limitation to make sure of that.

mrlt8 commented 1 year ago

This is probably a UDP/Multicast issue.

Check your networking gear for anything related with IGMP Snooping/IGMP Proxy/IGMP Version or IPTV related settings.

talormanda commented 1 year ago

This is probably a UDP/Multicast issue.

Check your networking gear for anything related with IGMP Snooping/IGMP Proxy/IGMP Version or IPTV related settings.

Check it and do what? Enable it? Disable it? What is recommended?

image

mrlt8 commented 1 year ago

Enabling should attempt to prevent the packets from getting forwarded everywhere.

talormanda commented 1 year ago

Enabling should attempt to prevent the packets from getting forwarded everywhere.

I will test enabling it.