<commit_before>+++
title = "DIY Raspberry Pi Alarm System"
description = ""
tags = [
    "release",
    "alarm",
    "diy",
    "raspberry pi"
]
date = "2018-04-22"
categories = [
    "Development"
]
menu = "main"
+++

In this blog post I will explain how to turn a **Raspberry Pi** into an **alarm system** that **detects movements**, **records** them, and **sends** the images to your **phone**.
Additionally, the alarm system will turn on and off automatically based on the location of your phone.

<!--more-->

## Motivation
There is a certain comfort in knowing that your home is safe and secure. This can be easily achieved by installing an alarm system. There are more than enough vendors out there that sell their systems for a reasonable price, they have a few major drawbacks though:
Most systems are closed, connected to a cloud that you have no control over, and - as history as shown often enough - they tend to be incredibly insecure.
So basically they are a blackbox bug that you install in your own home. Bummer.

This was not an option for me, so I decided to make my own alarm system instead consisting only out of [free software](https://en.wikipedia.org/wiki/Free_software). How hard could it possibly be?
Spoiler, not very. It still took some time and effort to create and combine all required components as there was no existing software that met all my requirements.

This blog post documents the whole setup process, both as a documentation for myself and as a tutorial for other people.

## Requirements
The requirements are very simple. All you need is a Linux system with a web cam and a Linux server.
If you want to be able to copy all configuration files from this post though you should make sure to use the same hard- and software as I do.

My alarm node is build out of a **Raspberry Pi 3** running **Raspbian Stretch**. Any Raspberry Pi model will do but model 3 has built-in wifi which is very handy.

TODO: image + link

As camera I use the **Electreeks Raspberry Pi Kamera Modul**. It is equipped with infrared lights (optional) and works both at day and at night. It is also rather small compared to a normal web cam.
But almost any other camera module or USB web cam will do as well.

TODO: image + link

My server is running **Ubuntu 16.04**. It does not require many resources, so any cheap VPS will do.
Keep in mind though that this server controls the alarm system, so pick a trustworthy hoster or host it yourself.
You will need a (sub-) domain for TLS encryption.

TODO: image + link
<commit_msg>Text improvements<commit_after>+++
title = "DIY Raspberry Pi Alarm System"
description = ""
tags = [
    "release",
    "alarm",
    "diy",
    "raspberry pi"
]
date = "2018-04-22"
categories = [
    "Development"
]
menu = "main"
+++

In this blog post I will explain how to turn a **Raspberry Pi** into an **alarm system** that **detects movements**, **records** them, and **sends** the images to your **phone**.
Additionally, the alarm system will turn on and off automatically based on the location of your phone.

<!--more-->

## Motivation
There is a certain comfort in knowing that your home is safe and secure. This can be easily achieved by installing an alarm system. There are more than enough vendors out there that sell their systems for a reasonable price, they have a few major drawbacks though:
Most systems are closed, connected to a cloud that you have no control over, and - as history as shown often enough - they tend to be incredibly insecure.
So basically they are a blackbox bug that you install in your own home. Bummer.

This was not an option for me, so I decided to make my own alarm system instead consisting only out of [free software](https://en.wikipedia.org/wiki/Free_software). How hard could it possibly be?
Spoiler, not very. It still took some time and effort to create and combine all required components as there was no existing software that met all my requirements.

This blog post documents the whole setup process, both as a documentation for myself and as a tutorial for other people that also want to build their own alarm system.

## Requirements
The requirements are very simple. All you need is a Linux system with a camera and a Linux server.
If you want to be able to copy all configuration files from this post though you should make sure to use the same hard- and software as I do.

My alarm node is build out of a **Raspberry Pi 3** running **Raspbian Stretch**. Any Raspberry Pi model will do but model 3 has built-in wifi which is very handy.

TODO: image + link

As camera I use the **Electreeks Raspberry Pi Kamera Modul**. It is equipped with infrared lights (optional) and works both at day and at night. It is also rather small compared to a normal web cam.
But almost any other camera module or USB web cam will do as well.

TODO: image + link

My server is running **Ubuntu 16.04**. It does not require many resources, so any cheap VPS will do.
Keep in mind though that this server controls the alarm system, so pick a trustworthy hoster or host it yourself.
You will need a (sub-) domain for TLS encryption.

TODO: image + link

{'fraction_non_alphanumeric': 0.061208576998050684, 'fraction_numerical': 0.005458089668615985, 'mean_word_length': 3.943159922928709, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5861337', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1283, 'n_words': 851}