Build a Raspberry Pi Webcam Server for Motion Detection

Introduction

Raspberry Pi can be connected to a camera to capture picture and video in order to use it as a CCTV motion detection device, which I have described in my previous post. To further enhance the motion detection feature, we can build a Raspberry Pi Webcam Video Server for browsing from web. It is more effective to monitor environment from outside. In the following, I will describe the installation steps of a application call motionPie to build a web server.

1. Download & Format the SD Card

  1. Download the Motion Pie SD Card Image from the Motion Pie GitHub repository or my link <<HERE>>.
  2. You will need a formatting tool. Visit the SD Association’s website and download SD Formatter 4.0 for either Windows or Mac.
  3. Follow the instructions to install the formatting software.
  4. Insert your SD card into the computer or laptop’s SD card reader and check the drive letter allocated to it, e.g. I:/
  5. In SD Formatter, select the drive letter for your SD card (eg. I:/) and format

2. Install the Motion Pie Image onto the SD Card

  1. Download the Win32DiskImager.
  2. Now unzip the MotionPie ISO file so you can install it onto the Pi safely.
  3. Select the MotionPie ISO file and the drive letter your SD card is assigned (Eg. I:/)
  4. Confirm you have the correct details and click on Write.
  5. Once done you can safely remove your SD card from the computer.

Booting/Setting up MotionPie

Now we’re ready for boot up, so insert the SD Card, an Ethernet cord and the power cord. We will need to communicate to the Pi over the network rather than directly like I have done in most of the previous tutorials.

read more

Install OpenCV 3.0 for both Python 2.7+ and Python 3+ on your Raspberry Pi 2

Information source: http://www.pyimagesearch.com/2015/07/27/installing-opencv-3-0-for-both-python-2-7-and-python-3-on-your-raspberry-pi-2/

So if you’re interested in building awesome computer vision based projects like this, then follow along with me and we’ll have OpenCV 3.0 with Python bindings installed on your Raspberry Pi 2 in no time.

UPDATE: The tutorial you are reading now covers how to install OpenCV 3 with Python 2.7 and Python 3 bindings on Raspbian Wheezy. This tutorial works perfectly, but if you are looking to install OpenCV 2.4 on Raspbian Wheezy or OpenCV 3 on Raspbian Jessie, please see these tutorials:

read more

Python Motion Detection Program on Raspberry Pi

Introduction

Raspberry Pi can connect to a camera to capture picture and video. As an advance feature, it can be used as a CCTV to monitor the environment. For example, from official Raspberry Pi web site “https://www.raspberrypi.org/forums/viewtopic.php?t=45235″, there shows a simple and efficient motion detection script in Python using PIL.

While watching for motion it pipes a thumbnail image from raspistill at around 1fps to analyse (it keeps everything in memory to avoid wearing out the SD card). Once motion is detected it calls raspistill again to write a high-res jpeg to disk. It also checks free disk space and if under a set limit it starts to delete the oldest images to make sure there is always enough free space for new images. While running on my rev1 B it consumes around 12% CPU / 4% ram and manages to capture a full size image once ever 2-3 secs.

read more

Installation of Riak Cluster on Raspberry Pi

Introduction

Actually Raspberry Pi is a low performance computer board, however, we can use cluster technology to build of a powerful Raspberry Pi computer by combining several pi. It is very scalable. We can use “Riak” software to build the cluster function on Raspberry Pi. It can improve the data process power to speed-up the data upload and download process. I will introduce the installation of Riak in the following.

Step 1 Prerequisite Requirement – Installation of mysql & esl-erlang

1.0 Install mysql by running the following command:

$ sudo apt-get install mysql-server mysql-clietn php5-mysql

read more

"OWASP" 是什么?

OWASP is a (开放Web 应用安全项目组-OpenWebApplicationSecurityProject) 每隔数年会更新10个最关键的Web应用安全问题清单,即OWASPTOP10。

2013年OWASP TOP 10版本在2010年版本中新添加了一类风险,以涵盖更普遍、更重要的安全漏洞;并基于最新的流行程度数据,对一些风险重新排序。另外,该版本通过一类特定风险而引入了“组件安全”风险,并移除了2010年版中的A6“安全配置错误”风险。

Installation Edimax Dongle for Wifi Receiver & Access Point on Raspberry Pi

Introduction

Recently, I bought an Edimax Wifi Dongle and used it on my Raspberry Pi. It selected Edimax because it is 100% compatible with Raspberry Pi, and can works out of the box. Moreover, it is cheap, and it can be used as a WiFi Receiver and an Access Point to share out WiFi. The features of Edimax are as below:

  • It supports 150 MBPS speed at an 802.11n wireless data rate, which is the latest wireless standard. It provides the fastest range and widest coverage area.
  • The Raspberry Pi Wifi dongle also supports Wifi Multimedia (WMM)  standard, which allows better streaming of real-time data.
  • It has a multi-language EZmax setup wizard
  • Nano size design helps you to connect it with any USB port without  blocking other USB ports
  • Supports Windows 10
  • Ideal wifi adapter for Raspberry P

In the following, I will talk about how to set it up as a WiFi receiver and Access Point.

Setup Edimax as WiFi Receiver

Step 1. Connect the Edimax to USB port

Step 2. Edit the /etc/network/interfaces files as below:

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and ‘man dhcpcd.conf’

read more

Setup Honeyport on Raspberry Pi

Introduction

A honey pot is a computer system on the Internet that is expressly set up to attract and “trap” people who attempt to penetrate other people’s computer systems. To set up a honey pot on Paspberry Pi, I recommend to use Glastopf. Glastopf is a web application honeypot project lead by Lukas Rist a.k.a glaslos of the Honeynet Project. The Glastopf project started in the year 2009. It is a simple and minimalistic web server written in Python that records information of web-based application attacks like Structured Query Language Injection (SQLI), Remote Code Execution (RCE), Local File Inclusion (LFI), Remote File Inclusion (RFI), and many more, because it emulates web application vulnerabilities tricking attackers or scanners that it is a vulnerable web server.

read more