Raspberry Pi: Completely Wireless IP Camera. Solar Battery Pack, WiFi, Logitech Camera, Raspbian

209,445

270

28

Posted

Introduction: Raspberry Pi: Completely Wireless IP Camera. Solar Battery Pack, WiFi, Logitech Camera, Raspbian

This is one of the first projects I did with my Raspberry Pi. I wanted to see if I could make a completely wireless web cam and set it to stream over the internet. Below are the steps and items I used.

All items except for the Raspberry Pi were purchased from ebay.com

Raspberry Pi Model B 512MB RAM
5000mAh Solar Powered External Battery Dual USB For iPad/Mobile Phone/Tablet PC
802.11n/g/b 150Mbps Mini USB WiFi Wireless Adapter Network LAN Card w/Antenna
Raspberry Pi Case Raspi Enclosure Box with GPIO Access and Logo (optional)
Logitech QuickCam for Notebooks Deluxe Laptop Webcam (Other web cams may work)

The first thing you want to do is get the Raspian Wheezy Image from here. Once you install it and boot up, you’ll come to a configuration screen.

Go to Expand_Rootfs to allow the operating system to use the entire SD card.

Go to SSH and Enable it. This will allow you to remotely shell into the OS to make configuration changes and get updates.

Save changes and reboot the Raspberry Pi.

Once booted up, you will want to download updates.
sudo apt-get update
This can take sometime to complete.

sudo apt-get upgrade
Type Y for yes and wait for the updates to download and install.

Next we want to setup the WiFi adapter. Shutdown the RPi with “sudo shutdown now” and plug in your WiFi adapter.

When booted up login and then type: sudo nano /etc/network/interfaces
We want to give the Raspberry Pi a static IP address so that we can access it remotely. Below is an example of my configuration. Yours may vary. I set the Ethernet port and the WiFi to the same IP address so that I can access it from the same IP even if it is connected via Ethernet or WiFi.

auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.0.85
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1

auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.85
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
wpa-ssid “yourSSID”
wpa-psk “yourPASSPHRASE”

Save your changes using Ctrl-O and shutdown the device.
Unplug the Ethernet cable.

You should see your static IP on the verbose screen “My IP address is xxx.xxx.xxx.xxx”

Verify that you are connected to the internet by typing: sudo ping -c 3 google.com

From this point on, I do the rest of the setup through SSH and PuTTy on a Windows machine.

Log into your RPi via PuTTy using the Pi’s static IP address.

Plug in your webcam.

Next we need to install the “motion” service. This is a package that contains everything you need to stream your cam over the internet and view it from any browser.

sudo apt-get install motion

Once the installation has completed we need to start the service.

sudo services motion start

If your web cam has a light on it, you should see it light up.

Now lets configure the motion software.

sudo nano /etc/motion/motion.conf

In here there are a few basic changes that you need to perform:

Daemon = OFF to ON
webcam_localhost = ON to OFF
webcam_port = desired port number or 8088
control_port = desired port number or 8089
To ensure that the motion service will actually start as a daemon we need to change another configuration setting, so enter the following:
sudo nano /etc/default/motion

Then change the value “start_motion_daemon=no” to “yes”

sudo service motion restart

You can now open up a browser from another computer on the same network and go to: http://192.168.0.85:8088 to view your web cam.

You can remotely control the web cam settings by going to http://192.168.0.85:8089.

Power off the RPi, hook up the battery pack and turn it on. You should now only have the WiFi adapter and web cam plugged into the usb ports. Try viewing the cam from a web browser and walk around your house or even outside.

You will need to enable port forwarding on your home broadband router to the Raspberry PI on port 8088, that will mean you can access the web cam from anywhere in the world. You can also sign up with a service like www.dyndns.org.

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

29 Comments

have you updated this design?

sudo modprobe bcm2835-v4l2

hope this code help someone to access the camera

Habe meinen PI3 nach dieser Anleitung installiert. Wenn ich motion im Terminal starte werden auch Bilder der Kamera als jpg abgelegt.
Wenn ich allerdings über die IP zugreifen will erhalte ich keinen Zugriff. Selbst lokal funktioniert es nicht. http://localhost:8080 führt zu der Fehlemeldung :
Die Webseite auf http://localhost:8080/ ist möglicherweise unereichbar, die genaue Fehlermeldung war

Verbindung ist gescheitert. Verbindungsaufbau abgelehnt.

Sie könnte vorübergehend nicht erreichbar sein oder zu einer anderen Adresse umgezogen sei.


Von einem PC im gleichen Netz kommt auch keine Verbindung zustande. Der PI ist jedoch errrecibar. sftp - Verbindung funktioniert.

Hat jemand eine Idee ?

Hi there.
I'm looking at setting up a cheap video streamer so when people are like sick/away from school that can still do the school. I would like it to be as cheap as possible.
Could you do it for under $30 - I don't mind outdated devices as log as I can view on the Internet and has sound too.

Anyone know if I can make this with a raspberry pi 0? (When they come back for sale)

Instead of motion you can also use Kerberos.io, it's also open-source and a lot more user friendly to install and configure. You can find more information on the website.

I would use an old smart phone. The android IP Camera app works great. I have three of them set up. I want to do something like this so I can mount one on a tree for a better view of the front of our house. I have a home server running xeoma that allowes motion sensing, managment, and access to all the cameras.

I do the same as you, only I use Ispy software to access my phones camera's. You could add as many camera's as your computer or server can handle. The link is www.ispyconnect.com it works only on Windows machines 32 and 64 bit. The best thing about this software is you can use any type of camera. IP, Network, Local, etc.

ISpy is windows only. Otherwise I like it. Xeoma allowed me to trigger a plugin on my media center to have my security camera pop up when motion is detected.

I will have to check that out. Thank you.