carTloyal123 / cryze

Cryze is a Wyze Gwell Camera Bridge that allows you to stream your Gwell based Wyze cams to locations of your choosing.
GNU General Public License v3.0
29 stars 2 forks source link

POC #9

Open Cloud-121 opened 1 month ago

Cloud-121 commented 1 month ago

Hello ^^ I'm very sorry for bothering you again, I understand your quite busy. Please feel free to take as long as you need to respond, I was wondering if you could provide a little more info on the state of the project? I was looking into some of your recent commits and your docker hub profile. I was wondering, Have you been able to obtain a live "stable" feed from the cameras? Thank you ^^

carTloyal123 commented 1 month ago

Hi @Cloud-121 I appreciate the interest and thanks for adding an issue.

This is not a proof of concept really but a work in progress. The original POC was having the ability to access video at all through a proxy android app and indeed that works so now this project is to harden that into something people can use in their home ecosystem. It indeed does work as you described where you can see a live feed of your doorbell pro or cam og on your local machine. The big issue at the moment is that most of it is manual in setup like generating the video feed endpoint credentials needed from Wyze. I tried for a long time to reverse engineer the video streaming protocol to see if this could be achieved without having to run it through an android app but that seems to be the best way. At the moment three things are in motion: an android app running in an Ubuntu docker container, a python server to broker requests, and a python (or Websocket client of any kind). The android app and python server work well at the moment and it is up to the user to give credentials for the video stream to the server like in the device_list.py example you looked at previously. That script only starts a video stream but needs a place for the frames to go. Something like the h264_decoder.py can then be run to listen to h264 frames from the server and display them. In short here are the current steps:

  1. Run python websocket server from Cryze server repo or Cryze server docker container
  2. Run docker image with android app launched in android emulator (has to be an x86 based machine)
  3. Run device list which uses wyze email/password/api key to generate video credentials needed to access live feed
  4. Run h264_decode.py to view actual video stream

My current plan is to redo a lot of this for simplicity like I want to add wyze authentication to the python server so all you do as a user is submit Wyze email/password/api key and a device_id then video is available. I also want to just put the python server inside the same container as the android emulator running basically for simplicity, I was over thinking with multiple containers. (Original thought was you might need multiple android emulators running if you wanted access to multiple cameras at one time but I do not think this is a highly needed use case, at least not right now)

Hope this helps and would love contributions if you are technical at all and familiar with Python/Video Processing/Smart Home SDKs

Cloud-121 commented 1 month ago

Thank you so much for all the information, If you don't mind me asking a couple specific quotations. Which docker image are you referring to? I found 2 android docker images on your docker hub profile "cartloyal123/docker-android" and "cartloyal123/cryze-android-proxy". The 1st one starts but immediately closes without any feedback, the 2nd starting but seeming the VNC server fails to start. Thank you again for all the information as I mostly understand how the project works now and I'm looking forward to hearing from you again ^^

carTloyal123 commented 1 month ago

The only docker image that will be used moving forward will be the "docker-android" container. When launched, this boots an android emulator and starts the cryze android app that facilities getting video frames. The next part of dev will be to add the cryze server to that same docker image so it boots up on launch as well but I have not done that yet. As mentioned, the docker-android image should be run on Ubuntu x86 based machines only at the moment