Jump to content

DIY WiFi Cam Tutorial

jakkuh_t

Single Camera Setup 

 
  1. Order the parts you need from the links above - I'd recommend shopping around a bit as you can probably get parts even cheaper on a site like Adafruit or something.
  2. Once you have everything, take the Micro SD card and plug it into a windows PC.
  3. Download Etcher USB ISO flash tool, and the MotionEyeOS package for your respective Raspi (use the one labeled "Latest Release"). MAKE SURE YOU FLASH THE RIGHT IMAGE, OTHERWISE THE RASPI WILL NOT BOOT. (ie. "motioneyeos-raspberrypi3*.img.gz" for a Raspi 3 or "motioneyeos-raspberrypi*.img.gz" for a Raspi zero (w))
  4. Select the MotionEyeOS .img file in Etcher, followed by your micro SD card and then click Flash!
  5. Once done, download or create a file called "wpa_supplicant.conf" (make sure you set the extension to .conf not .conf.txt) with the following text and then place it into the root of the Micro USB.
  6. Now, install the MicroSD card and camera module ("How-To" here) into the Raspi. Then plug the Raspi in with the USB power supply you bought (use the micro USB port closest to the camera ribbon cable slot)
    • You will probably also want to plug in a monitor via the Mini HDMI adapter you bought so you can see what is going on.
  7. If you did everything correctly, the camera module should light up with a little red light (assuming the camera module you bought has one on it - every one I've tested has), and you can find the IP of the camera via any network scanning utility. My go-to is "Fing".
    • OR, if you plugged the Raspi into a monitor, it will print out the IP there.
  8. Type in the IP of the camera into your browser of choice
    • Default login info is admin for the username, with no password.

Now you're free to tinker with the control panel and find the best settings for your needs. Read the MotionEyeOS wiki for configuration help (there is a ton of info over there: https://github.com/ccrisan/motioneyeos/wiki/Configuration). I've personally found that 720p w/ 5-10 FPS works best. For more info on storing footage to a NAS, refer to the "Option Stuffs" section below.

If it doesn't work, please refer to the troubleshooting section below.

PS. IF YOU DON'T GET IT WORKING THE FIRST TIME, YOU MUST REFLASH THE IMG ONTO THE SD CARD AS THE WIFI SETTINGS ARE COPIED TO A LINUX PARTITION ON FIRST BOOT THAT REGULAR WINDOWS CANNOT READ.

widget.png?style=banner2

PC: 13900K, 32GB Trident Z5, AORUS 7900 XTX, 2TB SN850X, 1TB MP600, Win 11

NAS: Xeon W-2195, 64GB ECC, 180TB Storage, 1660 Ti, TrueNAS Scale

Link to comment
Share on other sites

Link to post
Share on other sites

2+ Camera Setup

 
  1. Order the parts you need from the links above - I'd recommend shopping around a bit as you can probably get parts even cheaper on a site like Adafruit or something.
  2. Once you have everything, take the Micro SD cards and plug them into a windows PC (do one at a time).
  3. Download Etcher USB ISO flash tool, and the MotionEyeOS package for your respective Raspis (use the one labeled "Latest Release"). MAKE SURE YOU FLASH THE RIGHT IMAGE, OTHERWISE THE RASPI WILL NOT BOOT. (ie. "motioneyeos-raspberrypi3*.img.gz" for a Raspi 3 or "motioneyeos-raspberrypi*.img.gz" for a Raspi zero (w))
  4. For each SD card: Select the MotionEyeOS .img file in Etcher, followed by your micro SD card and then click Flash!
  5. Once done, download or create a file called "wpa_supplicant.conf" (make sure you set the extension to .conf not .conf.txt) with the following text and then place it into the root of each Micro USB. Enter your WiFi networks name and password, and change the country code to match your country. 
    • If you plan on running your hub server over ethernet (recommended), ignore this step for that Pi's SD card
    • Text to place into file: https://pastebin.com/raw/WCedfA6s
    • Both the WiFi network name and password are case sensitive.
  6. Now, install the MicroSD card and camera module ("How-To" here) into each Raspi (skip for the hub server Pi). Then plug in power and ethernet into your hub server Raspi.
    • You will probably also want to plug in a monitor via the Mini HDMI adapter you bought so you can see what is going on.
  7. If you did everything correctly, the IP of the hub server will print out on screen, or you can find it via a network scanner like "Fing".
  8. Type in the IP of the hub server into your browser of choice
    • Default login info is admin for the username, with no password. (For the love of all that is glorious, please set a password for your admin account)
    • much settings, very config, such customizable.
  9. Then power up each camera Pi - it will show a red LED on the camera module if it worked correctly
    • Or just plug it in so you can see what is going on. :D
  10. After you're done tinkering with your hub server Pi, log into the control panel for each Camera Pi, Enable "Advanced settings", expand the "Expert Settings" tab, and enable the "Fast Network Camera" toggle. Wait for the Pi to reboot.
  11. Once rebooted, set your desired framerate, resolution and image customization options on each camera. (recommended: 1280x720, 10FPS)
  12. Back on the hub server, go to the drop down box in the top left, click "add a camera", select network camera and the type in the IP of the camera you want to add followed by ':8081'  - example: "http://192.168.0.69:8081"
     

    add-network-camera.png

    •  
  13. Click the cog wheel in the top right corner of the camera preview that appears, and then set the cameras FPS to match what you set for that camera in step 10, then click Apply.
  14. Repeat steps 9-12 for all the cameras you intend to setup.

 

Now you're free to tinker with the control panel and find the best settings for your needs. Read the MotionEyeOS wiki for configuration help (there is a ton of info over there: https://github.com/ccrisan/motioneyeos/wiki/Configuration). I've personally found that 720p w/ 5-10 FPS works best. For more info on storing footage to a NAS, refer to the "Option Stuffs" section below.

If it doesn't work, please refer to the troubleshooting section below.

PS. IF YOU DON'T GET IT WORKING THE FIRST TIME, YOU MUST REFLASH THE IMG ONTO THE SD CARD AS THE WIFI SETTINGS ARE COPIED TO A LINUX PARTITION ON FIRST BOOT THAT REGULAR WINDOWS CANNOT READ.

 

PS #2. it's also a good idea to set static IPs for your camera(s) via your router.

widget.png?style=banner2

PC: 13900K, 32GB Trident Z5, AORUS 7900 XTX, 2TB SN850X, 1TB MP600, Win 11

NAS: Xeon W-2195, 64GB ECC, 180TB Storage, 1660 Ti, TrueNAS Scale

Link to comment
Share on other sites

Link to post
Share on other sites

Troubleshooting

  • Issue: I get a "wpa_supplicant" failed error.
    • Make sure you set the correct WiFi SSID and password (they're case sensitive)
    • Make sure your file is correctly named: "wpa_supplicant.conf" not "wpa_supplicant.conf.txt"
    • When you go to try again, you must reflash the .img file to your MicroSD, as the wpa_supplicant.conf file is only read on first boot.
    • More help: https://github.com/ccrisan/motioneyeos/wiki/Wifi-Preconfiguration
  • Issue: My cameras framerate isn't high enough!
    • Try overclocking your camera Pi's

 

FAQ

  • Q: Can I just use a web cam instead?
    • YES!, just plug it in via USB and the Pi should detect it as a system camera. :o
    • However, Fast Network Camera mode DOES NOT work with USB cameras (only ribbon pi cams D:)

widget.png?style=banner2

PC: 13900K, 32GB Trident Z5, AORUS 7900 XTX, 2TB SN850X, 1TB MP600, Win 11

NAS: Xeon W-2195, 64GB ECC, 180TB Storage, 1660 Ti, TrueNAS Scale

Link to comment
Share on other sites

Link to post
Share on other sites

Optional stuffs:

  • Overclocking (Only use with adequate cooling)
    • Enable the "Advanced Settings" slider
    • Open "Expert settings"
    • Set the overclock to your desired level (medium seems to be best balance)
  • NAS Storage
    • Under "File Storage" set it to "Network Storage", and configure according to your network shares setup.

widget.png?style=banner2

PC: 13900K, 32GB Trident Z5, AORUS 7900 XTX, 2TB SN850X, 1TB MP600, Win 11

NAS: Xeon W-2195, 64GB ECC, 180TB Storage, 1660 Ti, TrueNAS Scale

Link to comment
Share on other sites

Link to post
Share on other sites

Thank you for the instructions, I'm definitely doing this with one of my spare Pi3's and Pi Zero W's.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Taubin said:

Thank you for the instructions, I'm definitely doing this with one of my spare Pi3's and Pi Zero W's.

I'm stoked to see some other people try it out and I think I'll probably set it up at my house too :P

 

(ps. let me know how it goes)

widget.png?style=banner2

PC: 13900K, 32GB Trident Z5, AORUS 7900 XTX, 2TB SN850X, 1TB MP600, Win 11

NAS: Xeon W-2195, 64GB ECC, 180TB Storage, 1660 Ti, TrueNAS Scale

Link to comment
Share on other sites

Link to post
Share on other sites

Behavior in case of power failure/cut power cable?
 

How long have your been run continuously without fault? How does the overclock affect the long-term reliability of the system?

 

Does it fail gracefully and recover in events like a kernel panic/power failure/network error?

 

 

Inquiring minds..

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, ChillllllOut said:

Video Link?

 

~ Main Rig ~

- Ryzen 9 3950X 16 Core 32 Threads - EVGA 3090 KINGPIN HYBRID - 32GB DDR4 3600mhz - 

- 6TB SSD Array + 2TB MP600 NVME Gen4 Boot - 

- Gigabyte X570 AORUS MASTER - Lian li O11 Dynamic XL - NZXT Kraken X73 + 16 Noctua NF-A12x25 Fans - 

 

~ Accessories ~

- Logitech G915 + G903 - LG C9 OLED PG279Q 27'' [1440p 165hz G-Sync] +  PG27AQ27'' [4k 60hz G-Sync] -
2x 1440p Portrait 25'' Dell - DT 990 Pro Headphones -

 

~ Servers ~

- 100TB NAS + Server's w/ 6700k - 32 + 64GB Ram - NVME Boot - Gigabit Unlimited Fiber -

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, wojtepanik said:

you can always use banana pi with sata ports for hdd :D:D

In my experience with bananapi and orangepi, the wireless sucks. It looses connection often, is inconsistent in its setup and speeds are atrocious.

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, mlow said:

In my experience with bananapi and orangepi, the wireless sucks. It looses connection often, is inconsistent in its setup and speeds are atrocious.

That doesn’t mean it wouldn’t be a good fit as a hub server. And they even have disk images of eyemotionos for those other boards.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

How secure is this? I know someone who is looking for an affordable video baby monitor, but they want something that can't be (super easily) hacked into

Tech, engineering, gaming and promoting the metric system. These are my things.

Lover of Linux.

Currently rocking a ThinkPad L13 laptop tricked out with an i7, running Windows 10.
PC Specs:

Spoiler

CPU: Intel i7 6700
GPU: Nvidia GTX 1070
Motherboard: Asus Z170 A
RAM: Corsair Vengence 16GB

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, jakkuh_t said:

I'm stoked to see some other people try it out and I think I'll probably set it up at my house too :P

 

(ps. let me know how it goes)

I’m definitely wanting to try this

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, brwainer said:

That doesn’t mean it wouldn’t be a good fit as a hub server. And they even have disk images of eyemotionos for those other boards.

If you are going to wire it in, why not use a real PC of some kind with an actual CPU. Like even an old laptop with a broken display, those are super cheap on eBay. The benefits of a SBC are marginal and niche when you commit it to a wired connection. May as well use a full x86 CPU that can do work. Or in my case I'd just make a Docker for it, and use old cheap broken screen phones for the cams, 3d print a case/mount. Benefit is built in everything you could need including backup battery. Bet you could get better quality setup for several cams under $50 total.

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, jakkuh_t said:

I think I got everything... if you have any questions, ask below :D

 

------

 

The first step is to decide what you want your setup to be, as you'll need to know how many parts to order. There is a few different options, and once you've chosen, click on the parts list for your respective setup.

 

1. Single Camera w/o hub server

2. Single Camera w/ hub server - *RECOMMENDED*

3. Multiple Cameras w/ hub server - *RECOMMENDED*

4. Multiple cameras w/ a desktop computer as a hub

  • This is a setup that you can build, but I haven't investigated it yet, so stay tuned on this.

 

My recommendation is to have a hub server regardless of the number of cameras to ensure the best possible image quality, but if your budget doesn't permit, a single camera w/o a hub server can still work decently.

 

 

Click on the header for your desired setup to see the actual DIY steps.

That was a lot of effort to go through and is very much appreciated! Thank you.

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, mlow said:

Behavior in case of power failure/cut power cable?

It shuts off, The Pi doesn't have a built in Battery, You can use a UPS Pi HAT or even a standard powerbank if you want it to remain on.

 

9 hours ago, mlow said:

How long have your been run continuously without fault? How does the overclock affect the long-term reliability of the system?

 

I've personally ran a single Pi as a "Fast network cam" for almost a year without fault.

 

9 hours ago, mlow said:

Does it fail gracefully and recover in events like a kernel panic/power failure/network error?

 

IIRC the MotionEye OS is designed to restart on any crash. It doesn't exactly fail gracefully it just does a hard reset, nothing can get coruppted because the SD card is read only by default .

Add me on Discord Epictek#6136

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, mlow said:

If you are going to wire it in, why not use a real PC of some kind with an actual CPU. Like even an old laptop with a broken display, those are super cheap on eBay. The benefits of a SBC are marginal and niche when you commit it to a wired connection. May as well use a full x86 CPU that can do work. Or in my case I'd just make a Docker for it, and use old cheap broken screen phones for the cams, 3d print a case/mount. Benefit is built in everything you could need including backup battery. Bet you could get better quality setup for several cams under $50 total.

There is actually already a docker image for motioneye https://github.com/ccrisan/motioneye/wiki/Install-In-Docker

Add me on Discord Epictek#6136

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, jakkuh_t said:

4. Multiple cameras w/ a desktop computer as a hub

I'm excited for this. Already have my dell R710s up and running, and I've been wanting to add some cameras to my house.

 

Is it possible to make a POE camera instead of wireless though?

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, bluebarracuda225 said:

I'm excited for this. Already have my dell R710s up and running, and I've been wanting to add some cameras to my house.

 

Is it possible to make a POE camera instead of wireless though?

There are ways to add POE to raspberrypi (although moreso for the fullsize ones that actually have an ethernet port). If you mean a normal, not DIY camera, then all it needs to have is support for MJPEG video streams.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, brwainer said:

If you mean a normal, not DIY camera,

I like the DIY aspect of this, so I'd be interested in a DIY POE solution

Link to comment
Share on other sites

Link to post
Share on other sites

47 minutes ago, bluebarracuda225 said:

I like the DIY aspect of this, so I'd be interested in a DIY POE solution

POE hat coming soon!

Current Rig

Thermaltake Tempered Glass Chassis W/ 3 LED Fans
Side Mounted MSI GTX 1070 8GB Armour Edition
Gigabyte Gaming 7 Mobo
KabyLake i7 7700k
Thermaltake AIO Cooler - Dual RGB Fans
Corsair 16GB DDR4 3000Mhz
EVGA 750w PSU
500GB Samsung EVO M.2
750GB Crucial SSD
1TB WD HDD
Win 10 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×