Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for security cameras #185

Open
ClementNerma opened this issue Mar 21, 2024 · 3 comments
Open

Support for security cameras #185

ClementNerma opened this issue Mar 21, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ClementNerma
Copy link
Contributor

For personal uses, I'd love to have access to an API to control my surveillance devices (e.g. change the camera's angle, toggle it on/off, etc.)

Tapo cameras (C-series) support the ONVIF protocol which is a widespread standard for controlling IP cameras.

I'm not sure if adding RTSP streaming capabilities to this crate would be relevant, it may be more relevant to make another create for that.

I'm trying to search on how to connect to the cameras (which seems to be different than for smart plugs or bulbs as it uses separate credentials). It may represent a pretty big work so not sure if I can do this myself but I'll try to dig into this and see what I can find.

@mihai-dinculescu
Copy link
Owner

I've got a C220 myself, and I'll support your initiative. Yes, basic controls would be swell at first, but I'm willing to consider RTSP as well afterwards.

#144 should contain useful information.

@ClementNerma
Copy link
Contributor Author

The main problem is that almost no code from this crate could be re-used for the C-series. As they all use ONVIF (for control) and RTSP (for streaming) instead of basic plain old HTTP requests, everything needs to be written from the ground up.

Maybe it would be interesting to make another crate (e.g. tapo-camera) for that? And reference it in the main crate? I don't know.

What's sure is that we're not going to write a full client for ONVIF and/or RTSP, better let the job be done by specialized libraries. For the ONVIF part, there's unfortunately not that much software solutions in Rust.

There's still the onvif crate but it's unfortunately not very maintained and doesn't seem to work with current Tapo cameras. I tried the discovery example and it failed to find anything.

Maybe inspiration could be taken from the unofficial Tapo Camera addon for Home Assistant, which while being pretty unstable to me managed to control the camera and live stream from it.

@mihai-dinculescu
Copy link
Owner

Let's worry about RTSP when we get there 😄

Looking at https://github.com/JurajNyiri/pytapo, the authentication should be fairly easy to integrate into the current abstractions, and the API is the same as that of the other devices already implemented.

The only annoying aspect is that the same authentication doesn't work for H200. I was hoping to shoot two birds with one stone 😞 .

@mihai-dinculescu mihai-dinculescu added the help wanted Extra attention is needed label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants