Skip to main content

Site Navigation

Your Account

Choose Language

Help

Revision to How to include a web camera image in Duet Web Control

Tony

[title|How to include a web camera image in Duet Web Control]
 
[toc]
 
 
 
Duet electronics does not support a directly-connected web camera. However, you can buy a suitable WiFi or Ethernet IP camera and then configure Duet Web Control to include an image from the camera on the Print page.
 
'''Important''': You must choose a camera that has the facility to return a static JPEG image in response to a HTTP request. Not all IP cameras have this facility. Sadly, none of the major browsers supports including a RTSP camera video stream in a web page.
 
=== Generic setup instructions ===
 
*Connect the camera to your WiFi or Ethernet network according to the manufacturer's instructions.
 
*Identify your camera's IP address and the HTTP port and URL that return a static JPEG image. You may find https://www.ispyconnect.com/sources.aspx useful.
 
* In Duet Web Control, go to Settings, User Interface. At the bottom right is the Webcam Integration panel. Configure the URL there.
 
=== Specific cameras ===
 
==== Raspberry Pi with camera add-on ====
 
This is known to work. You can use OctoPrint to host a video camera feed. However there is a lighter weight solution. Here is a summary of the process of installing MotionEyeOS on a RaspberryPi with a camera attached.
 
* [https://github.com/ccrisan/motioneyeos/releases] for particular version Raspberry Pi (e.g. motioneyeos-raspberrypi-########.img.gz is for the original Raspberry Pi and the Raspberry Pi Zero).
* After [https://www.sdcard.org/downloads/formatter_4/], write the image to your MicroSD card using [https://etcher.io].
* Configure WiFi by adding a file to the MicroSD card. Copy, paste, and edit the following text, saving the file as '''wpa_supplicant.conf''' on the MicroSD card.
 
[code]
:update_config=1
:ctrl_interface=/var/run/wpa_supplicant
:network={
::scan_ssid=1
::ssid="HomeNetwork"
::vpsk="password"
:}
[/code]
 
* Find the IP address of your Raspberry Pi using [https://github.com/adafruit/Adafruit-Pi-Finder/releases] app (e.g. 10.1.1.64).
* Visit that IP address in your web browser.
* Click on the Person icon (in the upper left side of the page) and enter '''admin''' for the username, and left the password field blank. Then click the Login button.
* Now would be a good time to use the menu button (in the upper left) to create your admin password, You also might even want to give your Pi a nice hostname by enabling the "advanced settings" option (e.g. 3dcam).
 
For more details on this setup process please visit [https://betrue3d.dk/rpi-zero-wireless-video-for-duet-using-motioneye-os/]!
 
==== Sannce I21AG ====
 
* Download and install the Sannce Cam app on your smartphone.
* Connect the camera to your WiFi network using the smartphone app.
* Use the app to configure an admin password and also a user-mode ID and password. The camera will reset and take a minute or two to connect again.
* Download and run the Sannce search tool, http://www.sanncegroup.com/document/IPC/I21AD/tool/Search_tool4.2.exe. Select your camera from the list, then it will show the IP address and port number to use.
* Enter the following URL in the DWC webcam settings, substituting the IP address and port numbers you just found: '''http://'''''ip-address''''':'''''port'''''/snapshot.cgi'''
* Check "Do not append extra HTTP qualifier" (I don't know whether this matters or not).
* Your browser will ask for a login ID and password for the camera. Give it the user-mode ID and password and tell it to remember them.
* To avoid your router possibly allocating a different IP address to the camera when it reconnects, if possible configure your router to make that IP address allocation permanent.