Compare commits

...

44 Commits

Author SHA1 Message Date
cedricve
9a0f4f38e4 resolved wifi issue RPI2 image 2015-06-06 22:55:40 +02:00
cedricve
35dd422f7d temporary rollback, issue with rpi 2 image. 2015-06-06 13:12:40 +02:00
cedricve
7cce2ba1b3 added release 1.0.2 2015-06-04 07:10:07 +02:00
cedricve
176bbc3554 hotfix: merge changes mrz1277 in dev 2015-06-03 21:31:21 +02:00
Cédric Verstraeten
eea221af14 Merge pull request #1 from mrz1277/master
typo
2015-06-03 21:25:21 +02:00
yakiyama-iMac
c495535212 typo 2015-06-04 04:20:20 +09:00
cedricve
b5fc5d9df9 typo 2015-06-03 00:16:35 +02:00
cedricve
ada0999cb3 styling 2015-06-03 00:16:04 +02:00
cedricve
453970f919 updated styling 2015-06-03 00:15:46 +02:00
cedricve
d7212ff2ec updated styling 2015-06-03 00:15:27 +02:00
cedricve
16b2004a0d added nas section 2015-06-03 00:12:58 +02:00
cedricve
1e29b1bb78 fix 2015-05-31 15:32:09 +02:00
cedricve
90619c9e92 fix 2015-05-31 15:31:21 +02:00
cedricve
2af1bd88e6 missing links 2015-05-31 15:28:57 +02:00
cedricve
cd0297a1e8 typo 2015-05-31 15:26:49 +02:00
cedricve
8047440c6e fix 2015-05-31 15:26:19 +02:00
cedricve
27a1982212 fix 2015-05-31 15:25:55 +02:00
cedricve
1044636cf4 added extra information for installation and GUI 2015-05-31 15:22:38 +02:00
cedricve
c31e94c9ff Merge branch 'develop' 2015-05-29 12:57:54 +02:00
cedricve
f13ff40f82 update mega.co.nz links 2015-05-29 12:57:29 +02:00
cedricve
b587135e93 typos + wrong url 2015-05-26 19:28:49 +02:00
cedricve
4c51714655 Merge branch 'develop' 2015-05-26 19:06:19 +02:00
cedricve
983a58daef fix typos + removed paragraph at section installation 2015-05-26 19:05:31 +02:00
cedricve
6c987c574b Merge branch 'master' into develop 2015-05-25 15:16:48 +02:00
cedricve
7077be57f3 missing ) 2015-05-25 15:16:33 +02:00
cedricve
f2df547479 Merge branch 'develop' 2015-05-25 15:15:02 +02:00
cedricve
85278c18fd add missing expand sd card for Raspberry Pi 2 2015-05-25 15:14:48 +02:00
cedricve
266a11ff7b Merge branch 'master' into develop 2015-05-24 10:40:40 +02:00
cedricve
9f8bcb219b update image to v1.0.1 2015-05-24 10:40:26 +02:00
cedricve
6f290dddb2 Merge branch 'develop' 2015-05-23 17:10:03 +02:00
cedricve
d32ad81877 small fixes to run script 2015-05-23 17:09:50 +02:00
cedricve
f7032fcd34 Merge branch 'develop' 2015-05-23 00:29:04 +02:00
cedricve
368987c9e3 replace clean up 2015-05-23 00:28:47 +02:00
cedricve
f60cd19512 Merge branch 'master' into develop 2015-05-23 00:07:59 +02:00
cedricve
e5e582110e small correction Raspberry Pi 2015-05-23 00:07:47 +02:00
cedricve
04569ad076 Merge branch 'develop' 2015-05-23 00:05:38 +02:00
cedricve
55d4c0d759 add cleanup script for cloud 2015-05-23 00:05:25 +02:00
Cédric Verstraeten
60559c2a1d Update 3_installation.md 2015-04-26 21:54:17 +02:00
Cédric Verstraeten
157239a026 Update 3_installation.md 2015-04-26 21:54:03 +02:00
Cédric Verstraeten
b46e8b8a8a Update 3_installation.md 2015-04-24 13:34:41 +02:00
Cédric Verstraeten
a6a355993e Update 3_installation.md 2015-04-24 13:34:30 +02:00
Cédric Verstraeten
5a0e01b941 Update 3_installation.md 2015-04-22 15:38:18 +02:00
Cédric Verstraeten
5524f68a97 Update 3_installation.md 2015-04-22 15:38:16 +02:00
Cédric Verstraeten
1da2b2a1a5 Update README.md 2015-04-21 20:50:22 +02:00
17 changed files with 494 additions and 48 deletions

BIN
1.0.0/1_how-to-access.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -7,6 +7,8 @@
* [Windows: transfer image](#windows-transfer-image)
* [OSX/Linux: transfer image with terminal](#transfer-image-with-terminal)
* [(Optional) Setup WIFI connection](#setup-wifi-connection)
* [Power on the Raspberry Pi](#power-on-raspberry-pi)
* [(Optional) Access the Raspberry Pi with SSH](#access-raspberry-pi)
* [Install from source](#install-from-source)
Kerberos is **easy to install**, you just have to copy the Kerberos image to your SD card, plug the SD card into your Raspberry Pi and that's it. It can also be installed on other devices than the Raspberry Pi; for development or production. Therefore you will need to compile the machinery from source and install the webinterface with your favorite webserver.
@@ -16,9 +18,6 @@ Kerberos is **easy to install**, you just have to copy the Kerberos image to you
If you want to use Kerberos.io **as a service**, this would be the preferred way. Kerberos is provided as an image, a pre-installed operating system. The only thing you have to do to make things work, is to transfer the image to your SD card. After transferring you can just plug the SD card into your Raspberry Pi and kerberos will work; isn't that great!
The're a lot of different ways to accomplish this, and they are different according the operating system you will be using to transfer the image.
<a name="download-the-image"></a>
### 1. Download the image
@@ -28,13 +27,13 @@ First you will need to download the Kerberos image; click on the image below. Th
The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. Its a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!OEAi3BaR!ukDKabNQVkhdGVOB0HiSUKiZ3sZyjIRk9wCuMA6Fyv0)
#### Raspberry Pi Model 2
The Raspberry Pi 2 is the successor to the Raspberry Pi. It builds upon the original model B+ upgrading to 1 GB of RAM, and replacing the aged ARMv6l single-core with an ARMv7l Cortex-A7 quad-core.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!PBhh2LhB!SH2VyZs1dJMRUbVmSzvem6G-itwfqSvBiuVdPDLfJeQ)
<a name="insert-your-sd-card"></a>
### 2. Insert your SD Card
@@ -95,7 +94,19 @@ In Terminal, enter the following command ensuring that you identify the correct
If you will be using Kerberos.io with a WIFI dongle, then check out the [F.A.Q. page](/1.0.0/FAQ#setup-wifi).
<a name="power-on-raspberry-pi"></a>
### 5. Power on the Raspberry Pi
When the installation is completed, you can **plug the SD card** into your Raspberry Pi, and that's all. From this point you need to **figure out the IP address** of your Raspberry Pi. If you found your IP address (dynamic or static), you can **open your favorite browser** and type in the IP address. This will open the Kerberos login page, which you can **access** with the username: **root** and password: **root**.
![Login page kerberos.io webinterface](1_how-to-access.png)
<a name="access-raspberry-pi"></a>
### 6. (Optional) Access the Raspberry Pi with SSH
To use Kerberos you only need access to the webinterface, however you can also **[access the system with SSH](/1.0.0/FAQ#how-to-access-the-pi)**.
<a name="install-from-source"></a>
## Install from source
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to [compile the machinery](/1.0.0/machinery/installation) from source and [import the webinterface](/1.0.0/web/installation) into your favorite webserver.
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to **[compile the machinery](/1.0.0/machinery/installation)** from source and **[import the webinterface](/1.0.0/web/installation)** into your favorite webserver.

View File

@@ -1,4 +1,4 @@
# USB Camera
# Raspberry Camera
You can use the Raspberry Pi Camera Module with Kerberos. You just need to attach the camera module and you're ready to go. The Raspberry Pi Camera Module is enabled by default in the web interface.

View File

@@ -1,6 +1,6 @@
# TCP/IP client
The TCP/IP client will send a TCP package to a server.
The TCP/IP client will send a TCP packet to a server.
## Web interface
@@ -22,7 +22,7 @@ The parameters of the TCP/IP client can be found in the config/io.xml file, but
### Server
The ip of the TCP server.
The IP of the TCP server.
### Port
@@ -34,4 +34,4 @@ You can send some data to a TCP server.
## Examples
More information can be found [here](/1.0.0/addons/TCP_listener).
More information can be found [here](/1.0.0/addons/TCP_Listener).

View File

@@ -34,12 +34,13 @@ Install node plugins
npm install
npm install -g grunt-cli
npm install -g forever
## Auto-start grunt
Create service file for cloud
nano /etc/systemd/system/cloud.service
nano /etc/systemd/system/cloud.service
Copy and paste the configuration to the cloud.service
@@ -48,13 +49,11 @@ Copy and paste the configuration to the cloud.service
[Service]
Type=oneshot
ExecStart= /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
ExecStart= /usr/bin/forever /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
[Install]
WantedBy=multi-user.target
Enable the service to start on boot
systemctl enable cloud.service
systemctl enable cloud.service

25
1.0.0/42_addons/3_NAS.md Normal file
View File

@@ -0,0 +1,25 @@
# NAS
By default images are stored on the SD card of the Raspberry Pi, in the folder **/home/kerberos-web/public/capture**. However it's also possible to store the images directly on a NAS (e.g. WD MyBook). To achieve this, you will need to do some minimal modifications to the Kerberos image.
## Let's get started
First you will need to connect to the Raspberry Pi, you can find a how to **[on our FAQ page](/1.0.0/FAQ#how-to-access-the-pi)**.
Next you will need to **mount the NAS to the filesystem** of your Rapsberry Pi. In order to make a permanent mount you need to **edit** the **fstab file**.
nano /etc/fstab
Add following line (replace variables **with your own credentials**):
//ip_address_to_your_nas/directory_on_your_nas /home/kerberos-web/public/capture cifs username=user_on_your_nas,password=password_for_your_nas,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
Mount the NAS
mount -a
Check if the mount was **successful**, you should see the already existing content on your referred NAS directory.
cd /home/kerberos-web/public/capture && ls -l
And *that's it*. From now the machinery will store its images directly on your NAS, and the web interface will visualize them.

View File

@@ -1,13 +1,32 @@
# Release notes
* [1.0.2](#1-0-2)
* [1.0.1](#1-0-1)
* [1.0.0](#1-0-0)
<a name="1-0-2"></a>
## 1.0.2
#### Web
* Timezone on settings page is also used for the webinterface.
#### Machinery
* Added extra timezones to timezone.xml
<a name="1-0-1"></a>
## 1.0.1
#### Hot fixes
* Improved error handling (date search)
* Improved memory cleanup
<a name="1-0-0"></a>
## 1.0.0
First commit of Kerberos.io
#### New
#### First commit of Kerberos.io
* Camera support: **USBCamera** (V4L), **Raspberry Pi camera module** (MMAL).
* Conditions: **Enabled** (turn on/off Kerberos) and active **Time** per day.

View File

@@ -2,18 +2,30 @@
The FAQ, Frequently Asked Questions, page contains **technical solutions** for common problems concerning the installation of Kerberos. This page does **NOT** contain non-technical questions and answers; The Raspberry Pi doesn't turn on, I don't have WIFI access, etc. Therefore you can access our [**knowledge base**](https://kerberosio.zendesk.com).
* [How to access the Raspberry Pi](#how-to-access-the-pi)
* [How to expand SD card root partition](#expand-sd-card)
* [Arch Linux](#expand-sd-card-archlinux)
* [How to backup SD card](#backup-sd-card)
* [How to setup WIFI connection on Raspberry Pi](#setup-wifi)
* [How to enable Raspberry Pi Camera Module](#how-to-enable-camera-module)
* [Arch Linux](#how-to-enable-camera-module-archlinux)
* [Clean up disk and memory space](#clean-up-disk)
<a name="how-to-access-the-pi"></a>
## How to access the Raspberry Pi
Kerberos is built on Arch Linux, which by default is installed **without** a **Graphical User Interface**. This means that when attaching the Raspberry Pi to a monitor or connecting with SSH, will **only show you a command prompt**.
macbook:~ cedricverstraeten$ ssh root@ 192.168.0.10
root@ 192.168.0.10's password:
You can sign in with the default Arch Linux credentials: username "**root**" and password "**root**".
<a name="expand-sd-card"></a>
## How to expand SD card root partition
<a name="expand-sd-card-archlinux"></a>
### Arch Linux
### Arch Linux (Raspberry Pi A, B, B+)
After logging in you view the status of filesystem (the output can be different):
@@ -144,6 +156,116 @@ Check and it is done :-)
tmpfs 231M 0 231M 0% /tmp
/dev/mmcblk0p1 90M 24M 67M 27% /boot
### Arch Linux (Raspberry Pi 2)
After logging in you view the status of filesystem (the output can be different):
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.2G 2.8G 161M 95% /
devtmpfs 427M 0 427M 0% /dev
tmpfs 431M 0 431M 0% /dev/shm
tmpfs 431M 392K 431M 1% /run
tmpfs 431M 0 431M 0% /sys/fs/cgroup
tmpfs 431M 0 431M 0% /tmp
/dev/mmcblk0p1 100M 18M 83M 18% /boot
tmpfs 87M 0 87M 0% /run/user/0
Using the command fdisk will edit the filesystem /dev/mmcblk0:
[root@alarmpi ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.23.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):
List the information and delete partition 2:
Command (m for help): p
Disk /dev/mmcblk0: 7.2 GiB, 7746879488 bytes, 15130624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4bce3dec
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 206847 204800 100M c W95 FAT32 (LBA)
/dev/mmcblk0p2 206848 7000000 6793153 3.2G 83 Linux
Command (m for help): d
Partition number (1,2,5, default 5): 2
Partition 2 has been deleted.
Command (m for help):
Create a new extended partition a logical volume:
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2):
First sector (206848-15130623, default 206848):
Last sector, +sectors or +size{K,M,G,T,P} (206848-15130623, default 15130623):
Created a new partition 2 of type 'Linux' and of size 7.1 GiB.
Check whether top block starts in the same place as the original (start)
Command (m for help): p
Disk /dev/mmcblk0: 7.2 GiB, 7746879488 bytes, 15130624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4bce3dec
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 206847 204800 100M c W95 FAT32 (LBA)
/dev/mmcblk0p2 206848 15130623 14923776 7.1G 83 Linux
Command (m for help):
If it starts again (in this case on 186368 p2 a 188416 p5) write changes and reboot.
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@alarmpi ~]# reboot
After booting the system we online enlarge root partitions
[root@alarmpi ~]# resize2fs /dev/mmcblk0p2
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p2 is now 1865472 (4k) blocks long.
Check and it is done :-)
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.0G 2.8G 3.9G 43% /
devtmpfs 427M 0 427M 0% /dev
tmpfs 431M 0 431M 0% /dev/shm
tmpfs 431M 392K 431M 1% /run
tmpfs 431M 0 431M 0% /sys/fs/cgroup
tmpfs 431M 0 431M 0% /tmp
/dev/mmcblk0p1 100M 18M 83M 18% /boot
tmpfs 87M 0 87M 0% /run/user/0
<a name="backup-sd-card"></a>
## How to backup SD card
@@ -156,7 +278,7 @@ You can backup your SD card, by typing following command in your terminal. This
### Installed Kerberos.io from image
When kerberos is installed with the image, you can edit the wireless.conf file on the SD card. Insert the SD card in your workstation and open the file **/boot/wireless.conf**. You will see a similar config like below, edit the ESSID property with the name of your WIFI connection and the property Key with the WIFI password.
When kerberos is installed with the image, you can edit the wireless.conf file on the SD card. Insert the SD card in your workstation and open the file **wireless.conf**. You will see a similar config like below, edit the ESSID property with the name of your WIFI connection and the property Key with the WIFI password.
Description='A simple WPA encrypted wireless connection'
@@ -226,4 +348,51 @@ To enable the camera module, you will need to add these lines to your /boot/conf
gpu_mem=128
start_file=start_x.elf
fixup_file=fixup_x.dat
disable_camera_led=1
disable_camera_led=1
<a name="clean-up-disk"></a>
## Clean up disk and memory space
The SD card of your Raspberry Pi, has limited space, therefore we need some process to clean up the images taken by the machinery.
mkdir /home/bash
nano /home/bash/run.sh
Copy paste the bash script
#!/bin/bash
################################################################
# Check if memory is more than 70%, if so refresh nodejs scripts
##
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
then
/usr/bin/forever restartall ;
fi;
#############################################
# Only keep images of last 3 days on sd-card.
##
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
##############################################################
# Check if disk size is more than 95%, if so remove some files
# from the capture directory.
##
if [[ $(df -h | grep /dev/root | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 95 ]];
then
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
fi;
Give rights to bash script
chmod +x /home/bash/run.sh
chmod 755 /home/bash/run.sh
Start cronjob that will run this bash script
crontab -e
Add following line
*/10 * * * * /bin/sh /home/bash/run.sh

View File

@@ -1,6 +1,6 @@
#KERBEROS.IO - documentation
This repository contains all the documentation that is displayed on the [documentation website](http://kerberos.io/docs). The documentation is written in [markdown](http://markdowntutorial.com/) The documentation includes information about: how kerberos works, how to install it and also some technical information for developers who are willing to contribute; for example how to add a new algorithm or a new output device.
This repository contains all the documentation that is displayed on the [documentation website](https://doc.kerberos.io/). The documentation is written in [markdown](http://markdowntutorial.com/) The documentation includes information about: how kerberos works, how to install it and also some technical information for developers who are willing to contribute; for example how to add a new algorithm or a new output device.
## Folder structure

BIN
dev/1_how-to-access.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -7,6 +7,8 @@
* [Windows: transfer image](#windows-transfer-image)
* [OSX/Linux: transfer image with terminal](#transfer-image-with-terminal)
* [(Optional) Setup WIFI connection](#setup-wifi-connection)
* [Power on the Raspberry Pi](#power-on-raspberry-pi)
* [(Optional) Access the Raspberry Pi with SSH](#access-raspberry-pi)
* [Install from source](#install-from-source)
Kerberos is **easy to install**, you just have to copy the Kerberos image to your SD card, plug the SD card into your Raspberry Pi and that's it. It can also be installed on other devices than the Raspberry Pi; for development or production. Therefore you will need to compile the machinery from source and install the webinterface with your favorite webserver.
@@ -16,9 +18,6 @@ Kerberos is **easy to install**, you just have to copy the Kerberos image to you
If you want to use Kerberos.io **as a service**, this would be the preferred way. Kerberos is provided as an image, a pre-installed operating system. The only thing you have to do to make things work, is to transfer the image to your SD card. After transferring you can just plug the SD card into your Raspberry Pi and kerberos will work; isn't that great!
The're a lot of different ways to accomplish this, and they are different according the operating system you will be using to transfer the image.
<a name="download-the-image"></a>
### 1. Download the image
@@ -28,13 +27,13 @@ First you will need to download the Kerberos image; click on the image below. Th
The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. Its a capable little PC which can be used for many of the things that your desktop PC does, like spreadsheets, word-processing and games. It also plays high-definition video.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!OEAi3BaR!ukDKabNQVkhdGVOB0HiSUKiZ3sZyjIRk9wCuMA6Fyv0)
#### Raspberry Pi Model 2
The Raspberry Pi 2 is the successor to the Raspberry Pi. It builds upon the original model B+ upgrading to 1 GB of RAM, and replacing the aged ARMv6l single-core with an ARMv7l Cortex-A7 quad-core.
![Kerberos.io image](3_kerberos-image.png)
[![Kerberos.io image](3_kerberos-image.png)](https://mega.co.nz/#!PBhh2LhB!SH2VyZs1dJMRUbVmSzvem6G-itwfqSvBiuVdPDLfJeQ)
<a name="insert-your-sd-card"></a>
### 2. Insert your SD Card
@@ -93,9 +92,21 @@ In Terminal, enter the following command ensuring that you identify the correct
<a name="setup-wifi-connection"></a>
### 4. (Optional) Setup WIFI connection
If you will be using Kerberos.io with a WIFI dongle, then check out the [F.A.Q. page](/1.0.0/FAQ#setup-wifi).
If you will be using Kerberos.io with a WIFI dongle, then check out the [F.A.Q. page](/dev/FAQ#setup-wifi).
<a name="power-on-raspberry-pi"></a>
### 5. Power on the Raspberry Pi
When the installation is completed, you can **plug the SD card** into your Raspberry Pi, and that's all. From this point you need to **figure out the IP address** of your Raspberry Pi. If you found your IP address (dynamic or static), you can **open your favorite browser** and type in the IP address. This will open the Kerberos login page, which you can **access** with the username: **root** and password: **root**.
![Login page kerberos.io webinterface](1_how-to-access.png)
<a name="access-raspberry-pi"></a>
### 6. (Optional) Access the Raspberry Pi with SSH
To use Kerberos you only need access to the webinterface, however you can also **[access the system with SSH](/dev/FAQ#how-to-access-the-pi)**.
<a name="install-from-source"></a>
## Install from source
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to [compile the machinery](/1.0.0/machinery/installation) from source and [import the webinterface](/1.0.0/web/installation) into your favorite webserver.
This will be the procedure if you want to contribute to Kerberos or if you want to use Kerberos on your local machine. To install Kerberos from source; you will need to **[compile the machinery](/dev/machinery/installation)** from source and **[import the webinterface](/dev/web/installation)** into your favorite webserver1.

View File

@@ -1,4 +1,4 @@
# USB Camera
# Raspberry Camera
You can use the Raspberry Pi Camera Module with Kerberos. You just need to attach the camera module and you're ready to go. The Raspberry Pi Camera Module is enabled by default in the web interface.

View File

@@ -1,6 +1,6 @@
# TCP/IP client
The TCP/IP client will send a TCP package to a server.
The TCP/IP client will send a TCP packet to a server.
## Web interface
@@ -22,7 +22,7 @@ The parameters of the TCP/IP client can be found in the config/io.xml file, but
### Server
The ip of the TCP server.
The IP of the TCP server.
### Port
@@ -34,4 +34,4 @@ You can send some data to a TCP server.
## Examples
More information can be found [here](/1.0.0/addons/TCP_listener).
More information can be found [here](/dev/addons/TCP_Listener).

View File

@@ -20,20 +20,21 @@ The cloud application is attached to the production bucket, so only images that
If you installed Kerberos from the image, you don't need to follow this tutorial as the service is installed natively.
cd /home
cd /home
Create a new directory
mkdir cloud && cd cloud
mkdir cloud && cd cloud
Checkout sync repository
git clone https://github.com/kerberos-io/sync-s3 .
git clone https://github.com/kerberos-io/sync-s3 .
Install node plugins
npm install
npm install -g grunt-cli
npm install
npm install -g grunt-cli
npm install -g forever
## Auto-start grunt
@@ -48,13 +49,11 @@ Copy and paste the configuration to the cloud.service
[Service]
Type=oneshot
ExecStart= /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
ExecStart= /usr/bin/forever /usr/bin/grunt --gruntfile /home/cloud/Gruntfile.js sync --force &
[Install]
WantedBy=multi-user.target
Enable the service to start on boot
systemctl enable cloud.service
systemctl enable cloud.service

25
dev/42_addons/3_NAS.md Normal file
View File

@@ -0,0 +1,25 @@
# NAS
By default images are stored on the SD card of the Raspberry Pi, in the folder **/home/kerberos-web/public/capture**. However it's also possible to store the images directly on a NAS (e.g. WD MyBook). To achieve this, you will need to do some minimal modifications to the Kerberos image.
## Let's get started
First you will need to connect to the Raspberry Pi, you can find a how to **[on our FAQ page](/dev/FAQ#how-to-access-the-pi)**.
Next you will need to **mount the NAS to the filesystem** of your Rapsberry Pi. In order to make a permanent mount you need to **edit** the **fstab file**.
nano /etc/fstab
Add following line (replace variables **with your own credentials**):
//ip_address_to_your_nas/directory_on_your_nas /home/kerberos-web/public/capture cifs username=user_on_your_nas,password=password_for_your_nas,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
Mount the NAS
mount -a
Check if the mount was **successful**, you should see the already existing content on your referred NAS directory.
cd /home/kerberos-web/public/capture && ls -l
And *that's it*. From now the machinery will store its images directly on your NAS, and the web interface will visualize them.

View File

@@ -1,13 +1,32 @@
# Release notes
* [1.0.2](#1-0-2)
* [1.0.1](#1-0-1)
* [1.0.0](#1-0-0)
<a name="1-0-2"></a>
## 1.0.2
#### Web
* Timezone on settings page is also used for the webinterface.
#### Machinery
* Added extra timezones to timezone.xml
<a name="1-0-1"></a>
## 1.0.1
#### Hot fixes
* Improved error handling (date search)
* Improved memory cleanup
<a name="1-0-0"></a>
## 1.0.0
First commit of Kerberos.io
#### New
#### First commit of Kerberos.io
* Camera support: **USBCamera** (V4L), **Raspberry Pi camera module** (MMAL).
* Conditions: **Enabled** (turn on/off Kerberos) and active **Time** per day.

View File

@@ -2,18 +2,30 @@
The FAQ, Frequently Asked Questions, page contains **technical solutions** for common problems concerning the installation of Kerberos. This page does **NOT** contain non-technical questions and answers; The Raspberry Pi doesn't turn on, I don't have WIFI access, etc. Therefore you can access our [**knowledge base**](https://kerberosio.zendesk.com).
* [How to access the Raspberry Pi](#how-to-access-the-pi)
* [How to expand SD card root partition](#expand-sd-card)
* [Arch Linux](#expand-sd-card-archlinux)
* [How to backup SD card](#backup-sd-card)
* [How to setup WIFI connection on Raspberry Pi](#setup-wifi)
* [How to enable Raspberry Pi Camera Module](#how-to-enable-camera-module)
* [Arch Linux](#how-to-enable-camera-module-archlinux)
* [Clean up disk and memory space](#clean-up-disk)
<a name="how-to-access-the-pi"></a>
## How to access the Raspberry Pi
Kerberos is built on Arch Linux, which by default is installed **without** a **Graphical User Interface**. This means that when attaching the Raspberry Pi to a monitor or connecting with SSH, will **only show you a command prompt**.
macbook:~ cedricverstraeten$ ssh root@ 192.168.0.10
root@ 192.168.0.10's password:
You can sign in with the default Arch Linux credentials: username "**root**" and password "**root**".
<a name="expand-sd-card"></a>
## How to expand SD card root partition
<a name="expand-sd-card-archlinux"></a>
### Arch Linux
### Arch Linux (Raspberry Pi A, B, B+)
After logging in you view the status of filesystem (the output can be different):
@@ -144,6 +156,116 @@ Check and it is done :-)
tmpfs 231M 0 231M 0% /tmp
/dev/mmcblk0p1 90M 24M 67M 27% /boot
### Arch Linux (Raspberry Pi 2)
After logging in you view the status of filesystem (the output can be different):
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.2G 2.8G 161M 95% /
devtmpfs 427M 0 427M 0% /dev
tmpfs 431M 0 431M 0% /dev/shm
tmpfs 431M 392K 431M 1% /run
tmpfs 431M 0 431M 0% /sys/fs/cgroup
tmpfs 431M 0 431M 0% /tmp
/dev/mmcblk0p1 100M 18M 83M 18% /boot
tmpfs 87M 0 87M 0% /run/user/0
Using the command fdisk will edit the filesystem /dev/mmcblk0:
[root@alarmpi ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.23.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):
List the information and delete partition 2:
Command (m for help): p
Disk /dev/mmcblk0: 7.2 GiB, 7746879488 bytes, 15130624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4bce3dec
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 206847 204800 100M c W95 FAT32 (LBA)
/dev/mmcblk0p2 206848 7000000 6793153 3.2G 83 Linux
Command (m for help): d
Partition number (1,2,5, default 5): 2
Partition 2 has been deleted.
Command (m for help):
Create a new extended partition a logical volume:
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2):
First sector (206848-15130623, default 206848):
Last sector, +sectors or +size{K,M,G,T,P} (206848-15130623, default 15130623):
Created a new partition 2 of type 'Linux' and of size 7.1 GiB.
Check whether top block starts in the same place as the original (start)
Command (m for help): p
Disk /dev/mmcblk0: 7.2 GiB, 7746879488 bytes, 15130624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4bce3dec
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 2048 206847 204800 100M c W95 FAT32 (LBA)
/dev/mmcblk0p2 206848 15130623 14923776 7.1G 83 Linux
Command (m for help):
If it starts again (in this case on 186368 p2 a 188416 p5) write changes and reboot.
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@alarmpi ~]# reboot
After booting the system we online enlarge root partitions
[root@alarmpi ~]# resize2fs /dev/mmcblk0p2
resize2fs 1.42.12 (29-Aug-2014)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p2 is now 1865472 (4k) blocks long.
Check and it is done :-)
[root@alarmpi ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 7.0G 2.8G 3.9G 43% /
devtmpfs 427M 0 427M 0% /dev
tmpfs 431M 0 431M 0% /dev/shm
tmpfs 431M 392K 431M 1% /run
tmpfs 431M 0 431M 0% /sys/fs/cgroup
tmpfs 431M 0 431M 0% /tmp
/dev/mmcblk0p1 100M 18M 83M 18% /boot
tmpfs 87M 0 87M 0% /run/user/0
<a name="backup-sd-card"></a>
## How to backup SD card
@@ -156,7 +278,7 @@ You can backup your SD card, by typing following command in your terminal. This
### Installed Kerberos.io from image
When kerberos is installed with the image, you can edit the wireless.conf file on the SD card. Insert the SD card in your workstation and open the file **/boot/wireless.conf**. You will see a similar config like below, edit the ESSID property with the name of your WIFI connection and the property Key with the WIFI password.
When kerberos is installed with the image, you can edit the wireless.conf file on the SD card. Insert the SD card in your workstation and open the file **wireless.conf**. You will see a similar config like below, edit the ESSID property with the name of your WIFI connection and the property Key with the WIFI password.
Description='A simple WPA encrypted wireless connection'
@@ -226,4 +348,51 @@ To enable the camera module, you will need to add these lines to your /boot/conf
gpu_mem=128
start_file=start_x.elf
fixup_file=fixup_x.dat
disable_camera_led=1
disable_camera_led=1
<a name="clean-up-disk"></a>
## Clean up disk and memory space
The SD card of your Raspberry Pi, has limited space, therefore we need some process to clean up the images taken by the machinery.
mkdir /home/bash
nano /home/bash/run.sh
Copy paste the bash script
#!/bin/bash
################################################################
# Check if memory is more than 70%, if so refresh nodejs scripts
##
if [[ $(free | grep Mem | awk -F' ' '{ print $3/$2*100 }') > 70.0 ]];
then
/usr/bin/forever restartall ;
fi;
#############################################
# Only keep images of last 3 days on sd-card.
##
find /home/kerberos-web/public/capture/ -type f -name '*.jpg' -mtime +1 -exec rm {} \;
##############################################################
# Check if disk size is more than 95%, if so remove some files
# from the capture directory.
##
if [[ $(df -h | grep /dev/root | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 95 ]];
then
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 500);
fi;
Give rights to bash script
chmod +x /home/bash/run.sh
chmod 755 /home/bash/run.sh
Start cronjob that will run this bash script
crontab -e
Add following line
*/10 * * * * /bin/sh /home/bash/run.sh