Compare commits

...

36 Commits

Author SHA1 Message Date
Cédric Verstraeten
48cce20353 changed installation procedure 2015-07-05 20:42:03 +02:00
Cédric Verstraeten
e312ec391c change installation procedure 2015-07-05 20:41:06 +02:00
Cédric Verstraeten
1cd7410440 release 1.0.3 2015-07-05 20:23:19 +02:00
Cédric Verstraeten
dc63f9e62d release 1.0.3 2015-07-05 20:21:25 +02:00
Cédric Verstraeten
dfc74857e3 zipped images 2015-06-25 21:57:40 +02:00
Cédric Verstraeten
f243a02fd9 moved storage to google drive 2015-06-25 20:41:13 +02:00
Cédric Verstraeten
7d5818e21d hotfixes on images: resolved memory leak, optimized cloud sync 2015-06-24 07:00:15 +02:00
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
16 changed files with 436 additions and 92 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,25 +18,21 @@ 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
First you will need to download the Kerberos image; click on the image below. The Kerberos.io image contains a Linux operating system, built on Arch Linux. The image has the machinery and webinterface installed, and ofcourse all the dependencies Kerberos needs. With this image you just have to plugin the SD card in your Raspberry Pi and you're done.
#### Raspberry Pi Model 2 (Recommended)
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)](https://drive.google.com/open?id=0B-2b4NYY_1xuUmxxOURISjQweGc)
#### Raspberry Pi Model A, A+, B and B+
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)](https://mega.co.nz/#!vY4WjKJD!2sZUuhzeVDFu47hSOQ94Jh27v0BLYpf6MRTBBzGfkrc)
#### 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)](https://mega.co.nz/#!6AAGlAwa!dJqbpGBG_k2ZA2FACtTbY4WR2azaV2Izeur-k3_4RlU)
[![Kerberos.io image](3_kerberos-image.png)](https://drive.google.com/open?id=0B-2b4NYY_1xuMWpLcU8zWjl2cTg)
<a name="insert-your-sd-card"></a>
### 2. Insert your SD Card
@@ -95,7 +93,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

@@ -35,10 +35,6 @@ Compile kerberos
cd kerberos-io && mkdir build && cd build
cmake .. && make && make check
Add link library to path
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/home/kerberos-io/build/thirdparty/lib/
Give rights to config files
chmod -R 777 ../config
@@ -62,22 +58,6 @@ Copy and paste the configuration to the kerberos.service
[Install]
WantedBy=multi-user.target
Create timer file for kerberos
nano /etc/systemd/system/kerberos.timer
Copy and paste the configuration to the kerberos.timer
[Unit]
Description=Runs kerberos.service, 1 min after system boot.
[Timer]
OnBootSec=1min
Unit=kerberos.service
[Install]
WantedBy=multi-user.target
Enable the service to start on boot
systemctl enable kerberos.timer
systemctl enable kerberos.service

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).

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,53 @@
# Release notes
* [1.0.3](#1-0-3)
* [1.0.2](#1-0-2)
* [1.0.1](#1-0-1)
* [1.0.0](#1-0-0)
<a name="1-0-3"></a>
## 1.0.3
#### Web
* Optimize performance, new datastructure has been implemented.
#### Machinery
* Memory optimization.
* Removal of images older than 3 days have been removed.
* Start machinery automatically (delay has been removed).
#### Cloud
* Resolved file exist problem.
<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
#### Web
* Improved error handling (date search).
#### Machinery
* 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,6 +2,7 @@
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)
@@ -10,11 +11,21 @@ The FAQ, Frequently Asked Questions, page contains **technical solutions** for c
* [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):
@@ -145,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
@@ -157,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'
@@ -249,10 +370,6 @@ Copy paste the bash script
/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
@@ -260,7 +377,7 @@ Copy paste the bash script
##
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);
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 1000);
fi;
Give rights to bash script

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,25 +18,21 @@ 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
First you will need to download the Kerberos image; click on the image below. The Kerberos.io image contains a Linux operating system, built on Arch Linux. The image has the machinery and webinterface installed, and ofcourse all the dependencies Kerberos needs. With this image you just have to plugin the SD card in your Raspberry Pi and you're done.
#### Raspberry Pi Model 2 (Recommended)
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)](https://drive.google.com/open?id=0B-2b4NYY_1xuUmxxOURISjQweGc)
#### Raspberry Pi Model A, A+, B and B+
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)](https://mega.co.nz/#!vY4WjKJD!2sZUuhzeVDFu47hSOQ94Jh27v0BLYpf6MRTBBzGfkrc)
#### 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)](https://mega.co.nz/#!6AAGlAwa!dJqbpGBG_k2ZA2FACtTbY4WR2azaV2Izeur-k3_4RlU)
[![Kerberos.io image](3_kerberos-image.png)](https://drive.google.com/open?id=0B-2b4NYY_1xuMWpLcU8zWjl2cTg)
<a name="insert-your-sd-card"></a>
### 2. Insert your SD Card
@@ -95,7 +93,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

@@ -35,10 +35,6 @@ Compile kerberos
cd kerberos-io && mkdir build && cd build
cmake .. && make && make check
Add link library to path
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/home/kerberos-io/build/thirdparty/lib/
Give rights to config files
chmod -R 777 ../config
@@ -62,22 +58,6 @@ Copy and paste the configuration to the kerberos.service
[Install]
WantedBy=multi-user.target
Create timer file for kerberos
nano /etc/systemd/system/kerberos.timer
Copy and paste the configuration to the kerberos.timer
[Unit]
Description=Runs kerberos.service, 1 min after system boot.
[Timer]
OnBootSec=1min
Unit=kerberos.service
[Install]
WantedBy=multi-user.target
Enable the service to start on boot
systemctl enable kerberos.timer
systemctl enable kerberos.service

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).

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,53 @@
# Release notes
* [1.0.3](#1-0-3)
* [1.0.2](#1-0-2)
* [1.0.1](#1-0-1)
* [1.0.0](#1-0-0)
<a name="1-0-3"></a>
## 1.0.3
#### Web
* Optimize performance, new datastructure has been implemented.
#### Machinery
* Memory optimization.
* Removal of images older than 3 days have been removed.
* Start machinery automatically (delay has been removed).
#### Cloud
* Resolved file exist problem.
<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
#### Web
* Improved error handling (date search).
#### Machinery
* 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,6 +2,7 @@
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)
@@ -10,11 +11,21 @@ The FAQ, Frequently Asked Questions, page contains **technical solutions** for c
* [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):
@@ -145,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
@@ -157,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'
@@ -249,10 +370,6 @@ Copy paste the bash script
/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
@@ -260,7 +377,7 @@ Copy paste the bash script
##
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);
rm -f $( ls -d -1tr /home/kerberos-web/public/capture/* | head -n 1000);
fi;
Give rights to bash script