11. July 2017

RPi Zero Wireless – Video for Duet using MotionEYE OS

By BeTrue3D


Just the other day I wrote the post on setting up Video on the RPi Zero W to use on the Duet.

This post is ending up pretty much the same place, where we can access the video on our Duet Web Interface (and much more), but instead of using the full Raspbian install for it, we are going to use the much smaller and specialized MotionEYE OS.

For this project

For this project I’m going to use one of the tiny Raspberry Pi Zero Wireless controllers, 8GB SD card or larger and a Pi NoIR Camera V2. Using the NoIR as I wanted to try it out, and the NoIR makes it possible to record in the dark using IR lightning. I’ve found it’s also pretty nice just in my average dim room.

You also need one of the camera cables for the Zeros, as they are tapered in one end compared to the normal ones. They come in 15cm and 30cm lengths.


Download MotionEYE OS

Go the the download page for Motion EYE OS and download the one for motioneyeos-raspberrypi-. If you look at the filezie, it’s obvious how it’s very lightweight and specialized at 68MB for complete OS  (225MB uncompressed) compared to the 4GB of our previous Rasbian installation!

Prepare SD

To make sure there are no unmarked bad areas on the SD drive, I strongly recommend getting a proper SD formatting tool, like SD Formatter, and do a format.

Make sure to pick the right drive, give it a name, choose OverWrite in Options and hit Format.

Unpack and write image to SD

Unpack the file and write image to SD using Etcher. Run Etcher as administrator if you run into problems.

Be patient.. it takes a while.

When it goes from writing data to the SD to Validating, Windows might throw some errors at you, but that’s normal, so don’t worry.

Setup WiFi

As opposed to our previous Raspian venture, we need to make a small file for our USB drive containing the necessary information about our Wireless LAN.

On windows I’m using the standard Notepad to create this file. I’ll not recommend using Notepad++ or some such as they are often more smart than they should be.


Replace MyWiFiNetwork with the SSID (name) of your Wi-Fi network, and password123 with your password, making sure to keep the quotes, as above.

If you copy paste the above into a notepad document, make sure to make the correct line breaks.

Now save that file with the filename wpa_supplicant.conf on the root/start of the SD drive

Make sure that your file doesn’t have any extensions on the end of the filename like .txt, it should just be called wpa_supplicant.conf

Hint: Save the file using Save As..  and change filetype drop-down from .txt to All filetypes

Source: https://learn.pimoroni.com/tutorial/sandyj/motioneye-os-on-your-octocam

Attach Camera

Now lets dig out our RPi camera and the special RPi zero camera cable.

Loosen the tabs on both devices and insert the ribbon cable as shown.

Do not put the devices on top of the antistatic bag. It works the opposite of putting the devices inside it, so don’t do that! I know many people are doing this all over the internet, but you really, really do not want to do that.

First Boot

Now insert SD card into your RPi Zero Wireless and power it up.. sit down and wait 5 minutes.

Use Angry IP Scanner to find the device

Unless you have configured IP manually, or have a screen connected, you need to figure out the IP of your device.

There are several ways to go about doing this, but the easiest way is to download and run the Angry IP Scanner. Some antimalware programs pops up warnings on this program, but it is due to its functionality to scan ports and such, and not because it contains malicios code.

So, start it up and just hit Start. It’ll scan a while. Then sort the results by clicking on the column named Ping.

Mine showed up like this, where the standard client devices like computers and printers are going to have a blue icon on the left hand side, so it’s easy to spot. Same with the Web detect on the right hand side, which isn’t normal for standard devices.

So right-click it -> Open -> Web Browser

Webinterface – Setup

Depending on the browser size you are going to see a small image in the corner, or a fullscreen view.

Click the icon looking like a person in the upper left corner, and switch Username to admin and leave Password blank.

Enable Advanced Settings

Turn on Advanced Settings in the General Settings section, and click Apply

Enable Streaming

Make sure Video Device and Video Streaming is turned on.

You might want to turn on Motion Detection as well instead of just having it on always.

Resolution and frame rate

As our last basic setup we are turning up our resolution a bit. Go into Video Device and select the Video Resoluton and Frame Rate fitting your requirments.

Streaming URL

Easiest way to find the URL (address) we need to use in our Duet Web Interface is to go to Video Steraming and cick on the Streaming URL link

This opens a small popup with an address, which you copy and then paste into the Optional URL to an external Webcam in the Duet Web Interface.

Note: Your url is not going to be exactly like mine

Duet Webcam Integration

In order to integrate the videostream into the Duet Web Interface, we need the direct url for our videostream.

My url, as copied above, is http://meye-f4a4e5e9:8081

I insert this into the Optional URL to an external Webcam box in Settings -> User Interface – Webcam Integration

Check it by going to Print Status tab

How it looks in Duet Web Interface when camera is enabled