Does OctoPrint support cameras via ONVIF?

Camera model
TP-LINK Tapo C200, WiFi connected IP camera.

What is the problem?
Camera only supports local access via limited ONVIF functionality i.e. streams but cannot be controlled.
Is it possible to add this camera to OctoPrint alongside the Pi-Cam I already have connected for upclose monitoring? The second camera lets me see the entire printer so I can see more things like the state of the filament spool.

What did you already try to solve it?
Nothing, not able to find any information on this

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
N/A

Additional information about your setup (OctoPrint version, OctoPi version, ...)
OctoPrint v1.4.2

Look for a 'mulitcam' plugin, might do what you want. As long as you can get a simple web stream, it can be loaded into OctoPrint I believe.

Unfortunately I have already looked at the ones available and they all either work on Pi connected cams or use a simple mjpeg stream. ONVIF is a bit more complex but more powerful when implemented correctly, which it isn't on this camera as it only allows for viewing the stream but no control.

What kind of access do you get to the cam? You may be able to load the camera's tab into an iframe (Pretty much any page can be, although not always looking nice) I am not familiar with the ONVIF etc. so I guess I'm just blindly guessing.

Hi Taomyn

Something that might work for you is motioneye run on a separate computer.

I have 3 printers each with its own pi running Octoprint and each with a webcam.

I have setup a copy of motioneye on a seperate computer that takes the stream from each Octopi and
allows me to see all three cameras in one place. Motioneye should be able to take the stream from your TP-LINK camera as well.

This setup works well for me. Check out Motioneye at the following URL.

Regards

Unfortunately with ONVIF it's not that simple, it seems to be the way at the moment with the cheaper but capable IP cams, you can use their app to get great access/control, or you can use their shoddy direct access. They are obviously trying to push their cloud services.

TP-Link have said they will "improve" connectivity in the future, but they have been saying that for a long time.

I thought "motioneye" looked familiar and I remembered it's a module I added to my Home Assistant server way back but never got around to setting up. As nice at it looks, I really want to keep it within OctoPrint and having the feeds picked on yet another server and then pulled in by OctoPrint in some way would just add more complexity as well as lag not that that matters too much in this scenario.

I just hope some clever dev out there will one day write an ONVIF plugin for OctoPrint.

If you can find a method for embedding an ONVIF camera feed into html web page I can bundle it into a plugin for you.

Just found this.. https://pypi.org/project/onvif-py3/
Would probably be a good start.. Actually reading the ONVIF spec this could be very useful as a common way to connect to a camera.

Have you tried this to find out an rtsp stream url?

No, but I have tried it and it worked thank-you, gave me:

rtsp://192.168.1.23:554/stream1

Will see what I can do with it.

OctoPrint does not support RTSP streams out of the box, so you would have to search for ways to display the RTSP stream in the browser:
https://community.octoprint.org/search?q=rtsp

Ugh, I've been down that road before. It's a pain and ends up requiring external transcoders to get it into a web embeddable format (like mjpgstreamer). There have been several discussions about this and how to do it relative to the wyze cam.

Yeah, I tried sniffing out my Octoprint video stream with Onvif, and it errored out, failing to find an endpoint.

I believe this How to use Octoprint with an IP camera that has an RTSP stream available is what you looking for.

1 Like

wyze v2 cams also have a new option with the openmiko firmware.

It worked for me thank you very much

I'm looking for a solution for the Tapo C110 which also uses Onvif. The only place I can view the stream is from ODM v2. The instructions look like they would do what I want, but I don't have a custom firmware to load on my Tapo cam. Is there a solution that doesn't require custom firmware?

go2rtc is probably your best best.

https://github.com/AlexxIT/go2rtc#source-onvif

go2rtc actually has direct tapo support.

https://github.com/AlexxIT/go2rtc#source-tapo