Merge branch 'develop' into 2.0

This commit is contained in:
Cédric Verstraeten
2017-07-15 17:13:15 +02:00
19 changed files with 232 additions and 141 deletions
+4 -3
View File
@@ -39,9 +39,10 @@ The cloud is an extra service, which is available by default but is not required
Kerberos.io comes with **a bunch of features**, below you can find a short list of the most important ones.
* Full range camera support (**USB**, **Raspberry Pi** v1.3 and v2.1, and **IP cameras** which support a RTSP or MJPEG stream).
* **Hardware encoding** when using the Raspberry Pi Camera.
* Constraints to make detection more intelligent (time interval, regions, etc).
* Ability to save snapshots and **video recording** and execute/trigger a bash script, webhooks or GPIO pin.
* **Live streaming** (MJPEG) on the web or with another program like VLC or IP camera viewer.
* **Live streaming** (MJPEG) on the web or with another program like VLC or IP camera viewer; ability to secure with Basic Authentication.
* **Heatmap** and latest sequence of activity.
* Fluent and **responsive overview** (Smartphone, Tablet and PC) of snapshots by day and hour.
* System information (CPU, disk, network, etc).
@@ -52,11 +53,11 @@ Kerberos.io comes with **a bunch of features**, below you can find a short list
<a name="installation"></a>
## Installation
Installing <b>Kerberos.io</b> to your IoT device, has never been so easy. By using our <b>cross-platform</b> installer, you can run a <b>fully configured</b> video surveillance system within <b>3 minutes</b>. Indeed, we also think that's awesome!
<a href="/installation/KiOS" alt="install kios">
<img src="/images/kios-install.gif" style="border-radius: 0; margin: 0 0 10px 0; width: 100%;"/>
</a>
By using the KiOS installer, you'll get <b>an easy to use GUI</b> which allows you to configure and **flash KiOS to your SD card**. Just download the installer, select a version, specify your network configurations, select your SD card and press the flash button; **it can't be easier**. If you **don't want to reflash you SD card**, you can run Kerberos.io on your existing [**Raspbian**](/installation/Raspbian) or [**Armbian**](/installation/armbian) installation, or if you like containers with [**Docker**](/installation/Docker).
By using the KiOS installer, you'll get <b>an easy to use GUI</b> which allows you to configure and **flash KiOS to your SD card**. Just download the installer, select a version, specify your network configurations, select your SD card and press the flash button; **it can't be easier**. If you **don't want to reflash you SD card**, you can run Kerberos.io on your existing [**Raspbian**](/installation/Raspbian) or [**Armbian**](/installation/armbian) installation, or if you like containers you can use [**Docker**](/installation/Docker).
+2 -2
View File
@@ -8,7 +8,7 @@ Kerberos.io runs on every Linux based machine but its main goal is to run on a R
### Raspberry Pi
We recommend to run Kerberos.io on a **Raspberry Pi**, as it is a very popluar microcontroller which can you buy in almost every (online) electronic shop. To simplify the lives of our Raspberry Pi users, Kerberos.io comes with a custom ARM OS called [**KIOS**](installation/KiOS) (Kerberos.io Operating System), which you can deploy to your Raspberry Pi in just a few minutes. Kerberos.io supports **all Raspberry Pi versions**: 1, 2, 3 and Zero (W).
We recommend to run Kerberos.io on a **Raspberry Pi**, as it is a very popluar microcontroller which can you buy in almost every (online) electronic shop. To simplify the lives of our Raspberry Pi users, Kerberos.io comes with a custom ARM OS called [**KIOS**](installation/KiOS) (Kerberos.io Operating System), which you can deploy to your Raspberry Pi in just a few minutes. Kerberos.io supports **all Raspberry Pi versions**: 1, 2, 3 and Zero (W).
### What about other boards?
@@ -19,6 +19,6 @@ Kerberos.io can also be installed on other boards by following the [**Armbian**]
## Which type of camera can you use?
Kerberos.io works with the full range of camera's. You can use an **USB-**, **IP-** or the **Raspberry Pi camera (v1.3 and v2.1)**. If you want to use an IP camera, we recommend to use the RTSP connection if available; note that it's possible that cheap IP cameras will not work properly.
Kerberos.io works with the full range of camera's. You can use an **USB-**, **IP-** or the **Raspberry Pi camera (v1.3 and v2.1)**. When using the Raspberry Pi camera, you'll benefit from its **hardware encoding** which makes it possible to record video at 30 FPS on a Raspbery Pi Zero. If you want to use an IP camera, we recommend to use the RTSP connection if available; note that it's possible that cheap IP cameras will not work properly. USB camera's that need special drivers will probably **NOT work**.
![Cameras](3_cameras.png)
+5 -5
View File
@@ -8,19 +8,19 @@ One of the strategies Kerberos.io follows is **the concept of isolation**. Read
## IP cameras
This is the most common scenario. Nowadays if you want to buy a camera, there is a 90% chance that it will be an IP camera.
This is the most common scenario. Nowadays if you want to buy a camera, there is a 90% chance that it will be an IP camera.
IP cameras have outnumbered the video camera industry, they come with many different flavours and technologies (e.g. ONVIF). Typically a user will **buy one or more IP cameras**, **position them** at various places at home or work, and **install a video surveillance system** to manage them; e.g. Kerberos.io.
### Desire
What we often see is that users ask for, or desire to have, one single application where they can access and manage all their different IP cameras. This desire may look obvious at first sight, but has **limitations on the long run**.
What we often see is that users ask for, or desire to have, one single application where they can access and manage all their different IP cameras. This desire may look obvious at first sight, but has **limitations on the long run**.
Many video surveillance solutions, other than Kerberos.io, uses the approach previously described. However this approach is against the Kerberos.io strategy/philosophy, read more about it on the [**strategy page**](/strategy) and the [**one vs multi camera support**](/strategy#one-vs-multi) discussion.
### Best practice
When you have an enterprise environment, or just have a lot of IP cameras (>2), you [**should consider to use Docker**](/installation/Multi-camera/Docker). When using **Kerberos.io with Docker**, you create an individual virtual processing units, **a Docker container**, for each camera.
When you have an enterprise environment, or just have a lot of IP cameras (>2), you [**should consider to use Docker**](/installation/Multi-camera/Docker). When using **Kerberos.io with Docker**, you create an individual virtual processing units, **a Docker container**, for each camera.
By using this approach the management of your cameras is transparant and you have the ability to pin point them by an IP address (or port). Next to that you will have **a highly scalable solution**, when new cameras are installed you create new containers for each camera. When processing a lot of cameras you can eventually use **Docker swarm** to load balance containers over multiple systems.
@@ -46,7 +46,7 @@ Just the like the IP camera scenario, users want to have a single application wh
If you consider to connect multiple local cameras to a processing unit (server, Raspberry Pi or other board), you should take into account following points:
* Did you positioned your cameras properly?
* Did you positioned your cameras properly?
* Has the second (or other) camera a lot of value? Maybe can you give it a better position somewhere else.
In most of the cases a second or third camera can be of a lot of value e.g. a 360° view. However in most of the cases this is totally overkill and you should better use it at a completely other position.
In some cases a second or third camera can be of a lot of value e.g. a 360° view, but most of the time this is totally overkill and you should better use it elsewhere.
+28
View File
@@ -1,5 +1,6 @@
# Release notes
* [2.4.0](#2-4-0)
* [2.3.1](#2-3-1)
* [2.3.0](#2-3-0)
* [2.2.1](#2-2-1)
@@ -12,6 +13,33 @@
* [1.0.1](#1-0-1)
* [1.0.0](#1-0-0)
<a name="2-4-0"></a>
## 2.4.0
#### Ecosystem
* Enable/Disable force network mode.
* Enable/Disable auto removal media.
#### Web
* Upgrade from Laravel 4.2 to Laravel 5.4 [#70](https://github.com/kerberos-io/web/issues/70).
* Fix bug with heatmap radius slider [#84](https://github.com/kerberos-io/web/issues/84).
* Design tweaks toggle button (remove outline).
* Disabled possibility to timestamp video when using hardware acceleration.
#### Docker
* Fix SSL support [#4](https://github.com/kerberos-io/docker/issues/4).
* Auto removal if disk is full.
#### Machinery
* OpenMAX IL hardware encoding for Raspberry Pi camera. [#83](https://github.com/kerberos-io/machinery/issues/83)
* Optimized live streaming.
* Optimized h264 recording.
* Basic authentication for live streaming (username and password). [#80](https://github.com/kerberos-io/machinery/issues/80)
<a name="2-3-1"></a>
## 2.3.1
+5 -5
View File
@@ -10,30 +10,30 @@ When deploying on the Raspberry Pi there are two possible solutions. You can use
###KiOS
[KiOS](https://github.com/kerberos-io/kios) is a custom linux OS (created by buildroot) which runs Kerberos.io out-of-the-box. This is the **most simple** and **basic** installation procedure. Note that with KiOS you don't have multiple camera support.
[KiOS](https://github.com/kerberos-io/kios) is a custom linux OS (created by Buildroot) which runs Kerberos.io out-of-the-box. This is the **most simple** and **basic** installation procedure. Note that with KiOS you don't have multiple camera support.
<div style="float:right;margin-top:-15px;"><a href="installation/KiOS" style="color:#fff;background-color:#943633;border-radius:7px;padding:8px;">Install KiOS</a></div>
###Raspbian
If you already have a Raspberry Pi running with Raspbian, you probably **don't want to reflash your SD card**. Therefore you can install the different parts of Kerberos.io (machinery and web) manual.
If you already have a Raspberry Pi running with Raspbian, you probably **don't want to reflash your SD card**. Therefore you can install and download the different parts of Kerberos.io (the machinery and the web) without the need for complex and time consuming compiling.
<div style="float:right;margin-top:-15px;"><a href="installation/Raspbian" style="color:#fff;background-color:#943633;border-radius:7px;padding:8px;">Install on Raspbian</a></div>
## Armbian supported boards
If you have <a href="https://www.armbian.com/download/" target="_blank">**an Armbian supported board**</a>, you can follow the Armbian installation to transform it into a surveillance system.
If you have <a target="_blank" href="https://www.armbian.com/download/">*an Armbian supported board**</a>, you can follow the Armbian installation to transform it into a surveillance system.
<div style="float:right;margin-top:-15px;"><a href="installation/Armbian" style="color:#fff;background-color:#943633;border-radius:7px;padding:8px;">Install on Armbian</a></div>
##Docker
A Docker image is available on the Docker Hub for **x86 machines**. By using docker-compose you can run Kerberos.io with a one-liner.
A Docker image is available on the Docker Hub for **x86 machines**. By using docker-compose you can run Kerberos.io with a one-liner.
<div style="float:right;margin-top:-15px;"><a href="installation/Docker" style="color:#fff;background-color:#943633;border-radius:7px;padding:8px;">Run on Docker</a></div>
##Generic
You can install Kerberos.io on any Linux based OS like Ubuntu, Debian, OSX, etc. The only thing you need to do is to compile the machinery and install the web interface.
You can install Kerberos.io on any Linux based OS like Ubuntu, Debian, Raspbian, OSX, etc. The only thing you need to do is to compile the machinery and install the web interface. Kerberos.io can't be compiled on a native Windows machine, if you want to use Kerberos.io on windows you should Docker.
<div style="float:right;margin-top:-15px;"><a href="installation/generic" style="color:#fff;background-color:#943633;border-radius:7px;padding:8px;">Compile yourself</a></div>
+23 -5
View File
@@ -23,13 +23,32 @@ This is what will happen:
* Systems is rebooted.
* Post-upgrade scripts are applied.
## Raspbian
## Raspbian / Armbian
If you want to install a new version of Kerberos.io on Raspbian, there is **no automated versioning** process available like KiOS. To perform an upgrade you'll need to [**follow the traditional installation procedure**](/installation/Raspbian) for Raspbian.
If you want to install a new version of Kerberos.io on Raspbian or Armbian, there is **no automated versioning** process available like KiOS. To perform an upgrade you'll need to follow the traditional installation procedure for [Raspbian**](/installation/Raspbian) or for [**Armbian**](/installation/Armbian).
## Armbian
Please read the notes below that matches your current and desired version to upgrade to. If no notes are available, you'll only need to follow the installation guide.
If you want to install a new version of Kerberos.io on Armbian, there is **no automated versioning** process available like KiOS. To perform an upgrade you'll need to [**follow the traditional installation procedure**](/installation/Armbian) for Armbian.
### Upgrade from 2.3.x to 2.4.0
At 2.4.0 we are now using Laravel 5.4.0, which requires >= PHP 5.6. We recommend you to install PHP 7.0.
Install PHP7 packages.
sudo apt-get install php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt
Modify the fastcgi_pass parameter in your nginx config.
sudo nano /etc/nginx/sites-enabled/default
Replace following line.
- fastcgi_pass unix:/var/run/php5-fpm.sock;
+ fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
Reboot the system (or only Nginx).
sudo reboot
## Docker
@@ -66,4 +85,3 @@ Another solution is to start completely over again (clean state). You can do thi
After you've deleted all your containers and images, you can start the containers again with **docker-compose**. You'll see that the new Kerberos.io images will be downloaded.
docker-compose up
+20 -14
View File
@@ -20,7 +20,7 @@ A short video explaining how to install Kerberos.io on Raspbian.
## Machinery
<a name="machinery-install-package"></a>
###Install package
###Install package
Update system
@@ -30,10 +30,10 @@ Download the debian file from [**the machinery repository**](https://github.com/
sudo wget https://github.com/kerberos-io/machinery/releases/download/v%machineryversion%/rpiX-machinery-kerberosio-armhf-%machineryversion%.deb
Unpackage the file
Unpackage the file
sudo dpkg -i rpiX-machinery-kerberosio-armhf-%machineryversion%.deb
Enable Raspberry Pi camera (if needed)
sudo raspi-config
@@ -41,7 +41,7 @@ Enable Raspberry Pi camera (if needed)
Start the machinery on start-up, and reboot the system.
sudo systemctl enable kerberosio && sudo reboot
<a name="machinery-configure"></a>
###Configure
@@ -61,20 +61,21 @@ After kerberos is installed a binary is available at **/usr/bin/kerberosio**. Ju
### Install Nginx + PHP
Before you can run the web interface, you'll need to download and configure a webserver. Kerberos.io recommends to use Nginx, as it is a light-weight and fast webserver. The web interface is written in PHP, so we also need to download PHP and some packages.
Update the packages and kernel.
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" | sudo tee --append /etc/apt/sources.list
sudo apt-get update && sudo apt-get upgrade
Install Nginx and PHP (+extension).
sudo apt-get install nginx php5-cli php5-fpm php5-gd php5-mcrypt php5-curl
sudo apt-get install -t stretch nginx php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt
Creating a Nginx config.
sudo rm -f /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default
Copy and paste following config file; this file tells nginx where the web will be installed and that it requires PHP.
server
@@ -96,12 +97,12 @@ Copy and paste following config file; this file tells nginx where the web will b
location ~ \.php$
{
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Restart nginx and reboot system
sudo service nginx restart && sudo reboot
@@ -110,7 +111,7 @@ Restart nginx and reboot system
### Install source
Create a www location.
sudo mkdir -p /var/www/web && cd /var/www/web
Get the source code from Github.
@@ -121,7 +122,12 @@ Unpack
sudo tar xvf web.tar.gz .
Add write permission for the storage directory, and the kerberos config file.
Change write permission on the storage directory.
sudo chmod -R 777 app/storage
sudo chmod 777 app/config/kerberos.php
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod 777 config/kerberos.php
Reboot
sudo reboot
+17 -12
View File
@@ -14,7 +14,7 @@
## Machinery
<a name="machinery-install-package"></a>
###Install package
###Install package
Update system and install dependency avcodec. These installation instructions assume that a fresh Armbian 5.24 or 5.25 installed.
@@ -24,14 +24,14 @@ Download the debian file from [**the machinery repository**](https://github.com/
sudo wget https://github.com/kerberos-io/machinery/releases/download/v%machineryversion%/armbian-machinery-kerberosio-armhf-%machineryversion%.deb
Unpackage the file
Unpackage the file
sudo dpkg -i armbian-machinery-kerberosio-armhf-%machineryversion%.deb
Start the machinery on start-up, and reboot the system.
sudo systemctl enable kerberosio && sudo reboot
<a name="machinery-configure"></a>
###Configure
@@ -53,20 +53,20 @@ In case kerberosio does not start and complains about missing libraries, install
<a name="web-installation-webserver"></a>
### Install webserver + PHP (optional)
Update the packages and kernel.
sudo apt-get update && sudo apt-get upgrade
Install Nginx and PHP (+extension).
sudo apt-get install nginx php5-cli php5-fpm php5-gd php5-mcrypt php5-curl
sudo apt-get install nginx php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt nodejs npm
Creating a Nginx config.
sudo rm -f /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default
Copy and paste following config file; this file tells nginx where the web will be installed and that it requires PHP.
server
@@ -88,12 +88,12 @@ Copy and paste following config file; this file tells nginx where the web will b
location ~ \.php$
{
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Restart nginx and reboot system
sudo service nginx restart && sudo reboot
@@ -102,7 +102,7 @@ Restart nginx and reboot system
### Install source
Create a www location.
sudo mkdir -p /var/www/web && cd /var/www/web
Get the source code from Github.
@@ -115,5 +115,10 @@ Unpack
Change write permission on the storage directory.
sudo chmod -R 777 app/storage
sudo chmod 777 app/config/kerberos.php
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod 777 config/kerberos.php
Reboot
sudo reboot
+3 -1
View File
@@ -15,6 +15,8 @@ Create a **docker-compose.yml** file and following configuration:
web:
image: kerberos/web
environment:
- KERBEROSIO_SECURE_SSL=false
ports:
- "80"
volumes_from:
@@ -24,4 +26,4 @@ Create a **docker-compose.yml** file and following configuration:
Run following command; this will download the Kerberos.io docker images and configure them properly.
docker-compose up
docker-compose up
+44 -21
View File
@@ -27,7 +27,7 @@ If you want to use IP cameras, make sure to compile FFMPEG with x264 support.
git clone https://github.com/FFmpeg/FFmpeg ffmpeg
cd ffmpeg && git checkout remotes/origin/release/2.8
./configure --enable-gpl --enable-libx264 --enable-shared --prefix=/usr/local
make && sudo make install
make && sudo make install
Go to home directory and pull the machinery from github.
@@ -40,7 +40,7 @@ Compile the machinery; this can take some time.
Start the machinery on start-up.
sudo systemctl enable kerberosio
sudo systemctl enable kerberosio
<a name="machinery-configure"></a>
### Configure
@@ -58,18 +58,43 @@ After kerberos is installed a binary is available at **/usr/bin/kerberosio**. Ju
## Web
<a name="web-installation-webserver"></a>
### Install webserver + PHP (optional)
### Install web
Update the packages and kernel.
If you want to install **the web**, you'll need to have **a webserver** (e.g. Nginx) and **PHP** running with some extensions. You also need **NodeJS** and **npm** installed to install **Bower**. Below you can find the installation procedure to install the web on your preferred environment.
**Install Dependencies**
Install Git, PHP7 (+extensions) and NodeJS.
A) Ubuntu
sudo apt-get update && sudo apt-get upgrade
Install git, nginx, php (+extension) and nodejs.
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install git nginx php5-cli php5-fpm php5-gd php5-mcrypt php5-curl nodejs
sudo apt-get install git php7.0-cli php7.0-gd php7.0-mcrypt php7.0-curl php7.0-mbstring php7.0-dom php7.0-zip php7.0-fpm nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
Creating a nginx config.
B) Raspbian
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -t stretch php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
C) OSX
brew install php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt nodejs npm
**Configure webserver**
Install Nginx,
sudo apt-get install nginx
or if you're running OSX use brew.
sudo brew install nginx
Creating a Nginx config.
sudo rm -f /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default
@@ -95,18 +120,13 @@ Copy and paste following config file; this file tells nginx where the web will b
location ~ \.php$
{
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Restart nginx
sudo service nginx restart
<a name="web-installation-source"></a>
### Install source
**Clone source**
Create a www location.
@@ -124,16 +144,19 @@ Install PHP packages by using composer.
Add write permission for the storage directory, and the kerberos config file.
sudo chmod -R 777 app/storage
sudo chmod 777 app/config/kerberos.php
sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod 777 config/kerberos.php
Install bower globally by using node package manager, this is installed when installing nodejs.
Install bower globally by using npm.
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm -g install bower
Install Front-end dependencies with bower
cd public
sudo bower --allow-root install
Reboot
sudo reboot
+7 -36
View File
@@ -14,41 +14,12 @@ Contributing to the **web** repository requires both front- and back-end sklls.
<a name="installation"></a>
## Installation
The complete installation can be found on [**the advanced installation page**](/installation/advanced), describing the complete set of instructions. However for simplicity we will give a summarized version, as probably you will already have a development environment set up.
Install PHP dependencies
sudo apt-get install php5-cli php5-fpm php5-gd php5-mcrypt php5-curl nodejs
Get the source code from Github.
git clone https://github.com/kerberos-io/web && cd web
Install PHP packages by using composer.
curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/bin/composer
composer install
Change write permission on the storage directory.
chmod -R 777 app/storage
Install bower globally by using node package manager, this is installed when installing nodejs.
npm -g install bower
Install Front-end dependencies with bower
cd public
sudo bower --allow-root install
That's it..
The installation can be found on [**the generic installation page**](/installation/generic), describing the complete set of instructions.
<a name="versioning"></a>
## Versioning
As you've probably seen in the **installation summary** we are hosting our repositories on [**github**](https://github.com/kerberos-io). As any larger project we are also using a versioning strategy; an easy one :) we don't want to get the things complicated. The version strategy is based on this [**branching model**](http://nvie.com/posts/a-successful-git-branching-model/).
As you've probably seen in the **installation summary** we are hosting our repositories on [**github**](https://github.com/kerberos-io). As any larger project we are also using a versioning strategy; an easy one :) we don't want to get the things complicated. The version strategy is based on this [**branching model**](http://nvie.com/posts/a-successful-git-branching-model/).
The model includes:
@@ -72,7 +43,7 @@ The web is created with PHP and JS. It's obvious that we don't have developed al
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '41e71d86b40f28e771d4bb662b997f79625196afcca95a5abf44391188c695c6c1456e16154c75a211d238cc3bc5cb47') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
After composer is installed properly you can just do **composer install** or **composer update** within the root directory of the **web** repository; this will update all the dependencies if a newer version is available.
composer update
@@ -83,7 +54,7 @@ After composer is installed properly you can just do **composer install** or **c
[**Bower**](http://bower.io/) is a dependency manager for JS, it's very similar to composer. To install bower you'll need to download **nodejs** and execute following command:
npm -g install bower
After bower is installed you can install or update dependencies within the **/public** directory.
bower update
@@ -94,11 +65,11 @@ After bower is installed you can install or update dependencies within the **/pu
The web is created with two frameworks and a lot of third-party libraries.
<a name="laravel"></a>
### Laravel 4.2
### Laravel 5.4
[**Laravel**]((http://laravel.com) is a very **powerful** and **popular** PHP framework. This is also the main reason why the web is created with Laravel, the community is huge. A lot of people are writing tutorials and recording webcasts. This makes **getting started** with contributing to the web repository so **easy**. You will find all the information you need on the Laravel [**documentation site**](http://laravel.com/docs/4.2).
[**Laravel**]((http://laravel.com) is a very **powerful** and **popular** PHP framework. This is also the main reason why the web is created with Laravel, the community is huge. A lot of people are writing tutorials and recording webcasts. This makes **getting started** with contributing to the web repository so **easy**. You will find all the information you need on the Laravel [**documentation site**](http://laravel.com/docs/5.4).
<a name="backbonejs"></a>
### BackboneJS
[**BackboneJS**](http://backbonejs.org/) is a **lightweight** framework. It's used in the web to create the **dynamic behaviour** and **structure** the source code. You will find all the information you need on the BackeboneJS [**documentation site**](http://backbonejs.org/).
[**BackboneJS**](http://backbonejs.org/) is a **lightweight** framework. It's used in the web to create the **dynamic behaviour** and **structure** the source code. You will find all the information you need on the BackeboneJS [**documentation site**](http://backbonejs.org/).
+9 -8
View File
@@ -13,19 +13,20 @@ The web contains several important concepts and this is the right place where we
The web repository is not that big, however we give you a brief overview of the most important files/directories.
<a name="server"></a>
### Server
* **app/config/app.php** - this file contains Kerberos specific parameters; where the configuration files can be found, the user credentials to sign in, etc.
* **app/controllers** - MVC controllers
* **app/repositories** -repositories are injected into the controller.
* **app/api.php** - contains all the URI endpoints for Ajax calls.
* **app/repositories.php** - bind repositories to a specific interface - dependency injection.
* **app/routes.php** - url routing for pages.
* **config/app.php** - general application settings.
* **config/kerberos.php** - this file contains Kerberos.io specific parameters; the user credentials to sign in, etc.
* **app/Http/Controllers** - MVC controllers
* **app/Http/Repositories** -repositories are injected into the controller.
* **app/Providers/AppServiceProvider.php** - bind repositories to a specific interface - dependency injection.
* **routes/api.php** - contains all the URI endpoints for Ajax calls.
* **routes/web.php** - url routing for pages.
<a name="client"></a>
### Client
* **public/css/less** - LESS is used for the CSS.
* **public/js/app** - BackboneJS and RequireJS is used for building modular JS classes.
* **public/js/mustache** - Mustache is used for the client-side view rendering.
* **public/js/mustache** - Mustache is used for the client-side view rendering.
* **public/js/vendor** - This is where the bower extensions are installed.
* **public/capture** - A directory where images are written to by default.
* **public/bower.json** - The bower extensions used in the kerberos project.
@@ -34,4 +35,4 @@ The web repository is not that big, however we give you a brief overview of the
<a name="settings-page"></a>
## Settings page
One of the most importants reasons why the web exists is because it's a **GUI** to configure the machinery. The web contains a *settings* page where algorithms, expositors and much more can be configured. The web will convert the configuration files (from the machinery) into **HTML elements**, so e.g. when adding new algorithms or heuristics, the parameters will be shown on the settings page automatically. The only thing you need to do is to specify a type to each parameter. You will find an equivalent *view* with the same name in the **app/views/controls** directory.
One of the most important reasons why the web exists is because it's a **GUI** to configure the machinery. The web contains a *settings* page where algorithms, expositors and much more can be configured. There is a basic setting view and an advanced settings view. The advanced view will convert the configuration files (from the machinery) into **HTML elements**, so e.g. when adding new algorithms or heuristics, the parameters will be shown on the settings page automatically. The only thing you need to do is to specify a type to each parameter. You will find an equivalent *view* with the same name in the **resources/views/controls** directory.
+3 -1
View File
@@ -19,4 +19,6 @@ Kerberos can be used with any IP camera, that provides a streaming URL. Make sur
<a name="raspberry-pi-camera"></a>
## Raspberry Pi camera
You can use the Raspberry Pi camera (v1.3 and v2.1) with Kerberos.io, you just need to attach the camera and you are ready to go. The Raspberry Pi Camera Module is enabled by default in the web interface. Please note that if you didn't installed Kerberos with the image, you will need to enable the camera module yourself.
You can use the Raspberry Pi camera (v1.3 and v2.1) with Kerberos.io, you just need to attach the camera and you are ready to go. The Raspberry Pi Camera Module is enabled by default in the web interface. Please note that if you are running Raspbian, you'll **need to enable the camera module** yourself.
Using the Raspberry Pi camera will give **the best performance**, because Kerberos.io uses hardware acceleration for both the live streaming and the video recording. On a Raspberry Pi Zero W, **HD/30 FPS** can be achieved **with ease**.
+2 -2
View File
@@ -15,7 +15,7 @@ The parameters of the USB-camera can be found in the **config/capture.xml** file
<delay type="number">0</delay>
<angle type="number">0</angle>
</USBCamera>
</captures>
### Framewidth and -height
@@ -32,4 +32,4 @@ You can provide a delay/interval (milliseconds) between two captures.
### Angle
By defining an angle (degrees), you can rotate the images taken by the capture device. For example if you would mount the camera upside down, than you could enter the value 180 as the angle; this will flip the images.
By defining an angle (degrees), you can rotate the images taken by the capture device. For example if you would mount the camera upside down, than you could enter the value 180 as the angle; this will flip the images.
+2 -2
View File
@@ -15,7 +15,7 @@ The parameters of the IP capture device can be found in the **config/capture.xml
<delay type="number">0</delay>
<angle type="number">0</angle>
</IPCamera>
</captures>
### URL
@@ -32,4 +32,4 @@ You can provide a delay/interval (milliseconds) between two captures.
### Angle
By defining an angle (degrees), you can rotate the images taken by the capture device. For example if you would mount the camera upside down, than you could enter the value 180 as the angle; this will flip the images.
By defining an angle (degrees), you can rotate the images taken by the capture device. For example if you would mount the camera upside down, than you could enter the value 180 as the angle; this will flip the images.
+19 -6
View File
@@ -9,11 +9,16 @@ The parameters of the Raspberry Pi Camera Module can be found in the **config/ca
<captures>
<RaspiCamera>
<frameWidth type="number">800</frameWidth>
<frameHeight type="number">640</frameHeight>
<delay type="number">0</delay>
<angle type="number">0</angle>
</RaspiCamera>
<frameWidth type="number">640</frameWidth>
<frameHeight type="number">480</frameHeight>
<delay type="number">1400</delay>
<angle type="number">0</angle>
<framerate type="number">30</framerate>
<sharpness type="number">0</sharpness>
<saturation type="number">0</saturation>
<contrast type="number">0</contrast>
<brightness type="number">50</brightness>
</RaspiCamera>
</captures>
@@ -27,4 +32,12 @@ You can provide a delay/interval (milliseconds) between two captures.
### Angle
By defining an angle (degrees), you can rotate the images taken by the capture device. For example if you would mount the camera upside down, than you could enter the value 180 as the angle; this will flip the images.
By defining an angle (degrees), you can rotate the images taken by the capture device. For example if you would mount the camera upside down, than you could enter the value 180 as the angle; this will flip the images.
### Framerate
The number of frames captures per second. Please note that this parameter will also be used if you're recording video. E.g. if you set this parameter to 20, you're recorded videos will also be 20 FPS.
### Sharpness, saturation, contrast, brightness
Camera properties which you can specify to tune the settings to your needs.
+26 -13
View File
@@ -9,25 +9,30 @@ The parameters of the Video output device can be found in the **config/io**.xml
<ios>
<Video>
<fps type="number">3</fps>
<recordAfter type="number">5</recordAfter>
<extension type="number">mp4</extension>
<codec type="number">h264</codec>
<fileFormat type="text">timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token</fileFormat>
<directory type="text">/etc/opt/kerberosio/capture/</directory>
<markWithTimestamp type="bool">false</markWithTimestamp>
<timestampColor type="text">white</timestampColor>
<privacy type="bool">false</privacy>
<fps type="number">3</fps>
<recordAfter type="number">5</recordAfter>
<maxDuration type="number">120</maxDuration>
<extension type="number">mp4</extension>
<codec type="number">h264</codec>
<fileFormat type="text">timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token</fileFormat>
<directory type="text">/etc/opt/kerberosio/capture/</directory>
<hardwareDirectory type="text">/etc/opt/kerberosio/h264/</hardwareDirectory>
<enableHardwareEncoding type="bool">true</enableHardwareEncoding>
<markWithTimestamp type="bool">false</markWithTimestamp>
<timestampColor type="text">white</timestampColor>
<privacy type="bool">false</privacy>
</Video>
</ios>
### FPS
The frames per second of the video being recorded. Please note that this number is limited, and depends heavily on your hardware setup. You'll be receiving following warning in the systems logs, if Kerberos.io can't write the desired FPS. For recommend recording at 5-8FPS for a Rasberry Pi 2/3.
The frames per second of the video being recorded. Please note that this number is limited and depends heavily on your hardware setup. You'll be receiving following warning in the systems logs, if Kerberos.io can't write the desired FPS. When using an USB or IP camera, we recommend recording at 5-8FPS for a Rasberry Pi 2/3.
[trivial] IoVideo: framerate is too fast, can't record video at this speed (8/FPS)
Note that when you're a using a Raspberry Pi camera, there is no limitation on the FPS due to the hardware encoding. For example you can record at 1080P 30FPS with a Raspberry Pi Zero W.
### Record after
The number of seconds recorded after the last valid event was detected. This means that when a video is already recording, and a valid event was detected, the video will be expanded with x more seconds.
@@ -46,7 +51,15 @@ The format that will be used for the name of the image. One or more variables ca
### Directory
The directory where the image will be saved to. By default images are saved to the **/etc/opt/kerberosio/capture** directory.
The directory where the videos will be saved. By default videos are saved to the **/etc/opt/kerberosio/capture** directory.
### Hardware directory
When using onboard hardware encoding (e.g. with Raspberry Pi camera), **h264 video files are generated** and stored in this directory. **Afterwards** these h264 files will be **containerized to mp4 files**, and stored in the Directory path.
### Enable Hardware encoding
A boolean which can enable or disable hardware encoding. Please note that this option is enabled by default, but does not mean that it will work if you choose to use an USB camera.
### Mark with timestamp
@@ -66,4 +79,4 @@ The privacy mode can be activated to remove some parts from the video. This espe
After updating the configuration, you'll see that the pixels outside your region of interest (ROI) are made black; the image below illustrates this.
![Video privacy](1_video-io-privacy.png)
![Video privacy](1_video-io-privacy.png)
+3 -3
View File
@@ -11,12 +11,12 @@ The parameters of the Script output device can be found in the **config/io**.xml
<Script>
<path type="text">/etc/opt/kerberosio/scripts/run.sh</path>
</Script>
</ios>
### Path
The frames per second of the video being recorded. Please note that this number is limited, and depends heavily on your hardware setup. You'll be receiving following warning in the systems logs, if Kerberos.io can't write the desired FPS. For recommend recording at 5-8FPS for a Rasberry Pi 2/3.
The location of the script that will be executed on detection.
## Example
@@ -45,4 +45,4 @@ By default the script will point to **/etc/opt/kerberosio/scripts/run.sh**, whic
changes=$(echo $JSON | pythfon -c "import sys, json; print json.load(sys.stdin)['numberOfChanges']")
image=$(echo $JSON | python -c "import sys, json; print json.load(sys.stdin)['pathToImage']")
The idea is that you can use **Python** in your bash script, to parse the JSON object send as first parameter. Afterwards you can do with the output what you want.
The idea is that you can use **Python** in your bash script, to parse the JSON object send as first parameter. Afterwards you can do with the output what you want.
+10 -2
View File
@@ -12,8 +12,10 @@ The parameters for the supported streaming protocols can be found in the *config
<enabled type="bool">true</enabled>
<streamPort type="number">8889</streamPort>
<quality type="number">75</quality>
<username type="number"></username>
<password type="number">75</password>
</Mjpg>
</streams>
@@ -27,4 +29,10 @@ The port on which the stream is available.
### Quality
The quality is a value between [0-100]. The lower the quality, the more the image will be compressed.
The quality is a value between [0-100]. The lower the quality, the more the image will be compressed. If you're using the RaspberryPi Camera module, this option will be ignored.
### Username/password
You can **secure** the MJPEG streaming **with a username and password**. These credentials will be used to authorize your requests using **Basic Authentication**. Please note that once enabled, the live stream on the dashboard page can fail; however it will work if you open it directly in your browser or ip camera client. The format of the streaming url, after authentication enabled, will look as following:
http://username:password@ip-camera:8899