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
26 stars 1 forks source link

More Information #1

Open jfarmer08 opened 4 months ago

jfarmer08 commented 4 months ago

I would like more information on how you're planning to do this. I would like to add video to https://github.com/jfarmer08/wyze-api for the Wyze cams. At some point I want to convert all the Python code from Wyze-Bridge over to nodes.

carTloyal123 commented 4 months ago

So glad you asked @jfarmer08

The plan for Gwell based cameras (Video door bell pro is the hardware I have) is that I have reverse engineered the the wyze app and created my own Android application that can be used to produce the raw h.264 video frames. I plan to deploy this as a docker container that runs the android application and runs a websocket server. The android application will take in p2p credentials that you can get from an outside source at a wyze p2p resource url. With the credentials and device id the docker container will start to publish video frames in h.264. From there some video processing client can consume the frames and push to the desired services like homekit, scrypted, RTSP, WebRTC whatever else. To start, I want to use HAP-python to create an example Homekit implementation in a single python file then continue creating integrations from there. Happy to have other input on how to push this forward more effectively or if there is some accepted pattern for this.

ps I am working on including the actual source code for the project since it is split between an android project and python websocket server

jfarmer08 commented 4 months ago

It would be nice to have this done in nodejs. That way someone does not have to use docker. I am an Android /iOS dev by trade. And I might be able to help if needed.

Love the logo.

carTloyal123 commented 4 months ago

Oh awesome, do you have experience with JNI much? In the Cryze-Android repo that might be a place you can help. As far as I can tell the only way to implement a pass through for the gwell based cams is through an android application. I did some looking into ways to run android apps outside of a phone/emulator and none look promising. For that reason, the cryze-android part is packaged up in docker. The cryze-server is just a websocket server setup to pass data from outside clients to the emulator and vice versa. This could be written in anything. My thought is that all you have to do is run the two docker containers and you can write your own client in any frameworks you like such as Javascript/Typescript, Rust, Go, or whatever else. You have to use docker either way for the android emulator unfortunately but I do not see that as an issue since numerous DIY projects involve docker somehow. The main work I am working on now is deployment and writing up example clients. For instance a python script (or node script) that implements a websocket client and shows the output video.

Great logo from ChatGPT lol

carTloyal123 commented 2 months ago

@jfarmer08 do you have experience with Android JNI libraries and binaries? As far as I can tell there is no way to really reverse engineer the underlying camera connection technology since it is all wrapped up in compiled JNI binaries

jfarmer08 commented 2 months ago

Not sure I would be any help with this.