-
1Step 1
Build a personal live streaming camera with Raspberry PI to watch on mobile
Today, we are going to let Raspberry PI turn into a remote security cam that we can control and watch live anywhere on the planet with using our mobile phone. This is the maker version of dropcam, nestcam, etc. We call it Butterfly PI.
To make things simple, we prepare a step by step guide so that any maker or developer can build his/her own remote security camera. Btw, if you just to try the your own camera, let us assemble the camera for you. Keep in touch contact@butterflytv.net Here is the outline, first, we need to make the mobile app ready for camera. Secondly, build the camera. Let me tell what we have needed for building the camera in advance.
- Android Phone(4.0 or higher)
- Raspberry PI 2
- Raspberry Camera Module
- Power Adapter 5V – 1A with micro USB output
- USB Audio Adapter(Optional)
- USB Wi-Fi dongle(Raspberry PI 2 compatible) or Ethernet Cable
Let’s start.
Make Mobile Phone Ready
- Download and install Butterfly TV from Google Play. Butterfly TV is integrated with our camera
- Login to Butterfly TV and then click the My Butterfly PIs item in the menu
- You should see the below screen when you first open the Butterfly PIs’ screen.
- Click ”Add a new Butterfly PI” item in the menu as shown below.
- Write your camera name([DeviceName]) and secret code([SecretCode]) to the dialog. You can write anything you want. Just don’t forget the name and secret code. We will need these values to authenticate Raspberry PI. We write “Balboa” for both device name and security code.
- After you click OK, you should see your Butterfly PI as offline like below
Build the camera
- So let’s start building our camera. Here is the image of Raspberry PI for Butterfly PI. Download and write image to your SD card. If you don’t know how to write image to SD card. Please take a look at this tutorials for Linux, Windows, Mac OS
- After you write image to sd card. Plug the sdcard into the raspberry PI
- Now it is time to mount camera to Raspberry PI. Make sure that power adapter is unplugged.
- We just need to edit a file in raspberry. Plug the power adapter and if you have keyboard and screen plug them as well (if you don’t have, you need to connect via ssh(explained below)) and edit /home/pi/startup/startup.sh. Change the line
java -jar /home/pi/butterflypi.jar [DeviceName] [SecretCode] &
[DeviceName] and [SecretCode] are the parameters when you used registering the Butterfly PI on android app at step 5 on previous section.(Don’t remove &) – Please keep in mind that secret code is a kind of the password for your camera. – 5. (Optional) if you don’t need to connect via ssh, skip this part: You need to know the ip address of the raspberry. You can learn it from your modem interface. After you learn ip address use ssh like below
ssh pi@IP_ADDRESS_OF_RASPBERRY_PI
Password is “butterflypi”. If you still don’t know how to connect, try this way . Keep in mind that after you perform last way and edit the startup.sh, you need to restore the cmdline.txt file. 6. (Optional) If you try to record sound as well, please plug a USB audio adapter to Raspberry PI. Like this one or that one.
- We are almost done. You need to connect to Raspberry to network via wi-fi or cable. If you use wi-fi, consider buying one of them. To learn how to configure wi-fi you can visit here. If you use an ethernet cable, just plug into Raspberry PI. Make sure that ethernet cable or wi-fi connection is connected to internet.
- If you wish you can also put Raspberry PI to a case and it is better if you use a case with fan or use heatsink to get better performance. Lastly, Here are some Butterfly PI’s with different cases
- Plug the power adapter to raspberry and let it boot. When it is connected to network. Your camera gets online on Butterfly TV.
- Click start button and wait then the screen becomes like below. To watch it just click the Play button.
- So you have a mobile app controlled security cam, you can mount Butterfly PI anywhere you want. You can use this case to make mounting easy.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.