In a previous blog entry, I explained (in French) that I added Octoprint to my Dagoma DiscoEasy200 thanks to an Orange Pi Zero.

The best guide I found is the one from deloarts.

Mac OS X 10.8 comes with Python 2.7 pre-installed by Apple. If you wish, you are invited to install the most recent version of Python 3 from the Python website ( ). A current “universal binary” build of Python, which runs natively on the Mac’s new Intel and legacy PPC CPU’s, is available there. Since version 0.1.3 there is a python dependency on numpy. As a result; if you don’t already have numpy the install can take in excess of 30 minutes to complete on a pi. Just be patient and let it run and eventually the plugin install will finish. If your device have less than 512MB of ram your numpy installation will most likely fail. How to use Octoprint with an IP camera that has an RTSP stream available Optional: For Wyze cam only. Install Dafang Hacks on the Wyze Cam. Once running and all is functional, continue. Set video bitrate to 1500, VBR, 30fps. If OctoPrint is running on a Raspberry Pi (3B minimum): ssh pi@ sudo apt update sudo apt. With updates to OctoPrint, a lot of information has changed and most of the information on this subject has not evolved. Because of this, I thought I would try my best to summarize what I had found and updated to the latest version of OctoPrint in an effort to perhaps save some of you some time. Choosing a Camera.

Or if you want to migrate your existing OctoPrint install on OctoPi to Python 3, I suggest to first make a backup, then move the existing venv /home/pi/oprint out of the way and create a new one based on Python 3 (which should already be present on current OctoPi images).

Remark: when I wrote this article, I discovered that new editions of the Orange Pi Zero exists (Plus / Plus2 H3, H5...). I'm using the basic Orange Pi Zero with 512Mo RAM

I recently dismantled an old Android 2.2 notebook before throwing it away (based on the Wondermedia WM8650). I found a little module with a camera on it, and I asked myself if it could be reused.

For

The chip on the module is an Etron eSP268.

And 4 wires are connected to the module (red / black / blue / white).
It seems that the module is just connected through an USB interface !
I gave it a shot :

  • Red: 5V
  • Black: GND
  • White: Data positive
  • Blue: Data negative

And it works! No driver to install to get it work with Windows 10.
The webcam is an UVC compatible device, which is a good news as it supported by Linux.

Hardware

As the only USB port socket on the Orange PI Zero is used by the 3D printer, I looked at the Orange PI Zero pinout:


Source

We can see that 2 USB port pins are available (USB-Dx2 / USB-Dx3).
I chose to use the USB-DM2 / USB-DP2 as they are close to 5V and GND pins.

I removed the micro USB breakout board and put some pin headers:

Software

I'm using the following OS:

ARMBIAN 5.38 stable Ubuntu 16.04.4 LTS 4.14.18-sunxi

I found some useful informations on the Sunxi website.

Once that the OS booted, I tried to see if the webcam was recognized:

Installing Octoprint For Os X Os

So I checked the USB devices:

To discover the webcam informations, I had to install hwinfo

I checked on the UVC Linux driver website, and it should be supported:

1e4e:0100 / USB 2.0 Camera / Etron Technologies

After looking around on the web to get it working, I understood that I just had to enable the kernel module:

Installed and used some tools to see the capacity of the webcam.

So the webcam can be used at 30 fps with the 640x480 resolution. Enough for a free module.

To be able to use the webcam with Octoprint, the webcam stream must be exposed over HTTP.
To do that, Octoprint website advise to use mjpg-streamer.

Webcam stream with 'mjpg-streamer'

Please note that I installed the tool (make install) but I think that it's not mandatory.

Octoprint

Now, it's time to test the stream:

Sadly, this webcam cannot output MJPG, which force the streamer to transcode the stream, and use a lot of CPU power (30% of the CPU of my Orange PI).

The stream is now available!

http://192.168.0.100:8080/?action=stream
(of course, you have to change the IP of my device by yours...)

Before configuring Octoprint, I had to install ffmpeg:

Scripts to be able to start / stop the webcam

As the streamer uses a lot of CPU, I want to be able to start it / stop it directly from Octoprint.

I adapted the scripts that are available on GitHub for my configuration.

webcam.sh

webcamDaemon.sh

Edit Octoprint configuration

I had to add the system section:

Installing Octoprint For Os Xenoverse

Octoprint user rights

Currently the octoprint user doesn't have the right to use the video devices. When I ran the script with this user, I got an error:

So I add the user to the video group:

By editing this line:

Then, I restarted Octoprint:

Octoprint configuration

Installing Octoprint For Os X Catalina

It's now time to changes the setting of Octoprint:

Don't forget to flush the cache of your browser to see the changes in Octoprint.

Installing Octoprint For Os X Windows 10

Now, in the 'Control' tab, an area can display the webcam stream. To enable the stream, one new item is also available in the toolbar.

And...

Installing Octoprint

I now have to find the best way to fix the webcam.
The quality is not good, but it is enough to check the printer status remotely.

Installing Octoprint For Os Xml

If you want to open your octoprint on Internet, there is few steps left. But personally, for security reasons, I only check my octoprint through a VPN connection to my home network.