Presented here is a project that lets your Raspberry Pi (RPi) turn into an IoT based smart camera and then control and watch live video being captured by this camera on your smartphone from anywhere on the planet. You just need an Internet connection on your RPi and smartphone. This project explains step-by-step procedure to build your own remote smart security camera.
Hardware required for building the camera are Android smartphone (4.0 or higher), RPi 2, Raspberry camera module, 5V, 1A power adaptor with micro-USB output, USB audio adaptor (optional) and USB Wi-Fi dongle (RPi 2-compatible).
Software required for this project is Buttery TV app. Since the project is developed using Butterfly TV and RPi, we have named it Butterfly PI. It has the following features:
1. You can broadcast live video in several resolutions.
2. It communicates with your audience via comments while you are broadcasting.
3. It allows you to share live video with your friends and followers on Facebook and Twitter.
4. You can sign up through Facebook or Google+.
5. You can watch and share your videos later and delete whenever you want.
Smartphone setup
Download and install Butterfly TV from Google Play store. Butterfly TV is integrated with the smartphone camera. Login to Butterfly TV and click on My Butterfly PIs item in the menu (Fig. 1). You should see the screen shown in Fig. 2 when you first open My Butterfly PIs screen.
Click on Add new Butterfly PI in the menu as shown in Fig. 3. Write your chosen camera name as device name and security code in Add new Butterfly PI dialogue box. You will need the name and code later to authenticate RPi. For example, let us select Balboa for both device name and security code (Fig. 4). After clicking OK, you should see your Butterfly PI as offline (Fig. 5).
Raspberry Pi setup
Download the image of Butterfly PI for RPi from here.
To write images to an SD card, the tutorial found on following link might be helpful: click here
Plug the MicroSD card into RPi and interface the camera to it. Make sure that power adaptor is unplugged. Now plug in your keyboard and mouse, and power on RPi. From the terminal, edit startup.sh file in RPi as given below:
$ sudo nano /home/pi/scripts/startup.sh
Change the following line:
java -jar /home/pi/butterflypi.jar
[DeviceName] [Security Code] &
Here, enter your device name and security code as Balboa. Press Ctrl+o to save it and Ctrl+x to exit the program.
Press Alt+Ctrl+F2, and you will get Command prompt. Enter pi as login user name and butterflypi as password.
Set up your Wi-Fi network from Menu→Preferences→WiFi Configuration. Enter your Wi-Fi SSID and password and click OK. Check your Internet connection and reboot your system. Your Butterfly TV will become online (Fig. 6).
To watch live video streams being captured by RPi camera, click Play (Fig. 6).
If Butterfly TV is still off, find startup.sh file in path/home/pi/scripts and open it to verify the device name and security code. Security code is a kind of password for your camera.
Live video streaming will be automatically saved in your mobile. So you now have a mobile app controlled smart security camera.
If you found this IoT project useful then you may also like Top 30+ IoT Projects | IoT Project Ideas for Enthusiasts.
Biswajit Das was manager – R&D, EFY Labs, till recently
Hello Biswajit,
Your butterfly pi is really very good. Could u pls tell where the previous stored video get stored is it on cloud our local.
Download the image of Butterfly PI for RPi from here. is not working the page does not exist can u pls help with this
Dear Rahul, thanks for your comment, we have updated the link. You can download the image now.
Hello, When I try to download the image of Butterfly Pi from the given link I keep getting “Preview not available” error and a download option is given. When I try the download option, “Google virus scanning warning” is displayed at the title of the web page. Nothing is downloaded and at times the browser closes by itself. Can you please check if the link is working and correct it if it is not working.
Thanks & Regards
Hi,I want to do the same project with such type of changes in it.so,can I take this opportunity from EFY Team…..
Hi Vinay, all the projects published on our website is free. You can try any Electronics Project.
Butterfly TV App is not found in the Google Play store..
Butterfly TV App is not available in the playstore…..
There is no such app called Butterfly TV in playstore
how much cost this project takes to complete ?
Can u share the link for butterfly TV app.
And sir can u send the physics behind this project.
Butterfly TV app is not available in Google play store. Please Give the link to download it.
Hi, can you please tell me is this app use firebase for getting live streaming from PIcamera and what if want to develop my own app…!