docker-wyze-bridge icon indicating copy to clipboard operation
docker-wyze-bridge copied to clipboard

Support for Wyze Video Doorbell Pro?

Open terryhonn opened this issue 3 years ago • 108 comments

Are there plans to support the new Video Doorbell Pro, model WWVDP? I hope so... if not, who wants to buy a Wyze Video Doorbell Pro? ;-)

terryhonn avatar Jan 07 '22 14:01 terryhonn

I'll have a look at the app.

Is the pro 100% battery operated or can it also be powered like the non pro?

mrlt8 avatar Jan 08 '22 02:01 mrlt8

The Pro has both power options, as well. Thanks for taking a look!

terryhonn avatar Jan 08 '22 03:01 terryhonn

Any chance it works like the WYZEDB3? I don't see anything for WWVDP, ~~so I'm wondering if the pro is actually the WYZEDB3-S?~~

Edit: looks like the pro is actually the GW_BE1

mrlt8 avatar Jan 08 '22 03:01 mrlt8

Edit: looks like the pro is actually the GW_BE1

I don't know if that means it's possible, or not, but if there's anything I can do to help, please let me know!

terryhonn avatar Jan 11 '22 13:01 terryhonn

The doorbell pro seems to be made by Gwell and has a model number of GW_BE1.

Does the doorbell even show up in the bridge? Looks like it might be using their "mars" platform or whatever that is and streams over KVS which is what they're using for the WebRTC streams...

I wonder if they're trying to move away from TUTK to AWS which could be the reason for the forced updates coming next month.

mrlt8 avatar Jan 11 '22 14:01 mrlt8

That's too bad. I really like the doorbell, much more 'polished' than the original, but if I can't consume the stream locally in some way, it doesn't work for me.

Thanks for looking into it though!

On Tue, Jan 11, 2022 at 8:07 AM mrlt8 @.***> wrote:

The doorbell pro seems to be made by Gwell and has a model number of GW_BE1.

Does the doorbell even show up in the bridge? Looks like it might be using their "mars" platform or whatever that is and streams over KVS which is what they're using for the WebRTC streams...

I wonder if they're trying to move away from TUTK to AWS which could be the reason for the forced updates coming next month.

— Reply to this email directly, view it on GitHub https://github.com/mrlt8/docker-wyze-bridge/issues/276#issuecomment-1009997312, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACAD2ME3DO5TB6FNNA5NIN3UVQ2QPANCNFSM5LO4ZWOA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

terryhonn avatar Jan 11 '22 16:01 terryhonn

Does that mean it's a feature that's coming eventually or is it not possible? I also have one of these and I'm willing to do what I can to help test this.

Z1mDMan avatar Feb 21 '22 18:02 Z1mDMan

This bridge is currently based around the cameras that use the Throughtek Kalay SDK "tutk" to stream video. From what I could tell, it seems like the new Doorbell Pro is not using tutk, so we can't use that SDK to connect to the doorbell.

Starting with v1.1.0, we added the option to try to pull the WebRTC credentials if available. You could try adding WEBRTC=True to your docker-compose.yml to see if can pull the credentials of the doorbell.

mrlt8 avatar Feb 25 '22 02:02 mrlt8

Added the WebRTC env to an instance and included the WVDP in the FILTER_NAMES var. When the bridge starts up, it pulls the info for 3 cams and then does this:

Would you rather I open a separate bug report, since this doesn't appear to be directly related to the WVDP?

  File "/app/wyze_bridge.py", line 584, in <module>
    wb.run()
  File "/app/wyze_bridge.py", line 49, in run
    self.get_webrtc()
  File "/app/wyze_bridge.py", line 401, in get_webrtc
    if wss := wyzecam.api.get_cam_webrtc(self.auth, cam.mac):
  File "/app/wyzecam/api.py", line 230, in get_cam_webrtc
    resp.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://webrtc.api.wyze.com/signaling/device/REDACTED/use_trickle=true```

terryhonn avatar Feb 25 '22 16:02 terryhonn

That's a known issue that has already been patched in the dev branch.

It just means the auth tokens are expired and temporarily adding FRESH_DATA=True should get you past that.

mrlt8 avatar Feb 25 '22 23:02 mrlt8

I had tried forcing the fresh data, but still getting the error. I uninstalled and reinstalled (this instance is the HASS Addon, BTW), and enabled WebRTC from the start. It says it's starting 1/11 cameras (I have 12 in the Wyze app, however a few are either disabled or turned off), and it gets through the first 3 and then throws the same error.

  File "/app/wyze_bridge.py", line 584, in <module>
    wb.run()
  File "/app/wyze_bridge.py", line 49, in run
    self.get_webrtc()
  File "/app/wyze_bridge.py", line 401, in get_webrtc
    if wss := wyzecam.api.get_cam_webrtc(self.auth, cam.mac):
  File "/app/wyzecam/api.py", line 230, in get_cam_webrtc
    resp.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://webrtc.api.wyze.com/signaling/device/2CAA8EF6E97F?use_trickle=true

The device it is puking on is a regular Wyze Video Doorbell, not the Pro. Happy to help with debugging, just tell me what to do. Thanks!

terryhonn avatar Feb 26 '22 16:02 terryhonn

I have a Wyze Video Doorbell Pro and was hoping to help test this. I am also getting errors when I try using these environment variables. I removed WEBRTC=True for now. I don't think I'm running the dev branch. Is this working in dev?

Z1mDMan avatar Apr 15 '22 18:04 Z1mDMan

Has anyone tried to see what kind of traffic is going between the app and camera?

@Z1mDMan Could you try blocking your phone or the doorbell from the internet to see if we can even communicate with it locally?

mrlt8 avatar Apr 16 '22 15:04 mrlt8

anyone happen to have the firmware update link for this new model doorbell?

gtxaspec avatar Apr 19 '22 08:04 gtxaspec

I also have a Doorbell Pro and can help with any testing. Would really like to get this working

zenlav avatar Aug 13 '22 21:08 zenlav

Has anyone tried to see what kind of traffic is going between the app and camera?

@Z1mDMan Could you try blocking your phone or the doorbell from the internet to see if we can even communicate with it locally?

Wow sorry I completely missed this. Is this still something that would help? I can easily block things from the internet on my network.

Z1mDMan avatar Aug 26 '22 00:08 Z1mDMan

I see that there's a homebridge plugin that discovers this doorbell however it only shows up as a switch not a camera. https://github.com/jfarmer08/homebridge-wyze-smart-home Does this help at all?

Z1mDMan avatar Sep 14 '22 15:09 Z1mDMan

I think that will let you to "power" on/off the camera over their web API which I believe uses AWS IoT core to communicate with the cameras.

I believe they're using WebRTC for the doorbell Pro over AWS Kinesis - can you see the doorbell if you go to view.wyze.com?

mrlt8 avatar Sep 15 '22 05:09 mrlt8

I cannot view my Doorbell Pro from view.wyze.com

zenlav avatar Sep 15 '22 14:09 zenlav

Thanks for the data point. Not sure why they're using a different method for this camera alone. They seem to have gone back to the regular tutk video stream for the other "pro" 2k cams.

mrlt8 avatar Sep 15 '22 14:09 mrlt8

Well, glad I found this, as I've been wracking by brain trying to get it to work.

Any update on this?

If it is any help, the interface for the camera view is similar to that of the newer v2 sensors.

holocronology avatar Oct 12 '22 20:10 holocronology

I think that will let you to "power" on/off the camera over their web API which I believe uses AWS IoT core to communicate with the cameras.

I believe they're using WebRTC for the doorbell Pro over AWS Kinesis - can you see the doorbell if you go to view.wyze.com?

I wasn't able to see it on view.wyze.com either but I did notice it now gets exposed as a switch in homebridge-wyze-smart-home plugin. Doesn't seem to do anything but it's a start.

it does show on view.wyze.com now but as unsupported.

Z1mDMan avatar Nov 08 '22 21:11 Z1mDMan

Any updates on this? It seems that the video doorbell pro will not be able to be supported without major work. Is that correct or are there ways to help here?

carTloyal123 avatar Nov 17 '22 18:11 carTloyal123

Correct. The doorbell pro seems to be the only camera in the wyze lineup manufactured by gwell and stream over webrtc instead of using the throughtek SDK (tutk) to stream and control the camera like the rest of their products. So I don't think we'll be able to support it with the current method we're using to pull the streams locally.

Wyze seems to be trying to get the rest of their cameras to stream over webrtc - cam plus web view/smart displays. Still haven't confirmed it, but I believe the latest app/firmware is also using webrtc, so we may eventually be able to support all the cameras via webrtc.

mrlt8 avatar Nov 18 '22 15:11 mrlt8

Understood, is there any work that can be done to add WebRTC to this repo or is it a big enough change to warrant an entire re-write?

carTloyal123 avatar Nov 21 '22 16:11 carTloyal123

Right now, we're using the tutk protocol to pull the video and audio frames from the camera and repackage that into an RTSP stream, so if we could find a library that can connect and pull the WebRTC stream from the AWS IoT Core server, then we may be able to use that as a replacement.

mrlt8 avatar Nov 26 '22 14:11 mrlt8

any updates on this? Devices like RING DOORBELL have a fantastic integration into Home Assistant and it would be awesome if the wyze doorbell pro could have something similar...

mmatus1112 avatar Jan 05 '23 04:01 mmatus1112

I have been slowly looking into it but nothing up and running yet. There are a few libraries that will convert the WebRTV stream to digestible frames but I have not started any implementation as I am working on another Wyze project at the moment. Will update when I have more info/time to get started on this.

carTloyal123 avatar Jan 05 '23 15:01 carTloyal123

@mrlt8 I have been doing some research today and it looks like we can get a live HLS video stream URL from AWS Kinesis with some pretty straightforward methods provided by the AWS SDK. My question is, can we even scrape the correct authentication and credentials to setup that stream? I have a doorbell pro so I am happy to help but I must say I am pretty new to reverse engineering network calls. Are you familar with how we might be able to get some of the data being passed between the camera, bridge and Wyze AWS endpoints? It looks like we need the below information to get somewhere with this:

var options = {
                    accessKeyId: $('#accessKeyId').val(),
                    secretAccessKey: $('#secretAccessKey').val(),
                    sessionToken: $('#sessionToken').val() || undefined,
                    region: $('#region').val(),
                    endpoint: $('#endpoint').val() || undefined
                }
                var kinesisVideo = new AWS.KinesisVideo(options);
                var kinesisVideoArchivedContent = new AWS.KinesisVideoArchivedMedia(options);
kinesisVideoArchivedContent.getHLSStreamingSessionURL({
                            StreamName: streamName,
                            PlaybackMode: $('#playbackMode').val(),
                            HLSFragmentSelector: {
                                FragmentSelectorType: $('#fragmentSelectorType').val(),
                                TimestampRange: $('#playbackMode').val() === "LIVE" ? undefined : {
                                    StartTimestamp: new Date($('#startTimestamp').val()),
                                    EndTimestamp: new Date($('#endTimestamp').val())
                                }
                            },
                            ContainerFormat: $('#containerFormat').val(),
                            DiscontinuityMode: $('#discontinuityMode').val(),
                            DisplayFragmentTimestamp: $('#displayFragmentTimestamp').val(),
                            MaxMediaPlaylistFragmentResults: parseInt($('#maxResults').val()),
                            Expires: parseInt($('#expires').val())

Most of these are options that can be set once but the interesting parts will be the accessKey and secretKey.

Let me know if you have any ideas on this or how we can test my device and scrape some of the needed information.

Other link for AWS example I am referencing: https://github.com/aws-samples/amazon-kinesis-video-streams-media-viewer

EDIT: I was also thinking that even if the camera stream runs through AWS the camera itself has to be creating and sending some stream of video from the doorbell pro or the bridge and I am wondering if that is possible to uncover and use directly for a direct connection to the system instead of involving an outside service.

carTloyal123 avatar Jan 06 '23 03:01 carTloyal123

I'm not very familiar with AWS, but I believe the camera pulls a couple of AWS related certificates on boot. I believe the cameras also use AWS's IOT Core to "power" on/off the cameras and for the other missing commands.

I don't think the secretKey ever gets revealed, but I was able to open a web socket connection with the credentials that the bridge can pull with the WEBRTC=True option. However, I the gwell cameras seem to use a different "mars" API endpoint https://wyze-mars-service.wyzecam.com, so I don't know if they even support the standard WebRTC like the cameras that support the official web view.

You could try to run the app through a proxy to try to capture the traffic related to "mars", but you'll need a way to disable the certificate pinning on your device.

I believe the KVS live view endpoint should be at "plugin/mars/live_replay_url", but I'm not familiar with that area of the wyze API.

mrlt8 avatar Jan 07 '23 14:01 mrlt8