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

[Webcam] Add option for embedded http support for esp32-cam-webserver #2131

Open
Hecatron opened this issue Jan 31, 2025 · 3 comments
Open
Labels
good first issue Simple task for new contributors 💡 Type: FR Requests a new feature

Comments

@Hecatron
Copy link

Requested feature:

Hi,
I was wondering if there could be any support added for an embedded http camera
Typically one of the approaches I take to using Camera's on a 3D Printer is the use of esp32-cam-webserver
https://github.com/easytarget/esp32-cam-webserver

Now it's possible to stream the video off of this camera using a URL with the 81 port number
such as http://192.168.111.72:81 and the MJPEG Streamer option

But it's not possible to access any of the controls within the camera because these are part of the http UI
(the most useful one being the ability to turn the spot light on and off)
Typically this is a locally programmed device via an Arduino sketch so it's not like it's going to hack my browser or anything.
I've seen limited support for this on FLuidd (buttons don't work), and this works fine on the Duet WIFI Boards / Firmware

There's also a lot of other controls you can access in the UI as well

Image
Image

Solves the following problem:

No response

Additional information:

No response

@Hecatron Hecatron added the 💡 Type: FR Requests a new feature label Jan 31, 2025
@meteyou
Copy link
Member

meteyou commented Jan 31, 2025

Hi @Hecatron ,

Thanks for your feature request!

First of all, Mainsail is a control interface for 3D printers running Klipper, and webcam functionality is only a secondary feature. Our focus is on improving printer control rather than implementing complex webcam integrations.

I have a feeling that very few users actually use ESP32 webcams. I don’t have any statistics on this, but I see them extremely rarely. Because of this, I don’t see much value in adding native API support for them.

Our current plan is to eventually interact with Crewsnest (which is the mosted used webcam wrapper with Klipper printers) via an API for camera settings. Beyond that, I don’t think I or anyone from the Crew will work on such an integration - just due to a lack of time.

An iFrame implementation, like the one used in Fluidd, is something I personally consider a "poor or incorrect" solution, so I won’t implement it in Mainsail.

However, I will leave this feature request open. If any user sees this and wants to contribute an API integration for such webcams (ESP32 webcams), they are welcome to do it and create a PR.

Best regards,
meteyou

@meteyou meteyou added the good first issue Simple task for new contributors label Jan 31, 2025
@Hecatron
Copy link
Author

I would agree that iframes should be avoided if there was a better way to do things.
But currently I can't see a better alternative, also if there's no standards for API's

To avoid iframe support in the main code base, is there a way to have plugins to mainsail?
I'm thinking this is not necessarily just for iframe support but for other possible user plugins as well.
Such as a custom camera control

@meteyou
Copy link
Member

meteyou commented Feb 1, 2025

I would agree that iframes should be avoided if there was a better way to do things.
But currently I can't see a better alternative, also if there's no standards for API's

a direct integration would be every time better than an iframe integration...

To avoid iframe support in the main code base, is there a way to have plugins to mainsail?
I'm thinking this is not necessarily just for iframe support but for other possible user plugins as well.
Such as a custom camera control

Short answer: no
Long answer: pls use the search function. I wrote it multiple times...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Simple task for new contributors 💡 Type: FR Requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants