new documentation
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
.docz
|
||||
.DS_Store
|
||||
46
doczrc.js
Normal file
@@ -0,0 +1,46 @@
|
||||
export default {
|
||||
menu: [
|
||||
'Introduction',
|
||||
'Architectures',
|
||||
{ name: 'Open Source', menu: ['First things first', 'Releases', 'Upgrade', 'Installation', 'Contribute', 'License', 'Machinery', 'Web'] },
|
||||
'Enterprise',
|
||||
'Cloud'
|
||||
],
|
||||
repository: "https://github.com/kerberos-io",
|
||||
themeConfig: {
|
||||
colors: {
|
||||
primary: '#943733',
|
||||
secondary: '#9e9e9e',
|
||||
h5: {
|
||||
color: '#943733',
|
||||
},
|
||||
header: {
|
||||
bg: '#943733',
|
||||
},
|
||||
sidebar: {
|
||||
bg: '#f9f9f9',
|
||||
navLinkActive: '#943733',
|
||||
},
|
||||
modes: {
|
||||
dark: {
|
||||
primary: '#9e9e9e',
|
||||
secondary: '#943733',
|
||||
header: {
|
||||
bg: '#943733',
|
||||
},
|
||||
sidebar: {
|
||||
navLinkActive: '#fff',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
gatsbyRemarkPlugins: [
|
||||
{
|
||||
resolve: 'gatsby-remark-vscode',
|
||||
},
|
||||
{
|
||||
resolve: 'gatsby-remark-grid-tables',
|
||||
}
|
||||
],
|
||||
}
|
||||
30
package.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "kerberos.io-factory",
|
||||
"private": true,
|
||||
"version": "2.0.0-rc.41",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"src/",
|
||||
"doczrc.js",
|
||||
"package.json"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "docz dev",
|
||||
"build": "docz build",
|
||||
"serve": "docz serve"
|
||||
},
|
||||
"dependencies": {
|
||||
"docz": "next",
|
||||
"gatsby-remark-grid-tables": "^0.0.3",
|
||||
"gatsby-remark-vscode": "^1.4.0",
|
||||
"prism": "^4.1.2",
|
||||
"prism-react-renderer": "^1.0.2",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-html-parser": "^2.0.2",
|
||||
"react-prism": "^4.3.2",
|
||||
"remark-grid-tables": "^1.7.1",
|
||||
"scheduler": "^0.15.0"
|
||||
}
|
||||
}
|
||||
BIN
public/images/access.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
public/images/etcher-install.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/images/kerberos-agent-architecture-docker-cloud.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/images/kerberos-agent-architecture-docker.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/images/kerberos-agent-architecture-kios.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
public/images/kerberos-agent-architecture-kubernetes-cloud.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
public/images/kerberos-agent-architecture-kubernetes.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
public/images/kerberos-architecture.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
1
public/images/kerberos-architecture.svg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/images/kerberos-cloud-accounts.png
Normal file
|
After Width: | Height: | Size: 659 KiB |
BIN
public/images/kerberos-cloud-channels.png
Normal file
|
After Width: | Height: | Size: 797 KiB |
BIN
public/images/kerberos-cloud-linking.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
public/images/kerberos-cloud-livestream.png
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
BIN
public/images/kerberos-cloud-logging.png
Normal file
|
After Width: | Height: | Size: 977 KiB |
BIN
public/images/kerberos-cloud-ml.png
Normal file
|
After Width: | Height: | Size: 1020 KiB |
BIN
public/images/kerberos-cloud-notifications.png
Normal file
|
After Width: | Height: | Size: 791 KiB |
BIN
public/images/kerberos-cloud-overview.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
public/images/kerberos-cloud-search.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
public/images/kerberos-network-onprem.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/images/kerberos.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
public/images/kios-install.gif
Executable file
|
After Width: | Height: | Size: 337 KiB |
BIN
public/images/machinery/algorithm.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
public/images/machinery/differential_images.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/images/machinery/hull.png
Normal file
|
After Width: | Height: | Size: 659 KiB |
BIN
public/images/machinery/project_structure.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
public/images/web/dashboard.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
BIN
public/images/web/overview.png
Normal file
|
After Width: | Height: | Size: 185 KiB |
BIN
public/images/web/settings.png
Normal file
|
After Width: | Height: | Size: 131 KiB |
BIN
public/images/web/system.png
Normal file
|
After Width: | Height: | Size: 157 KiB |
91
src/architectures.mdx
Normal file
@@ -0,0 +1,91 @@
|
||||
---
|
||||
name: Architectures
|
||||
route: /architectures
|
||||
---
|
||||
|
||||
# Architectures
|
||||
|
||||
In this section we will explain some usecases and best practices, which might help you to define the architecture that fits your needs.
|
||||
|
||||
> Please read the [introduction page](/) first, before moving forward.
|
||||
|
||||
When starting with Kerberos you might ask yourself, how should I deploy these so called, Kerberos agents? Well, there are different options. You can install a Kerberos agent on a Raspberry Pi, VM, Server or even in a Kubernetes cluster. So what should you do, and when? Let's have a closer look at the different options.
|
||||
|
||||
The first thing you need to consider is the environment, in which you want to deploy your Kerberos agents. Is it inside your house, your company or a public place? Another important factor is the number of surveillance cameras you would like to monitor, and if you have any high availability requirements.
|
||||
|
||||
## Agents on-premise
|
||||
|
||||
The most common scenario is to install your Kerberos agents on-premise. This has a couple of benefits such as latency, bandwidth and a less complex security model. When installing a Kerberos agent on-premise, you also have different options.
|
||||
|
||||
### Kerberos Open Source (< 5 Kerberos agents)
|
||||
|
||||
If you have a limited number of surveillance cameras you would like to monitor, and don't have any high availability requirements, the Kerberos Open Source agent is a good choice. For example, you can install the Kerberos Open Source agent on a Raspberry Pi, by using [KiOS](opensource/installation#kios), [Raspbian OS](opensource/installation#raspbian) or compile it from source.
|
||||
|
||||
On below architecture, a couple of Kerberos agents are installed on-premise (inside the local network). A Kerberos agent is installed for each surveillance camera, and each Kerberos agent runs on a seperate host (Raspberry Pi, VM, etc). The web interface of the Kerberos agents can be reached from the internal network, but cannot be accessed from the cloud.
|
||||
|
||||

|
||||
|
||||
Another option to install the Kerberos Open Source agent is to use Docker. Instead of having seperate hosts for each Kerberos agent, you will have a single host (Docker host) with multiple Docker containers. A Docker container is deployed for each surveillance camera, which contains the software to run the Kerberos agent.
|
||||
|
||||
Running your Kerberos agents inside Docker containers, allows you to process multiple surveilllance cameras using only one host.
|
||||
|
||||

|
||||
|
||||
### Kerberos Enterprise (> 5 Kerberos agents)
|
||||
|
||||
More information coming soon.
|
||||
|
||||

|
||||
|
||||
## Agents in the cloud
|
||||
|
||||
Instead of processing your surveillance cameras on-premise you could also process them in the cloud. There are a couple advantages, for example, you don't have to manage your owner hardware, you can simply spin up a VM on one of the hyperscalers.
|
||||
|
||||
When dealing with Kerberos agents in the cloud, the complexity starts with the security model. As your surveillance cameras are running somewhere on-premise, you will need to make them available to your Kerberos agents, which are running in the cloud. There are several ways to do that, such as port forwarding (not recommended) or setting up a site-to-site VPN (recommended).
|
||||
|
||||
When setting up a VPN connection you will expose your surveillance cameras to your Kerberos agents. Once you've configured the Kerberos agents, data will flow through this secure tunnel, from on-premise to your cloud enviroment.
|
||||
|
||||
### Kerberos Open Source (< 5 Kerberos agents)
|
||||
|
||||
If you have a limited number of surveillance cameras you would like to monitor, and don't have any high availability requirements, the Kerberos Open Source agent is a good choice. You can install the Kerberos Open Source agent on Docker. Instead of having seperate VM's for each Kerberos agent, you will have a single VM (Docker host) with multiple Docker containers. A Docker container is deployed for each surveillance camera, which contains the software to run the Kerberos agent.
|
||||
|
||||

|
||||
|
||||
### Kerberos Enterprise (> 5 Kerberos agents)
|
||||
|
||||
More information coming soon.
|
||||
|
||||

|
||||
|
||||
## Kerberos Cloud
|
||||
|
||||
Once you've configured one of the previously mentioned architectures, you will have one or more Kerberos agents running, in the cloud or on-premise.
|
||||
|
||||
Every Kerberos agent comes with a web interface, which makes it possible to review the activity for that specific agent; they don't have a consolidated overview. This means that you will need to open multiple web interfaces, one for each connected surveillance camera / Kerberos agent.
|
||||
|
||||
To simplify this process and resolve some other challenges, Kerberos Cloud was developed.
|
||||
|
||||
> [Kerberos Cloud](https://cloud.kerberos.io) is a cloud solution which allows you to have a single overview of all the media recordings generated by your surveillance cameras. It's not a solution for processing your surveillance cameras in the cloud. For processing of your surveillance cameras, a Kerberos agent is used.
|
||||
|
||||
A brief list of the key features of Kerberos Cloud are:
|
||||
|
||||
- Secured storage
|
||||
- Consolidated overview
|
||||
- Advanced searching
|
||||
- Machine learning
|
||||
- Alerts
|
||||
- Live streaming
|
||||
- Accounts
|
||||
- Logging
|
||||
|
||||
> Checkout [the demo environment](https://app-demo.kerberos.io) to see and feel the Kerberos Cloud solution yourself.
|
||||
|
||||
### Architecture
|
||||
|
||||
A simplified architecture is found below. In this architecture the Kerberos agents are installed on-premise (but this could also be in the cloud), next to the surveillance cameras. Once one of the agents recorded something it will send the recording to our AWS S3 bucket, using the credentials you've defined inside the agent.
|
||||
|
||||
As soon as the recording is succesfully received several engines will be executed, that will further process the recording and extract metadata from it (classification, origin of the surveillance camera, etc). A lot of processing is happening behind the scenes.
|
||||
|
||||
By using a browser you can navigate to Kerberos Cloud, and review all the recordings made by the Kerberos agents on-premise. On top of that you will receive more context about the recordings, get notifications, view a livestream and much more. Read more about [Kerberos Cloud here](/cloud).
|
||||
|
||||

|
||||
137
src/cloud/index.mdx
Normal file
@@ -0,0 +1,137 @@
|
||||
---
|
||||
name: Cloud
|
||||
route: /cloud
|
||||
---
|
||||
|
||||
# Cloud
|
||||
|
||||
When installing a Kerberos agent inside your local network, it's possible to review your activity by using the agent's web interface. By nature, you will not be able to access the web interface from the cloud (outside your local network). On top of that, the Kerberos agent doesn't come with a consolidated overview. This means that you will need to open multiple web interfaces, one for each connected surveillance camera.
|
||||
|
||||
To simplify and resolve all of these challenges, Kerberos Cloud was developed.
|
||||
|
||||
> [Kerberos Cloud](https://cloud.kerberos.io) is a cloud solution which allows you to have a single overview of all the media recordings generated by your surveillance cameras. It's not a solution for processing your surveillance cameras in the cloud. For processing of your surveillance cameras, a Kerberos agent is used.
|
||||
|
||||
A brief list of the key features of Kerberos Cloud are:
|
||||
|
||||
- Secured storage
|
||||
- Consolidated overview
|
||||
- Advanced searching
|
||||
- Machine learning
|
||||
- Alerts
|
||||
- Live streaming
|
||||
- Accounts
|
||||
- Logging
|
||||
|
||||
> Checkout [the demo environment](https://app-demo.kerberos.io) to see and feel the Kerberos Cloud solution yourself.
|
||||
|
||||
## Architecture
|
||||
|
||||
A simplified architecture is found below. In this architecture the Kerberos agents are installed on-premise, next to the surveillance cameras. Once one of the agents recorded something it will send the recording to our AWS S3 bucket, using the credentials you've defined inside the agent.
|
||||
|
||||
As soon as the recording is succesfully received several engines will be executed, that will further process the recording and extract metadata from it (classification, origin of the surveillance camera, etc). A lot of processing is happening behind the scenes.
|
||||
|
||||
By using a browser you can navigate to Kerberos Cloud, and review all the recordings made by the Kerberos agents on-premise. On top of that you will receive more context about the recordings, get notifications, view a livestream and much more.
|
||||
|
||||

|
||||
|
||||
### Public or Private cloud (Bring Your Own Cloud)
|
||||
|
||||
We run Kerberos Cloud in the public cloud on different services such as AWS, GCP and Scaleway. However if needed we can host our entire solution within your Private cloud (create a support ticket).
|
||||
|
||||
## Secured storage
|
||||
|
||||
Kerberos Cloud allows you to store your data in the cloud, and make it available using a secured web interface. This is how it works.
|
||||
|
||||
Once you've installed a Kerberos agent, and created an account on [Kerberos Cloud](https://cloud.kerberos.io), you will be able to connect both systems together. By entering credentials received from Kerberos Cloud, into your Kerberos agent, your media recordings will be send to our cloud storage.
|
||||
|
||||
> You can link one or more Kerberos agents to your Kerberos Cloud account.
|
||||
|
||||

|
||||
|
||||
After linking your media recorded by a Kerberos agent will be send to a secure cloud storage, AWS S3 (multiple regions are supported). By default our own S3 buckets are used, however we can negotiate to have your own S3 bucket (open a support ticket).
|
||||
|
||||

|
||||
|
||||
Once stored your media recordings will be processed by different functions and algorithms to send alerts, apply machine learning and much more.
|
||||
|
||||
> Kerberos Cloud is much more than a storage service, you get intelligent capabilities as well. Read on to discover more.
|
||||
|
||||
## Consolidated overview
|
||||
|
||||
Kerberos Cloud will group your media recordings (coming from one or more Kerberos agents) into time bundles. We do this to simplify the searching of a specific event. Less data is shown at once, and when needed you can drill down a level deeper to see more details.
|
||||
|
||||

|
||||
|
||||
In a sneak peek you will see how many media recordings were generated during a certain time period, and which Kerberos agents were involved. For example, this might give you an indication of a particular event (more about in the machine learning section).
|
||||
|
||||
### Security
|
||||
|
||||
Once you're inside your Kerberos Cloud account, you will see all the available media recordings of your Kerberos agents in a single interface. So how does this work?
|
||||
|
||||
When you open Kerberos Cloud we will generate temporary and private links for every media recording within your account. This link includes a random and unique hash, and is only available for a couple of minutes. So this means that your recording cannot be shared afterwards, or the risk someone else accessing that link is minimised.
|
||||
|
||||
## Advanced searching
|
||||
|
||||
Next to showing all your recordings in one overview, we also give you the capabilities to search for a recording more easily. For example you can search for recordings within a specific time boundary, recordings generated by a specific Kerberos agent, recordings which are marked as important, classified recordings such as pedestrians or animals, and more.
|
||||
|
||||

|
||||
|
||||
## Machine learning
|
||||
|
||||
With Kerberos Cloud you will get far more than just a nice interface for finding back your recordings. When a recording is uploaded to Kerberos Cloud, we will execute all kind of algorithms. One of these algorithms is classification. This algorithm is used to classify/recognise all the objects inside your recording. Any human, vehicle or animal in the recording will be labeled.
|
||||
|
||||
Next to classifying, the algorithm is also tracing the classified objects. By doing this we can label the recording with the object of interest. For example at the image below you see the traject of a pedestrian walking by (710 pixels).
|
||||
|
||||

|
||||
|
||||
## Alerts
|
||||
|
||||
When a specific event occurred, a notification can be send to one or more channels. A user can compose an event by selecting one or more conditions. Once the event is triggered, a notification is sent to all the enabled channels.
|
||||
|
||||
### Notifications
|
||||
|
||||
Kerberos Cloud supports different types of notifications:
|
||||
|
||||
- **Detections**: send a notification if a recording was received from a specific Kerberos agent, within a time range, with a specific classification, etc.
|
||||
- **Devices**: when one of your Kerberos agents stopped working, a notification can be send.
|
||||
- **High upload**: when a lot of recordings are generated within a specific period of time, a notification can be send.
|
||||
|
||||

|
||||
|
||||
### Channels
|
||||
|
||||
Kerberos Cloud supports different types of channels, towards notifications can be send:
|
||||
|
||||
- **Browser**: notifications inside the browser (if the used browser supports this).
|
||||
- **E-mail**: a personal email can be send.
|
||||
- **Slack**: send a message to a slack channel.
|
||||
- **Alexa**: send a notification to Alexa skill ([Notify Me](https://www.amazon.com/Thomptronics-Notify-Me/dp/B07BB2FYFS)).
|
||||
- **Telegram**: send a message to a Telegram channel.
|
||||
- **Pushbullet**: send a message to a Pushbullet channel.
|
||||
- **Pushover**: send a message to a Pushover channel.
|
||||
- **Webhook**: trigger a webhook (POST).
|
||||
- **IFTTT**: send a message to IFTTT.
|
||||
- **SMS**: send a text message to a mobile number.
|
||||
|
||||

|
||||
|
||||
## Live streaming
|
||||
|
||||
Kerberos Cloud allows you to live stream from your Kerberos agents to your account. A low resolution livestream (this will be improved in future), will allow you see what is happening in front of your surveillance camera in real-time.
|
||||
|
||||

|
||||
|
||||
## Accounts
|
||||
|
||||
It's possible to create multiple accounts (also called subaccounts) within your main account. Their are two different roles:
|
||||
|
||||
- Guest: will only see your media recordings. A guest cannot modify, delete or create something.
|
||||
- Editor: has full access, same permissions as the main account.
|
||||
|
||||

|
||||
|
||||
## Logging
|
||||
|
||||
All algorithms or functions which are applied to your recording on the Kerberos Cloud platform, are shown on the logging page. You can use this to debug.
|
||||
|
||||

|
||||
7
src/components/Link.jsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
const Link = ({ children, href }) => {
|
||||
return <a href={href} target="_blank">{children}</a>
|
||||
}
|
||||
|
||||
export default Link
|
||||
7
src/components/ReplaceVersion.jsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
const ReplaceVersion = ({ children, url }) => {
|
||||
return children.replace(/VERSION/g, "2.8.0")
|
||||
}
|
||||
|
||||
export default ReplaceVersion
|
||||
9
src/enterprise/index.mdx
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: Introduction
|
||||
menu: Enterprise
|
||||
route: /enterprise/introduction
|
||||
---
|
||||
|
||||
# Enterprise
|
||||
|
||||
Will be released soon.
|
||||
105
src/gatsby-theme-docz/components/Header/index.js
Normal file
@@ -0,0 +1,105 @@
|
||||
/** @jsx jsx */
|
||||
import { jsx, Box, Flex, useColorMode } from 'theme-ui'
|
||||
import { useConfig, useCurrentDoc } from 'docz'
|
||||
|
||||
import * as styles from './styles'
|
||||
import { Edit, Menu, Sun, Github, Help } from '../Icons'
|
||||
import { Logo } from '../Logo'
|
||||
|
||||
export const Header = props => {
|
||||
const { onOpen } = props
|
||||
const {
|
||||
repository,
|
||||
themeConfig: { showDarkModeSwitch },
|
||||
} = useConfig()
|
||||
const { edit = true, ...doc } = useCurrentDoc()
|
||||
const [colorMode, setColorMode] = useColorMode()
|
||||
|
||||
const toggleColorMode = () => {
|
||||
setColorMode(colorMode === 'light' ? 'dark' : 'light')
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div sx={styles.wrapper} data-testid="header">
|
||||
<Box sx={styles.menuIcon}>
|
||||
<button sx={styles.menuButton} onClick={onOpen}>
|
||||
<Menu size={25} />
|
||||
</button>
|
||||
</Box>
|
||||
<div sx={styles.innerContainer}>
|
||||
<Logo />
|
||||
<Flex>
|
||||
{repository && (
|
||||
<Box sx={{ mr: 2 }}>
|
||||
<a
|
||||
href={repository}
|
||||
sx={styles.headerButton}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Github size={15} />
|
||||
</a>
|
||||
</Box>
|
||||
)}
|
||||
<Box sx={{ mr: 2 }}>
|
||||
<a
|
||||
href="https://kerberosio.zendesk.com"
|
||||
sx={styles.headerButton}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Help size={15} />
|
||||
</a>
|
||||
</Box>
|
||||
{showDarkModeSwitch && (
|
||||
<button sx={styles.headerButton} onClick={toggleColorMode}>
|
||||
<Sun size={15} />
|
||||
</button>
|
||||
)}
|
||||
</Flex>
|
||||
{edit && doc.link && (
|
||||
<a
|
||||
sx={styles.editButton}
|
||||
href={doc.link}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Edit width={14} />
|
||||
<Box sx={{ pl: 2 }}>Edit page</Box>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div>
|
||||
<nav sx={styles.primary}>
|
||||
<div class="box">
|
||||
<ul sx={styles.links}>
|
||||
<li sx={styles.linksli}>
|
||||
<a sx={styles.linksa} href="http://kerberos.io" title="Welcome">Welcome</a>
|
||||
</li>
|
||||
<li sx={styles.linksli}>
|
||||
<a sx={styles.linksa} href="http://demo.kerberos.io" title="Demo">Demo</a>
|
||||
</li>
|
||||
<li sx={styles.linksli}>
|
||||
<a sx={styles.linksa} href="/opensource/installation" title="Install">Install</a>
|
||||
</li>
|
||||
<li sx={styles.linksli}>
|
||||
<a sx={styles.linksa} href="http://cloud.kerberos.io" title="Cloud">Cloud</a>
|
||||
</li>
|
||||
<li sx={styles.linksli}>
|
||||
<a sx={styles.linksa} target="_blank" href="https://github.com/kerberos-io" title="Github">Github</a>
|
||||
</li>
|
||||
<li sx={styles.linksli}>
|
||||
<a sx={styles.linksa} target="_blank" href="https://kerberosio.zendesk.com/" title="Zendesk">Help</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
132
src/gatsby-theme-docz/components/Header/styles.js
Normal file
@@ -0,0 +1,132 @@
|
||||
import * as mixins from '~utils/mixins'
|
||||
import { media } from '~theme/breakpoints'
|
||||
|
||||
export const wrapper = {
|
||||
bg: 'header.bg',
|
||||
color: "#fff",
|
||||
position: 'relative',
|
||||
zIndex: 1,
|
||||
borderBottom: t => `1px solid ${t.colors.border}`,
|
||||
padding: '15px 0',
|
||||
}
|
||||
|
||||
export const innerContainer = {
|
||||
...mixins.centerAlign,
|
||||
px: 4,
|
||||
position: 'relative',
|
||||
justifyContent: 'space-between',
|
||||
height: 80,
|
||||
}
|
||||
|
||||
export const menuIcon = {
|
||||
display: 'none',
|
||||
position: 'absolute',
|
||||
top: 'calc(100% + 15px)',
|
||||
left: 30,
|
||||
[media.tablet]: {
|
||||
display: 'block',
|
||||
},
|
||||
}
|
||||
|
||||
export const menuButton = {
|
||||
...mixins.ghostButton,
|
||||
color: 'header.text',
|
||||
opacity: 0.5,
|
||||
cursor: 'pointer',
|
||||
}
|
||||
|
||||
export const headerButton = {
|
||||
...mixins.centerAlign,
|
||||
outline: 'none',
|
||||
p: '12px',
|
||||
border: 'none',
|
||||
borderRadius: 9999,
|
||||
bg: '#fff', //'header.button.bg',
|
||||
color: '#943733', //'header.button.color',
|
||||
fontSize: 0,
|
||||
fontWeight: 600,
|
||||
cursor: 'pointer',
|
||||
}
|
||||
|
||||
export const editButton = {
|
||||
...mixins.centerAlign,
|
||||
position: 'absolute',
|
||||
bottom: -40,
|
||||
right: 30,
|
||||
bg: 'transparent',
|
||||
color: 'muted',
|
||||
fontSize: 1,
|
||||
textDecoration: 'none',
|
||||
borderRadius: 'radius',
|
||||
}
|
||||
|
||||
export const primary = {
|
||||
background: '#fff',
|
||||
borderBottom: '1px solid #e5e5e5',
|
||||
boxShadow: '0 -5px 0 rgba(0,0,0,.03)',
|
||||
float: 'left',
|
||||
minHeight: '2.35em',
|
||||
position: 'relative',
|
||||
zIndex: '999',
|
||||
width: '100%',
|
||||
}
|
||||
|
||||
export const branches = {
|
||||
float: 'left',
|
||||
background: '0 0',
|
||||
border: '0',
|
||||
boxShadow: 'none',
|
||||
display: 'block',
|
||||
margin: '0px !important',
|
||||
}
|
||||
|
||||
export const branchesli = {
|
||||
padding: '25px 0',
|
||||
width: 'auto',
|
||||
float: 'left',
|
||||
listStyle: 'none',
|
||||
}
|
||||
|
||||
export const branchesa = {
|
||||
borderBottom: '0',
|
||||
fontSize: '12px',
|
||||
margin: '0 25px 0 0',
|
||||
width: 'auto',
|
||||
fontFamily: 'Source Sans Pro,sans-serif',
|
||||
color: '#943633',
|
||||
display: 'block',
|
||||
fontWeight: '600',
|
||||
letterSpacing: '1px',
|
||||
textTransform: 'uppercase',
|
||||
textDecoration: 'none',
|
||||
}
|
||||
|
||||
export const links = {
|
||||
float: 'right',
|
||||
background: '0 0',
|
||||
border: '0',
|
||||
boxShadow: 'none',
|
||||
display: 'block',
|
||||
margin: '0px !important',
|
||||
}
|
||||
|
||||
export const linksli = {
|
||||
padding: '25px 0',
|
||||
width: 'auto',
|
||||
float: 'left',
|
||||
listStyle: 'none',
|
||||
}
|
||||
|
||||
export const linksa = {
|
||||
borderBottom: '0',
|
||||
fontSize: '12px',
|
||||
margin: '0 25px 0 0',
|
||||
width: 'auto',
|
||||
fontFamily: 'Source Sans Pro,sans-serif',
|
||||
color: '#943633',
|
||||
display: 'block',
|
||||
fontWeight: '600',
|
||||
letterSpacing: '1px',
|
||||
textTransform: 'uppercase',
|
||||
textDecoration: 'none',
|
||||
}
|
||||
10
src/gatsby-theme-docz/components/Icons/index.js
Normal file
@@ -0,0 +1,10 @@
|
||||
export { default as ChevronDown } from 'react-feather/dist/icons/chevron-down'
|
||||
export { default as ChevronUp } from 'react-feather/dist/icons/chevron-up'
|
||||
export { default as Clipboard } from 'react-feather/dist/icons/clipboard'
|
||||
export { default as Code } from 'react-feather/dist/icons/code'
|
||||
export { default as Edit } from 'react-feather/dist/icons/edit-2'
|
||||
export { default as Github } from 'react-feather/dist/icons/github'
|
||||
export { default as Menu } from 'react-feather/dist/icons/menu'
|
||||
export { default as Search } from 'react-feather/dist/icons/search'
|
||||
export { default as Sun } from 'react-feather/dist/icons/sun'
|
||||
export { default as Help } from 'react-feather/dist/icons/help-circle'
|
||||
19
src/gatsby-theme-docz/components/Logo/index.js
Normal file
34
src/gatsby-theme-docz/components/Logo/styles.js
Normal file
@@ -0,0 +1,34 @@
|
||||
export const logo = {
|
||||
letterSpacing: '-0.02em',
|
||||
fontWeight: 600,
|
||||
fontSize: 4,
|
||||
}
|
||||
|
||||
export const link = {
|
||||
fontWeight: 600,
|
||||
color: '#fff',
|
||||
textDecoration: 'none',
|
||||
':hover': {
|
||||
color: '#fff',
|
||||
},
|
||||
}
|
||||
|
||||
export const img = {
|
||||
display: 'block',
|
||||
position: 'relative',
|
||||
backgroundImage: 'url(../images/kerberos.png)',
|
||||
backgroundPosition: 'center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
backgroundSize: '100%',
|
||||
width: '35px',
|
||||
height: '35px',
|
||||
}
|
||||
|
||||
export const circle = {
|
||||
display: 'table',
|
||||
background: '#fff',
|
||||
margin: '-10px 20px 0 0',
|
||||
borderRadius: '50%',
|
||||
padding: '10px',
|
||||
float: 'left',
|
||||
}
|
||||
11
src/gatsby-theme-docz/components/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import * as headings from 'gatsby-theme-docz/src/components/Headings'
|
||||
import { Layout } from 'gatsby-theme-docz/src/components/Layout'
|
||||
import { Playground } from 'gatsby-theme-docz/src/components/Playground'
|
||||
import { Props } from 'gatsby-theme-docz/src/components/Props'
|
||||
|
||||
export default {
|
||||
...headings,
|
||||
playground: Playground,
|
||||
layout: Layout,
|
||||
props: Props,
|
||||
}
|
||||
46
src/gatsby-theme-docz/index.css
Normal file
@@ -0,0 +1,46 @@
|
||||
@import url('https://fonts.googleapis.com/css?family=Inconsolata&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap');
|
||||
|
||||
ul {
|
||||
margin-left: 40px !important;
|
||||
}
|
||||
|
||||
p code {
|
||||
color: #943733;
|
||||
background: #f9f9f9;
|
||||
padding: 8px 5px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-top: 1px solid #c3c3c3;
|
||||
padding-top: 35px
|
||||
}
|
||||
|
||||
h2::before {
|
||||
content: "# ";
|
||||
color: #943733;
|
||||
}
|
||||
|
||||
h3::before{
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
-moz-border-radius: 4px;
|
||||
-webkit-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
background-color: #943733;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
p > img {
|
||||
margin: 25px 0 !important;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 700px) {
|
||||
p > img {
|
||||
max-width: 600px !important;
|
||||
}
|
||||
}
|
||||
47
src/index.mdx
Normal file
@@ -0,0 +1,47 @@
|
||||
---
|
||||
name: Introduction
|
||||
route: /
|
||||
---
|
||||
|
||||
# Kerberos.io
|
||||
|
||||
The **Kerberos(dot)io** project, is a video surveillance solution, which was initiated back in 2014. Over the years it has evolved into a trusted, stable and feature-rich video surveillance system. To set the expectations, watch the video below to understand what it can and can't do. If you want to install Kerberos(dot)io, it's recommended to have a look [at the architectures page](/architectures) to find the best solution for your usecase.
|
||||
|
||||
<iframe src="https://player.vimeo.com/video/163975947" width="640" height="400" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
|
||||
|
||||
## The name: Kerberos.io
|
||||
|
||||
Many people are confused, and don't understand why this project is called Kerberos(dot)io. If you've been in the IT world for a while you will notice that Kerberos is already used for the authentication protocol [Kerberos](https://en.wikipedia.org/wiki/Kerberos_(protocol)).
|
||||
We believe that the name Kerberos(dot)io makes sense for this project as well, with a strong emphasize on the suffix **.io**, which stands for input and output devices (e.g. any type of camera). Kerberos(dot)io can be seen as a kind of security protocol driven by hardware devices such as surveillance cameras. To make writing easier we will from now on, refer to Kerberos instead of Kerberos(dot)io.
|
||||
|
||||
## Why Kerberos
|
||||
|
||||
As burglary is very common, we believe that video surveillance is a trivial tool in our daily lifes which helps us to feel a little bit more secure. Responding to this need, a lot of companies have started developing their own video surveillance software in the past few years.
|
||||
|
||||
Nowadays we have a myriad of expensive cameras, recorders, and software solutions which are mainly outdated and difficult to install and use. Kerberos goal is to solve these problems and to provide every human being or enterprise in this world to have their own ecological, affordable, easy-to-use and innovative surveillance solution. Read more about our strategy here.
|
||||
|
||||
## What is Kerberos
|
||||
|
||||
Kerberos is a video surveillance solution, that uses computer vision algorithms to detect changes, and that can trigger actions (notifications, api, etc). It comes in two flavors, Kerberos Open Source and Kerberos Enterprise. Kerberos can be deployed to any Linux OS, Docker, or cluster such as Kubernetes.
|
||||
|
||||
## The Kerberos agent
|
||||
|
||||
When you install Kerberos Open Source or Kerberos Enterprise we will refer to it as a Kerberos agent. A Kerberos agent, is a software solution that processes the video stream of a single surveillance camera, makes and visualises recordings and takes actions (for example sending notifications).
|
||||
|
||||
## How does it work
|
||||
|
||||
The Kerberos agent comes in two flavors, Open Source and Enterprise. Both versions have a web interface (front-end) and a video processing engine (back-end). The front-end allows a user to modify specific settings and watch recordings in a easy-to-use interface. The back-end is a solution that processes the camera feed with computer vision algorithms to detect motion, and makes recordings and/or execute specific actions. Kerberos supports any type of IP-camera (RTSP/ONVIF), USB (V4L2) and the popular Raspberry Pi camera.
|
||||
|
||||
Depending on the flavor you choose, you will have to install different components, but the idea as described above remains the same. If you would like to learn more dive deeper in the related sections: [Open Source](/opensource/introduction), [Enterprise](/enterprise/introduction).
|
||||
|
||||
## Open Source vs Enterprise
|
||||
|
||||
The Kerberos project started as an Open Source project, with a main focus on low-cost devices such as the Raspberry Pi. Later on the Open Source version was bundled inside the Docker technology so that it was easier to distribute. Anyone can use the Open Source version for personal usage.
|
||||
|
||||
Enterprises are more demanding, and have a lot of surveillance cameras, therefore they need a scalable surveillance system. The Enterprise edition of Kerberos is a licensed service which allows you to operate a video surveillance cluster (Kubernetes) on-premise or in the cloud (AWS/GCP/Azure). This will be released in 2020/Q1.
|
||||
|
||||
The Open Source and Enterprise edition are significantly different from a source code point of view. The Enterprise version is a complete rewrite of the Open Source version, and got all the best practices we discovered over the years implemented. Both version are and will remain updated in the future.
|
||||
|
||||
## Cloud
|
||||
|
||||
When installing a Kerberos agent inside your local network, it's possible to review your activity by using the agent's web interface. By its nature, you will not be able to access the web interface from the cloud (outside your local network). On top of that, the Kerberos agent doesn't come with a consolidated overview. This means that you will need to open multiple web interfaces, one for each connected surveillance camera. To simplify and resolve all of these challenges, [Kerberos Cloud](/cloud) was developed. Read more about the [different features and functions of Kerberos Cloud here](/cloud).
|
||||
220
src/open-source/contribute.mdx
Normal file
@@ -0,0 +1,220 @@
|
||||
---
|
||||
name: Contribute
|
||||
menu: Open Source
|
||||
route: /opensource/contribute
|
||||
---
|
||||
|
||||
# Contribute
|
||||
|
||||
In this document we describe the different things you need to know if you would like to add a new feature to Kerberos Open Source, or change some of its behaviour for your own use case.
|
||||
|
||||
Before starting, as you might have read already, you need to know that Kerberos Open Source consists of two solutions. A front-end, also called **web**, which allows you to review the recordings and to configure the back-end settings. A back-end, also called **machinery**, which is computer vision solution that processes the video stream of surveillance camera.
|
||||
|
||||
Once you start changing or adding features to Kerberos Open Source, there is a big chance you will need to modify the previously mentioned solutions. That's why we will discuss how you can contribute to one or both solutions.
|
||||
|
||||
## Machinery
|
||||
|
||||
Contributing to the [machinery repository](https://github.com/kerberos-io/machinery) requires C++ skills. This section describes all the technical stuff you will need to know. If you want to contribute, the first thing you will need to do is installing the source code on your working station.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
> A Linux OS, or Mac OSX (Window is not supported).
|
||||
|
||||
### Installation
|
||||
|
||||
The complete installation can be found on the advanced installation page, 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 development tools (C++, CMake) and V4L utils, and clone the repository. Compile the project using cmake and make.
|
||||
|
||||
```ts
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y git cmake subversion dh-autoreconf libcurl4-openssl-dev yasm libx264-dev pkg-config libssl-dev
|
||||
cd && sudo git clone https://github.com/kerberos-io/machinery
|
||||
cd machinery && mkdir build && cd build
|
||||
cmake .. && make -j8 && make check && sudo make install
|
||||
```
|
||||
|
||||
### Testing
|
||||
|
||||
We strongly recommend testing as a best practice in complex projects. Therefore the machinery uses the popular C++ test library: Google Test and Google Mock. The tests can be found in the test directory. You can run the test by executing following command:
|
||||
|
||||
```ts
|
||||
make check
|
||||
```
|
||||
|
||||
### Adding a new class
|
||||
|
||||
This paragraph will tell you how to create a new condition, algorithm, expositor, io or capture device. For simplicity we will show how to create a new algorithm; the steps are identical if you want to create for example a new capture device; only the directory will differ.
|
||||
|
||||
#### Create the header file
|
||||
|
||||
First we will need to create a new header file in the include/kerberos/machinery/algorithm directory. You can copy an existing algorithm header file, and start from there. You will end up with the following header file:
|
||||
|
||||
```ts
|
||||
//
|
||||
// Class: AnotherAlgorithm
|
||||
// Description: Another algorithm
|
||||
// Created: ...
|
||||
// Author: ...
|
||||
// Mail: ...
|
||||
// Website: ...
|
||||
//
|
||||
// The copyright to the computer program(s) herein
|
||||
// is the property of kerberos.io, Belgium.
|
||||
// The program(s) may be used and/or copied .
|
||||
//
|
||||
/////////////////////////////////////////////////////
|
||||
#ifndef __AnotherAlgorithm_H_INCLUDED__ // if AnotherAlgorithm.h hasn't been included yet...
|
||||
#define __AnotherAlgorithm_H_INCLUDED__ // #define this so the compiler knows it has been included
|
||||
#include "machinery/algorithm/Algorithm.h"
|
||||
namespace kerberos
|
||||
{
|
||||
char AnotherAlgorithmName[] = "AnotherAlgorithm";
|
||||
class AnotherAlgorithm : public AlgorithmCreator<AnotherAlgorithmName, AnotherAlgorithm>
|
||||
{
|
||||
private:
|
||||
Image m_result;
|
||||
int m_parameter;
|
||||
public:
|
||||
AnotherAlgorithm(){}
|
||||
void setup(const StringMap & settings);
|
||||
void initialize(ImageVector & images);
|
||||
Image evaluate(ImageVector & images, JSON & data);
|
||||
void setParameter(int parameter);
|
||||
};
|
||||
}
|
||||
#endif
|
||||
```
|
||||
|
||||
When creating a new class you will need to inherit from it corresponding creator, for the algorithm example: AlgorithmCreator. The creator class requires two template parameters. The first one is a unique name for the class, this name will be used to make some kind of dependency injection possible; and is used in the configurations files. The second parameter is the class itself.
|
||||
|
||||
The inheritance of the creator class can be a little bit strange, but it is required and needed to register the class automatically with the factory. When the code gets compiled, the classes will be automatically registered with the factory, and you can create instances of those classes by using the name we've defined in the first template parameter. For example we could create a new instance of our previously created class with the following command.
|
||||
|
||||
```ts
|
||||
Algorithm * anotherAlgorithm = Factory<Algorithm>::getInstance()->create("AnotherAlgorithm");
|
||||
```
|
||||
|
||||
#### Create the source file
|
||||
|
||||
Ofcourse we also need to have an implementation file, therefore we need to create a new source file in the src/kerberos/machinery/algorithm directory. Just like the previous example, you can copy an existing class and implement the member functions you've declared in the header file. An example would be:
|
||||
|
||||
```ts
|
||||
#include "machinery/algorithm/AnotherAlgorithm.h"
|
||||
namespace kerberos
|
||||
{
|
||||
void AnotherAlgorithm::setup(const StringMap & settings)
|
||||
{
|
||||
Algorithm::setup(settings);
|
||||
int parameter = std::atoi(settings.at("algorithms.AnotherAlgorithm.parameter").c_str());
|
||||
setParameter(parameter);
|
||||
}
|
||||
void AnotherAlgorithm::initialize(ImageVector & images)
|
||||
{
|
||||
....
|
||||
}
|
||||
Image AnotherAlgorithm::evaluate(ImageVector & images, JSON & data)
|
||||
{
|
||||
Image evaluation;
|
||||
... do something ..
|
||||
return evaluation;
|
||||
}
|
||||
void AnotherAlgorithm::setParameter(int parameter)
|
||||
{
|
||||
m_parameter = parameter;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Modify the CMakeLists.txt file
|
||||
|
||||
Open the CMakeLists.txt in the src/kerberos directory file and append the name of the algorithm class to the KERBEROS_FACTORY_ENTITIES variable; for example machinery/algorithm/AnotherAlgorithm.cpp.
|
||||
|
||||
```ts
|
||||
# -------------------------------------------------------
|
||||
# Entities that have to be registered with the factory
|
||||
# - classes are registered on compile time, so they
|
||||
# don't belong to a library. New algorithms, expositors
|
||||
# or Io classes belong here.
|
||||
set(KERBEROS_FACTORY_ENTITIES
|
||||
capture/USBCamera.cpp
|
||||
machinery/condition/Time.cpp
|
||||
machinery/condition/Enabled.cpp
|
||||
machinery/algorithm/DifferentialCollins.cpp
|
||||
machinery/algorithm/DifferentialCollinsWithColor.cpp
|
||||
machinery/algorithm/AnotherAlgorithm.cpp
|
||||
machinery/expositor/RectangleExpositor.cpp
|
||||
machinery/expositor/HullExpositor.cpp
|
||||
machinery/heuristic/Sequence.cpp
|
||||
machinery/io/IoDisk.cpp
|
||||
machinery/io/IoTCP.cpp
|
||||
machinery/io/IoMongoDB.cpp
|
||||
)
|
||||
```
|
||||
|
||||
#### Create a new entry in the config file
|
||||
|
||||
Open the algorithm.xml file in the config directory, and add a new tag with exactly the same name you've used in the header file; so in our example "AnotherAlgorithm". Within the new tag we can add properties that we will be use to configure our algorithm, in our example we defined a field parameter so we can add this field in the config file.
|
||||
|
||||
One thing you will need to do is to attach a type to a property. The type will be used by the web to automatically render the properties. For simplicity we can use the type number, this will show an input box on the settings page of the web where we are able to add numbers.
|
||||
|
||||
```ts
|
||||
<algorithms>
|
||||
<AnotherAlgorithm>
|
||||
<parameter type="number">5</parameter>
|
||||
</AnotherAlgorithm>
|
||||
</algorithms>
|
||||
```
|
||||
|
||||
You can retrieve the parameter in the setup function with the settings parameter.
|
||||
|
||||
```ts
|
||||
settings.at("algorithms.AnotherAlgorithm.parameter")
|
||||
```
|
||||
|
||||
### Compile
|
||||
|
||||
Hurray, we've made it! So now you can compile the code again, and if you're using an IDE don't forget to include the new source file! If you are compiling from the command-line you just have to go to the build folder and write make.
|
||||
|
||||
## Web
|
||||
|
||||
Contributing to [the web repository](https://github.com/kerberos-io/web) requires both front- and back-end skillls, more precisely BackboneJS (JavaScript) and Laravel 5.4 (PHP).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Make sure you have following services installed on your working station.
|
||||
|
||||
>\>= PHP 7.1.0, NodeJS and NPM and Nginx or Apache
|
||||
|
||||
### Installation
|
||||
|
||||
Clone the repository to your working station.
|
||||
|
||||
```ts
|
||||
git clone https://github.com/kerberos-io/web
|
||||
cd web
|
||||
```
|
||||
|
||||
Install the PHP libraries using the dependency mananger, **Composer**. If you haven't installed composer execute following commands.
|
||||
|
||||
```ts
|
||||
php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
|
||||
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 a succesful installation, you can run composer install or composer update from the root of the project. All dependencies will be installed or updated if a newer version is detected.
|
||||
|
||||
```ts
|
||||
composer update
|
||||
```
|
||||
|
||||
Besides PHP, the project also relies on BackboneJS (Javascript) for the front-end. Therefore a couple JavaScript dependencies should be installed.
|
||||
|
||||
```ts
|
||||
npm -g install bower
|
||||
cd public
|
||||
bower update
|
||||
```
|
||||
|
||||
When everything is installed properly, you need too link the web project with your applicationn server. Read more on the [Laravel documentation website](https://laravel.com/docs/5.8/deployment).
|
||||
34
src/open-source/index.mdx
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: First things first
|
||||
menu: Open Source
|
||||
route: /opensource/introduction
|
||||
---
|
||||
|
||||
# First things first
|
||||
|
||||
Kerberos started as an Open Source project back in 2014. Our main goal was, and still is, to provide everyone in this world with a free, professional and complete video surveillance system, which they can install in a couple of minutes.
|
||||
Kerberos was initially developed for the Raspberry Pi, due to this many of the tools we have been using are lightweight and fast (such as C++). Over the years we have found other ways to make Kerberos available, such as KiOS (our custom Linux), Docker and Kubernetes.
|
||||
|
||||
In this section we want to make clear what the Open Source version of Kerberos is about, and when you should be using it. What it can do, and what it can't do.
|
||||
|
||||
## License
|
||||
|
||||
The Kerberos Open Source project is licensed with [BY-NC-SA 4.0](/opensource/license), this means that everyone can use Kerberos and modify if to their needs, in a non commercial activity.
|
||||
|
||||
|
||||
## When using the Open Source version
|
||||
|
||||
Kerberos Open Source is perfect for personal usage. It's great if you only have a couple of surveillance cameras to be managed. A Kerberos agent (e.g. on a Raspberry Pi or inside a Docker container) runs for each camera. Their are many different installation possibilities, please have a look at the [architecture](/architectures) or [installation page](/opensource/installation).
|
||||
|
||||
Every Kerberos agent has it's own web interface (front-end) to review media recording, and processing engine (back-end) of a specific surveillance camera. The Open Source version doesn't come with a central overview of all recordings generated by your Kerberos agents. For this feature we highly recommend [Kerberos cloud](/cloud).
|
||||
|
||||
If you want to manage more than 10 Kerberos agents, it's recommended to use [Kerberos Enterprise](/enterprise). This will help you to scale, support high availability and load balancing. Check out the [architectures section](/architectures) for a better understanding of when to use what.
|
||||
|
||||
## How to install
|
||||
|
||||
A Kerberos Open Source agent can be installed in different ways. Every installation method have their own advantages and disadvantages. Depending on the usecase you could choose one method over the other. Read more on the [installation section](/opensource/installation), to learn about the different installation methods.
|
||||
|
||||
1. KiOS: You have a Raspberry Pi, and you only want to run the Kerberos agent on it.
|
||||
2. Raspbian: You have a Raspberry Pi, but you want other services running next to your Kerberos agent.
|
||||
3. Docker: You have a lot of IP cameras, and/or don't want to mess with dependencies.
|
||||
4. Generic: You want to develop/extend Kerberos Open Source with your own features, or you want to run the Kerberos agent on a not supported OS/architecure.
|
||||
469
src/open-source/installation.mdx
Normal file
@@ -0,0 +1,469 @@
|
||||
---
|
||||
name: Installation
|
||||
menu: Open Source
|
||||
route: /opensource/installation
|
||||
---
|
||||
|
||||
import ReplaceVersion from "../components/ReplaceVersion";
|
||||
|
||||
# Installation
|
||||
|
||||
Kerberos Open Source comes with different installation flavours. So you might think, why? The reason is simple, depending on the use case one option is better than another. A short list of recommendations:
|
||||
|
||||
1. [KiOS](/opensource/installation#kios): You have a Raspberry Pi, and you only want to run a Kerberos agent on it.
|
||||
2. [Raspbian](/opensource/installation#raspbian): You have a Raspberry Pi, but you want other services running next to the Kerberos agent.
|
||||
3. [Docker](/opensource/installation#docker): You have a lot of IP cameras, and/or don't want to mess with dependencies.
|
||||
4. [Generic](/opensource/installation#generic): You want to develop/extend Kerberos with your own features, or you want to run a Kerberos agent on a not supported OS/architecure.
|
||||
|
||||
## KiOS
|
||||
|
||||
KiOS (Kerberos Operating System) is our custom linux OS, which runs the Kerberos agent out-of-the-box (read plug-and-play). It's an OS designed for the Raspberry Pi (all version are supported), which you can flash to an SD card.
|
||||
|
||||
It can be installed using our own installer, which comes with a nice interface that handles the flashing and network configuration for you, or you can handle the flashing yourself by using Etcher.
|
||||
|
||||
### Github
|
||||
|
||||
KiOS is compiled using Buildroot, the project can be found on [following Github repo](https://github.com/kerberos-io/kios).
|
||||
|
||||
### Kerberos installer
|
||||
|
||||
Installing the Kerberos agent to your Raspberry Pi, has never been so easy. By using our cross-platform installer, you can run a fully configured video surveillance system within 3 minutes. Indeed, we also think that's awesome!
|
||||
|
||||

|
||||
|
||||
Download the correct installer for your OS below:
|
||||
|
||||
> https://github.com/cedricve/etcher/releases/v2.1.0
|
||||
|
||||
### Etcher
|
||||
|
||||
If you love Etcher, or the Kerberos installer is not working as expected, you can also flash the Kerberos agent to your SD card manually. It goes as following:
|
||||
|
||||
1. Download [the KiOS image](https://github.com/kerberos-io/kios/releases),
|
||||
2. flash it to your SD card with Etcher,
|
||||
3. and edit some configuration files at the boot directory.
|
||||
|
||||
[](https://www.balena.io/etcher/)
|
||||
|
||||
Once you have download the KiOS image (make sure you downloaded the right image) and flashed it to an SD card, put it back into your working station. Navigate to the SD card and creating following files.
|
||||
|
||||
#### Connecting to WiFi
|
||||
|
||||
If you want to connect your Raspberry Pi to a WiFi connection, you will need to create a file `wireless.conf` on your SD card, with following contents. Change the SSID and password properties to your own WiFi credentials.
|
||||
|
||||
```ts
|
||||
update_config=1
|
||||
ctrl_interface=/var/run/wpa_supplicant
|
||||
network={
|
||||
scan_ssid=1
|
||||
ssid=""
|
||||
psk=""
|
||||
}
|
||||
```
|
||||
|
||||
#### Setup a static IP-address
|
||||
|
||||
If you want to assign a static ip-address to your Raspberry Pi, create a file `static_ip.conf` on your SD card, with following contents:
|
||||
|
||||
```ts
|
||||
#####################################################################
|
||||
# Enter the IP-address you want to have, followed by the subnet mask
|
||||
# e.g. 192.168.0.10/24
|
||||
static_ip=""
|
||||
#####################################################################
|
||||
# Enter the Gateway and DNS, this will be your router in most cases
|
||||
# e.g. 192.168.0.1
|
||||
static_gw=""
|
||||
static_dns=""
|
||||
```
|
||||
|
||||
### Power on the Raspberry Pi
|
||||
|
||||
Once you've finished the installation using either the KiOS installer or Etcher, you can put the SD card into your Raspberry Pi and turn it on. Please note that the first time you boot KiOS it can take about 2 mins before the system is operational. When KiOS is ready you can open your favorite browser and type in the IP address of your Raspberry Pi. This will open the Kerberos agent's front-end, which you can access with the username: root and password: root.
|
||||
|
||||

|
||||
|
||||
### Access the Raspberry Pi
|
||||
|
||||
You can access the KiOS system with attaching your Raspberry Pi to a HDMI monitor or by using `ssh`.
|
||||
|
||||
```ts
|
||||
Cedrics-Mac-mini:build cedricverst$ ssh root@192.168.0.12
|
||||
Welcome to kios-79e30bbb!
|
||||
[root@kios-79e30bbb ~]#
|
||||
```
|
||||
|
||||
Note that by default no root password is set, you can define a password in the `/data/etc/kios.conf` file. Once you added a password, make sure to reboot the OS.
|
||||
|
||||
```ts
|
||||
[root@kios-79e30bbb ~]# nano /data/etc/kios.conf
|
||||
[root@kios-79e30bbb ~]# reboot
|
||||
```
|
||||
|
||||
## Raspbian
|
||||
|
||||
If you have already an OS (e.g. Raspbian Buster) flashed to your Raspberry Pi, then it makes sense to install the Kerberos agent on top of your existing OS. There are two ways to achieve this:
|
||||
|
||||
1. Install the Kerberos agent using Docker (more info below),
|
||||
2. or you can install the Kerberos agent manually (machinery + web).
|
||||
|
||||
This section will focus on option 2, and will show you how to install the Kerberos agent manually.
|
||||
|
||||
### Update OS
|
||||
|
||||
Let's start with updating the OS, and installing a couple of packages.
|
||||
|
||||
> We have tested the Raspbian installation on `Raspbian GNU/Linux 10 (buster)`. It might be that if you have a different version of Raspbian, you will need to install additional/different packages.
|
||||
|
||||
```ts
|
||||
sudo apt-get update && sudo apt-get install -y ffmpeg
|
||||
```
|
||||
|
||||
### Machinery
|
||||
|
||||
Download the debian file from the machinery repository.
|
||||
> https://github.com/kerberos-io/machinery/releases
|
||||
|
||||
A `.deb` file is available for every version of the Raspberry Pi. For example if you are using a Raspberry Pi 4 for version 2.8.0, execute following command. You can change the version and Raspberry Pi board to your needs.
|
||||
|
||||
> Please make sure you pick the right board (rpi, rpi2, rpi3 or rpi4), and choose the version you want (e.g. 2.8.0). Replace below url, with your preferences.
|
||||
|
||||
```ts
|
||||
wget https://github.com/kerberos-io/machinery/releases/download/v2.8.0/rpi4-machinery-kerberosio-armhf-2.8.0.deb
|
||||
sudo dpkg -i rpi4-machinery-kerberosio-armhf-2.8.0.deb
|
||||
```
|
||||
|
||||
Download the x265 library (version 160) from the machinery repository, as Raspbian Buster 10 only ships with version 165. Make sure you select the right board.
|
||||
|
||||
> `v2.8.0/rpi4-libx265.so.160` this will download the libx265 shared library for the Raspberry Pi 4.
|
||||
|
||||
```ts
|
||||
wget https://github.com/kerberos-io/machinery/releases/download/v2.8.0/rpi4-libx265.so.160
|
||||
sudo mv rpi4-libx265.so.160 /usr/lib/arm-linux-gnueabihf/libx265.so.160
|
||||
```
|
||||
|
||||
|
||||
If you wish to use the Raspberry Pi Camera Module, make sure [to enable it](https://www.raspberrypi.org/documentation/configuration/camera.md) using `sudo raspi-config`.
|
||||
|
||||
```ts
|
||||
sudo raspi-config
|
||||
```
|
||||
|
||||
Enable machinery to start on boot, and start the service.
|
||||
|
||||
```
|
||||
sudo systemctl enable kerberosio
|
||||
sudo service kerberosio start
|
||||
```
|
||||
|
||||
### Web
|
||||
|
||||
Before you can run the web interface, you'll need to download and configure a webserver. We recommend 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.
|
||||
|
||||
Install Nginx and PHP (+extensions).
|
||||
|
||||
```ts
|
||||
sudo apt-get install -y nginx php7.1 php7.1-curl php7.1-gd php7.1-fpm php7.1-cli php7.1-opcache php7.1-mbstring php7.1-xml php7.1-zip php7.1-mcrypt php7.1-readline
|
||||
```
|
||||
|
||||
Creating a Nginx config.
|
||||
|
||||
```ts
|
||||
sudo rm -f /etc/nginx/sites-enabled/default
|
||||
sudo nano /etc/nginx/sites-enabled/kerberosio.conf
|
||||
```
|
||||
|
||||
Copy and paste following config file; this file tells nginx where the web will be installed and that it requires PHP.
|
||||
|
||||
```ts
|
||||
server
|
||||
{
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
root /var/www/web/public;
|
||||
server_name kerberos.rpi;
|
||||
index index.php index.html index.htm;
|
||||
location /
|
||||
{
|
||||
autoindex on;
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
location ~ \.php$
|
||||
{
|
||||
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Restart nginx
|
||||
|
||||
```ts
|
||||
sudo service nginx restart
|
||||
```
|
||||
|
||||
Now we have installed all the dependencies, we can download the web interface source code.
|
||||
|
||||
```ts
|
||||
sudo mkdir -p /var/www/web && sudo chown www-data:www-data /var/www/web
|
||||
cd /var/www/web
|
||||
sudo -u www-data wget https://github.com/kerberos-io/web/releases/download/v2.8.0/web.tar.gz
|
||||
sudo -u www-data tar xvf web.tar.gz .
|
||||
sudo chown www-data -R storage bootstrap/cache config/kerberos.php
|
||||
sudo chmod -R 775 storage bootstrap/cache
|
||||
sudo chmod 0600 config/kerberos.php
|
||||
```
|
||||
|
||||
Once everything is setup correctly, you should be able to browse towards the ip-address of your Raspberry Pi and see the Kerberos web interface.
|
||||
|
||||
### Auto removal
|
||||
|
||||
By default images or videos aren't removed automatically. This means that the Kerberos agent will keep writing to disk, even if there is no more space available on your SD card. When your SD card is full you'll be experiencing strange errors: a corrupt web interface, blank images or corrupt videos.
|
||||
|
||||
To resolve this your should install a simple bash script and initiate a cronjob which continuously poll your filesystem, and start removing media when your disk is getting full.
|
||||
|
||||
Create a bash script and copy following script.
|
||||
|
||||
```bash
|
||||
nano /home/pi/autoremoval.sh
|
||||
```
|
||||
|
||||
Copy following script (make sure the partition is correct, this is the default one for a Raspberry Pi).
|
||||
|
||||
```bash
|
||||
partition=/dev/root
|
||||
imagedir=/etc/opt/kerberosio/capture/
|
||||
if [[ $(df -h | grep $partition | head -1 | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 90 ]];
|
||||
then
|
||||
echo "Cleaning disk"
|
||||
find $imagedir -type f | sort | head -n 100 | xargs -r rm -rf;
|
||||
fi;
|
||||
```
|
||||
|
||||
Make the script executable.
|
||||
|
||||
```bash
|
||||
chmod +x /home/pi/autoremoval.sh
|
||||
```
|
||||
|
||||
Initiate a cronjob, and select the nano editor.
|
||||
|
||||
```bash
|
||||
crontab -e
|
||||
```
|
||||
|
||||
Append following line, to execute the autoremoval.sh script every 5min.
|
||||
|
||||
```bash
|
||||
*/5 * * * * /bin/bash /home/pi/autoremoval.sh
|
||||
```
|
||||
|
||||
## Docker
|
||||
|
||||
A Docker image (x86, ARMv7, ARMv8) is available on the Docker Hub, which contains all the necessary software to setup the Kerberos agent in a matter of seconds. Before you can run this image, make sure you have Docker installed. Afterwards you can use docker, to get the Kerberos agent up and running. All docker images can be found on [the Docker hub](https://hub.docker.com/u/kerberos).
|
||||
|
||||
### Prerequisites
|
||||
|
||||
> Docker or Docker Desktop (Linux, OS or Windows)
|
||||
|
||||
### Github
|
||||
|
||||
All technical information, such as Dockerfile, can be found on [following Github repo](https://github.com/kerberos-io/docker).
|
||||
|
||||
### Download docker image
|
||||
|
||||
Before you are able to run the Kerberos agent inside a container, you will need to pull the docker image from the Docker hub.
|
||||
|
||||
```ts
|
||||
docker pull kerberos/kerberos
|
||||
```
|
||||
|
||||
When you pulled succesfully you can run your first Kerberos container as following. This will run Kerberos agent and expose the web interface on port 80, and the livestream on port 8889.
|
||||
|
||||
```ts
|
||||
docker run --name camera1 -p 80:80 -p 8889:8889 -d kerberos/kerberos
|
||||
```
|
||||
|
||||
To add more containers, you can change the name parameter and assign another port to expose the web interface and livestream (ports are unique on a OS).
|
||||
|
||||
```ts
|
||||
docker run --name camera2 -p 81:80 -p 8890:8889 -d kerberos/kerberos
|
||||
docker run --name camera3 -p 82:80 -p 8891:8889 -d kerberos/kerberos
|
||||
```
|
||||
|
||||
When the containers are created, you can open your browser and browse to your different containers.
|
||||
```ts
|
||||
http://localhost:80
|
||||
http://localhost:81
|
||||
http://localhost:82
|
||||
```
|
||||
|
||||
### Volumes
|
||||
|
||||
You can assign volumes to the Kerberos container to for example
|
||||
- preload configuration,
|
||||
- or centralise the images/videos on your working station.
|
||||
|
||||
## Generic
|
||||
|
||||
If you want to install the Kerberos agent from source on your working station or server, either for development or running the software, this is the preferred installation procedure. We are assuming that you use a Linux OS, when using Mac OSX the installation is slightly different.
|
||||
|
||||
> This was tested on a Ubuntu VM (18.04.3 (LTS) x64).
|
||||
|
||||
### Machinery
|
||||
|
||||
Update the packages and kernel, and install some development tools.
|
||||
|
||||
```ts
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y git cmake subversion dh-autoreconf libcurl4-openssl-dev yasm libx264-dev pkg-config libssl-dev
|
||||
```
|
||||
|
||||
Install the FFmpeg library with x264 support.
|
||||
|
||||
> It's recommended to install FFmpeg 3.1. Later versions might give issues at compilation or run time.
|
||||
|
||||
```ts
|
||||
git clone https://github.com/FFmpeg/FFmpeg ffmpeg
|
||||
cd ffmpeg && git checkout remotes/origin/release/3.1
|
||||
./configure --enable-gpl --enable-libx264 --enable-shared --prefix=/usr
|
||||
make && sudo make install
|
||||
```
|
||||
|
||||
Go to your home directory, or any place your prefer and pull the machinery from Github. Afterwards create a build directory and start the compilation.
|
||||
|
||||
> You can change the `-j` attribute of `make -j8`to the number of cores of your compilation host.
|
||||
|
||||
```ts
|
||||
cd && git clone https://github.com/kerberos-io/machinery
|
||||
cd machinery && mkdir build && cd build
|
||||
cmake .. && make -j8 && make check && sudo make install
|
||||
```
|
||||
|
||||
After the machinery is build and installed succesfully, you can enable `kerberosio` to start on boot.
|
||||
|
||||
```ts
|
||||
sudo systemctl enable kerberosio
|
||||
sudo systemctl start kerberosio
|
||||
```
|
||||
|
||||
### Web
|
||||
|
||||
If you want to install the web, you'll need to have a webserver (e.g. Nginx) and PHP running with some extensions. You'll also need NodeJS and npm installed, to install Bower.
|
||||
|
||||
```ts
|
||||
cd ~
|
||||
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
|
||||
sudo apt-add-repository -y ppa:ondrej/php
|
||||
sudo apt-get -y update
|
||||
sudo apt-get install -y git php7.1-cli php7.1-gd php7.1-mcrypt php7.1-curl php7.1-mbstring php7.1-dom php7.1-zip php7.1-fpm nodejs
|
||||
sudo npm -g install bower
|
||||
```
|
||||
|
||||
Next we'll need to install Nginx, and create a config file.
|
||||
|
||||
```ts
|
||||
sudo apt-get -y install nginx
|
||||
sudo rm -f /etc/nginx/sites-enabled/default
|
||||
sudo nano /etc/nginx/sites-enabled/default
|
||||
```
|
||||
|
||||
Assign Nginx to our web interface (which we will soon create).
|
||||
|
||||
```ts
|
||||
server
|
||||
{
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
root /var/www/web/public;
|
||||
server_name kerberos.rpi;
|
||||
index index.php index.html index.htm;
|
||||
location /
|
||||
{
|
||||
autoindex on;
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
location ~ \.php$
|
||||
{
|
||||
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Now we have all the dependencies installed we can clone the web repository to our working station.
|
||||
|
||||
```ts
|
||||
mkdir -p /var/www
|
||||
cd /var/www && sudo git clone https://github.com/kerberos-io/web && cd web
|
||||
```
|
||||
|
||||
Install the PHP dependency manager, `composer`, the install all the needed dependencies.
|
||||
|
||||
```ts
|
||||
curl -sS https://getcomposer.org/installer | sudo php
|
||||
sudo mv composer.phar /usr/bin/composer
|
||||
sudo composer install
|
||||
```
|
||||
|
||||
Change some permissions, to make sure we can write logging and caching files.
|
||||
|
||||
```ts
|
||||
sudo chmod -R 777 storage
|
||||
sudo chmod -R 777 bootstrap/cache
|
||||
sudo chmod 777 config/kerberos.php
|
||||
```
|
||||
|
||||
We will need to install a couple of more JavaScript libraries using bower.
|
||||
|
||||
```ts
|
||||
cd public
|
||||
sudo bower --allow-root install
|
||||
service nginx restart
|
||||
```
|
||||
|
||||
Once everything is setup correctly, you should be able to browse towards the ip-address of your Raspberry Pi and see the Kerberos web interface.
|
||||
|
||||
### Auto removal
|
||||
|
||||
By default images or videos aren't removed automatically. This means that the Kerberos agent will keep writing to disk, even if there is no more space available on your SD card. When your SD card is full you'll be experiencing strange errors: a corrupt web interface, blank images or corrupt videos.
|
||||
|
||||
To resolve this your should install a simple bash script and initiate a cronjob which continuously poll your filesystem, and start removing media when your disk is getting full.
|
||||
|
||||
Create a bash script and copy following script.
|
||||
|
||||
```bash
|
||||
nano /home/[user]/autoremoval.sh
|
||||
```
|
||||
|
||||
Copy following script (make sure the partition is correct, this is the default one for a Raspberry Pi).
|
||||
|
||||
```bash
|
||||
partition=/dev/root
|
||||
imagedir=/etc/opt/kerberosio/capture/
|
||||
if [[ $(df -h | grep $partition | head -1 | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 90 ]];
|
||||
then
|
||||
echo "Cleaning disk"
|
||||
find $imagedir -type f | sort | head -n 100 | xargs -r rm -rf;
|
||||
fi;
|
||||
```
|
||||
|
||||
Make the script executable.
|
||||
|
||||
```bash
|
||||
chmod +x /home/[user]/autoremoval.sh
|
||||
```
|
||||
|
||||
Initiate a cronjob, and select the nano editor.
|
||||
|
||||
```bash
|
||||
crontab -e
|
||||
```
|
||||
|
||||
Append following line, to execute the autoremoval.sh script every 5min.
|
||||
|
||||
```bash
|
||||
*/5 * * * * /bin/bash /home/[user]/autoremoval.sh
|
||||
```
|
||||
119
src/open-source/license.mdx
Normal file
@@ -0,0 +1,119 @@
|
||||
---
|
||||
name: License
|
||||
menu: Open Source
|
||||
route: /opensource/license
|
||||
---
|
||||
|
||||
# CC BY-NC-SA 4.0
|
||||
|
||||
## Summary
|
||||
|
||||
You are free to:
|
||||
|
||||
- Share — copy and redistribute the material in any medium or format
|
||||
- Adapt — remix, transform, and build upon the material
|
||||
|
||||
## The license
|
||||
|
||||
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
|
||||
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
|
||||
|
||||
### Section 1 – Definitions.
|
||||
|
||||
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
|
||||
Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
|
||||
BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
|
||||
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
|
||||
Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
|
||||
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
|
||||
License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
|
||||
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
|
||||
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
|
||||
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
|
||||
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
|
||||
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
|
||||
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
|
||||
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
|
||||
|
||||
### Section 2 – Scope.
|
||||
|
||||
License grant.
|
||||
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
|
||||
reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
|
||||
produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
|
||||
Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
|
||||
Term. The term of this Public License is specified in Section 6(a).
|
||||
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
|
||||
Downstream recipients.
|
||||
Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
|
||||
Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
|
||||
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
|
||||
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
|
||||
Other rights.
|
||||
|
||||
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
|
||||
Patent and trademark rights are not licensed under this Public License.
|
||||
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
|
||||
|
||||
### Section 3 – License Conditions.
|
||||
|
||||
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
|
||||
|
||||
Attribution.
|
||||
|
||||
If You Share the Licensed Material (including in modified form), You must:
|
||||
|
||||
retain the following if it is supplied by the Licensor with the Licensed Material:
|
||||
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
|
||||
a copyright notice;
|
||||
a notice that refers to this Public License;
|
||||
a notice that refers to the disclaimer of warranties;
|
||||
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
|
||||
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
|
||||
indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
|
||||
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
|
||||
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||||
ShareAlike.
|
||||
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
|
||||
|
||||
The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License.
|
||||
You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
|
||||
You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
|
||||
|
||||
### Section 4 – Sui Generis Database Rights.
|
||||
|
||||
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
|
||||
|
||||
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
|
||||
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
|
||||
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
|
||||
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
|
||||
|
||||
### Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||||
|
||||
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
|
||||
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
|
||||
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
|
||||
|
||||
### Section 6 – Term and Termination.
|
||||
|
||||
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
|
||||
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
|
||||
|
||||
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
|
||||
upon express reinstatement by the Licensor.
|
||||
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
|
||||
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
|
||||
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
|
||||
|
||||
### Section 7 – Other Terms and Conditions.
|
||||
|
||||
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
|
||||
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
|
||||
|
||||
### Section 8 – Interpretation.
|
||||
|
||||
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
|
||||
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
|
||||
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
|
||||
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
|
||||
805
src/open-source/machinery.mdx
Normal file
@@ -0,0 +1,805 @@
|
||||
---
|
||||
name: Machinery
|
||||
menu: Open Source
|
||||
route: /opensource/machinery
|
||||
---
|
||||
|
||||
import { Playground, Props } from 'docz'
|
||||
|
||||
# Machinery
|
||||
|
||||
The machinery is the processing engine of Kerberos Open Source. It's an image processing framework, written in C++, who benefits from other third party libraries (OpenCV, etc). It takes images from the type of camera (USB-, IP- or RPi-camera) you've configured in the configuration files and executes one ore more algorithms and post-processes (e.g. save a snapshot). The configuration files allow you to define the type of camera, post-processes, conditions and much more; it's highly configurable. It's important to note that the machinery, out-of-the-box, can handle only one camera at a time.
|
||||
|
||||
## Project structure
|
||||
|
||||
The machinery is an image processing framework which is devided into four steps:
|
||||
|
||||
- condition
|
||||
- algorithm
|
||||
- expositor
|
||||
- heuristic
|
||||
|
||||
The steps belong to a four passway; illustrated on the image below. In each cycle a sequence of images is processed. Each step will process the sequence, and will return some result to the next step. For example: an algorithm will process the images and returns an array to the Expositor, which contains boolean values. The steps are loosly coupled, so they have simple conventions, just like the example before.
|
||||
|
||||
Thanks to the loosly coupling, each step can be developed indepently. So algorithms, expositors, heuristics and conditions can be switched on the fly. This makes it easier for other developers who want to contribute to the machinery. They can create a new algorithm without knowing how a specific expositor or heuristic works. They just need to be aware of the convention an algorithm should meet.
|
||||
|
||||

|
||||
|
||||
These different steps can be configured by editing a couple of configurationn files located at `config/`. The main configuration file `config/config.xml` looks like this:
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
<name type="text">frontdoor</name>
|
||||
<logging type="bool">false</logging>
|
||||
<timezone type="timezone">Europe-Brussels</timezone>
|
||||
<capture file="capture.xml">RaspiCamera</capture>
|
||||
<stream file="stream.xml">Mjpg</stream>
|
||||
<condition file="condition.xml" type="multiple">Enabled</condition>
|
||||
<algorithm file="algorithm.xml">DifferentialCollins</algorithm>
|
||||
<expositor file="expositor.xml">Hull</expositor>
|
||||
<heuristic file="heuristic.xml">Sequence</heuristic>
|
||||
<io file="io.xml" type="multiple">Video</io>
|
||||
<cloud file="cloud.xml">S3</cloud>
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
## Capture
|
||||
|
||||
You can choose which capture device you will be using, you can use your old USB webcam, the popular Raspberry Pi camera or a state-of-the-art IP camera. The capture device will take pictures and deliver them to the algorithm if the conditions (the first step of the four passway) are valid.
|
||||
|
||||
You can change the capture device by changing the `config/config.xml` file, and choose one of the following:
|
||||
- USBCamera
|
||||
- RaspiCamera
|
||||
- IPCamera
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
...
|
||||
<capture file="capture.xml">RaspiCamera</capture>
|
||||
...
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
### USB camera
|
||||
|
||||
The machinery supports a whole range of USB cameras. You will find a complete list here. Make sure you have updated the web interface, to make the machinery aware you will be using an USB camera.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the USB camera can be found in the `config/capture.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<captures>
|
||||
<USBCamera>
|
||||
<frameWidth type="number">1280</frameWidth>
|
||||
<frameHeight type="number">720</frameHeight>
|
||||
<deviceNumber type="number">0</deviceNumber>
|
||||
<delay type="number">0</delay>
|
||||
<angle type="number">0</angle>
|
||||
</USBCamera>
|
||||
</captures>
|
||||
```
|
||||
|
||||
##### Framewidth and -height
|
||||
|
||||
You can set the resolution of the capture device, make sure the resolution you've defined is valid with your camera. Please check the specs of the USB camera you're using.
|
||||
|
||||
##### Device number
|
||||
|
||||
If more than one device is connected, you can specify the index of the USB-camera. The index is an integer (1-5).
|
||||
|
||||
##### Delay
|
||||
|
||||
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.
|
||||
|
||||
### Raspberry Pi Camera Module
|
||||
|
||||
You can use the Raspberry Pi Camera Module with the machinery. 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.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the Raspberry Pi Camera Module can be found in the config/capture.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<captures>
|
||||
<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>
|
||||
```
|
||||
|
||||
##### Framewidth and -height
|
||||
|
||||
You can set the resolution of the camera module, make sure the resolution you've defined is valid.
|
||||
|
||||
##### Delay
|
||||
|
||||
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.
|
||||
|
||||
##### 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.
|
||||
|
||||
### IP camera
|
||||
|
||||
The machinery can be used with any IP camera, that provides a RTSP (or MJPEG) stream. Make sure that you know the correct URL of your IP camera, you can [find a list here](http://www.ispyconnect.com/sources.aspx).
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the IP capture device can be found in the `config/capture.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<captures>
|
||||
<IPCamera>
|
||||
<url type="text">http://username:password@ipaddress/image.jpg</url>
|
||||
<frameWidth type="number">800</frameWidth>
|
||||
<frameHeight type="number">640</frameHeight>
|
||||
<delay type="number">0</delay>
|
||||
<angle type="number">0</angle>
|
||||
</IPCamera>
|
||||
</captures>
|
||||
```
|
||||
|
||||
##### URL
|
||||
|
||||
To use your IP camera, you should provide a valid RTSP (or MJPEG) URL. The machinery will take snapshots from this stream.
|
||||
|
||||
##### Framewidth and -height
|
||||
|
||||
You can set the resolution of the capture device, make sure the resolution you've defined is equal to the resolution you've defined in your IP-camera software.
|
||||
|
||||
##### Delay
|
||||
|
||||
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.
|
||||
|
||||
## Condition
|
||||
|
||||
The condition is the first step of the four passway. In this step the machinery will determine if it's allowed to proceed to the next step. For example a condition can be a time constraint, a brightness threshold, etc; multiple conditions can be selected.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
...
|
||||
<condition file="condition.xml" type="multiple">Enabled</condition>
|
||||
...
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
### Enabled
|
||||
|
||||
It can be helpful to enable or disable the machinery at specific times. Therefore the time condition makes it possible to select a time range for each day of the week. When the current time is within the time range, the machinery will be enabled.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the Enabled condition can be found in the `config/condition.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<conditions>
|
||||
<Enabled>
|
||||
<active type="bool">true</active>
|
||||
<delay type="number">5000</delay>
|
||||
</Enabled>
|
||||
</conditions>
|
||||
```
|
||||
|
||||
##### Active
|
||||
|
||||
The active field is boolean value (true/false). When the active field is true, the machinery is enabled, if not it's disabled.
|
||||
|
||||
##### Delay
|
||||
|
||||
The delay value is used when the condition failed, so when the current time isn't in the selected time range for that day. In that case the machinery will idle for the specified delay time. The value of the delay is expressed in miliseconds.
|
||||
|
||||
### Time
|
||||
|
||||
It can be helpful to enable or disable the machinery at specific times. Therefore the time condition makes it possible to select a time range for each day of the week. When the current time is within the time range, the machinery will be enabled.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the Time condition can be found in the `config/condition.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<conditions>
|
||||
<Time>
|
||||
<times type="timeselection">13:00,15:00-0:01,20:58-0:01,20:59-0:01,19:20-0:01,21:59-0,0-0,0</times>
|
||||
<delay type="number">10000</delay>
|
||||
</Time>
|
||||
</conditions>
|
||||
```
|
||||
|
||||
##### Times
|
||||
|
||||
The times property contains a list of times, delimited by a "-". The first item in the list will specify the time range for the first day of the week (Monday), the last item for the last day of the week (Sunday). The begin- and end-time, for a specific day, are delimited by a "," where the first element will specify that start time and the second one specifies the end time.
|
||||
|
||||
##### Delay
|
||||
|
||||
The delay value is used when the condition failed, so when the current time isn't in the selected time range for that day. In that case the machinery will idle for the specified delay time. The value of the delay is expressed in miliseconds.
|
||||
|
||||
## Algorithm
|
||||
|
||||
The algorithm is the second step of the four passway. An algorithm will execute some kind of function on a sequence of images, and end up with a black and white image; just like the image below. An example of an algorithm would be one that does motion detection or one that would detect cats or dogs (using TensorFlow, ar any other Deep Learning framework).
|
||||
|
||||

|
||||
|
||||
The white pixels on the image will indicate the object of interest. For example, when looking for motion, the pixels that have been changed; it depends on what the algorithm is looking for. The black pixels are background pixels.
|
||||
|
||||
The only convention that an algorithm should meet is that it should return a black and white image to the next step; the expositor. And of course that it requires a sequence of images as a parameter. Besides those conventions, an algorithm can do everything it wants to do. So you could create your own cat detection algorithm, marker detection, etc.
|
||||
|
||||
You can select the algortihm in the `config/config.xml`.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
...
|
||||
<algorithm file="algorithm.xml">DifferentialCollins</algorithm>
|
||||
...
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
### Differential images
|
||||
|
||||
This algorithm is a very simple method to detect motion; in terms of understanding but also processing. Just like the name says, it's the result of comparing images. When the images are compared, we know the pixels that have been changed and if the amount of pixels that changed is big enough, one can say that something happened and thus motion was detected.
|
||||
|
||||
To get a more technical explanation: the algoritm will substract 2 or more images, and once that is done it will end up with a black and white image. The white pixels will mark the pixels that where different/changed and the black pixels are the pixels that have not changed; background pixels. Please note that there are several different combinations of substracting images. However for the machinery, we will use the method of Collins et al. as this method erases the phenomenon "ghosting".
|
||||
|
||||

|
||||
|
||||
In the image above the method of Collins et al. is illustrated. For this method we will process three images. The images are a sequence (from left to right), so the first (A) image was taken before the second (B) one, and the second (B) before the third (C) one. Next we will do a first comparision (C-B) of the third (C) image and the second (B) image, and after that we will do a second comparison (C-A) of the third (C) image and first (A) image.
|
||||
|
||||
After the comparison we will end up with two difference images (C-B) and (C-A); both will mark the white pixels as changed pixels and black as non-changed pixels. To finish the algorithm we will do a logical AND-operation of the two difference images; this will give us the final black and white image ((C-B)&&(C-A)).
|
||||
|
||||
The main idea of the Colins et al. method, is that it will erase "ghosting". In the last step we are doing a logical AND-operation, by doing this we will only keep the pixels, that changed in the first two images; therefore we can elimante false positives.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the Differential images algorithm can be found in the config/algorithm.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<algorithms>
|
||||
<DifferentialCollins>
|
||||
<erode type="number">5</erode>
|
||||
<threshold type="number">20</threshold>
|
||||
</DifferentialCollins>
|
||||
</algorithms>
|
||||
```
|
||||
|
||||
##### Erode
|
||||
|
||||
The erode parameter represents a structural element (a morphological operation), which will be used to minimize the changed pixels; more information about eroding can be found here. The idea of the eroding is that pixels which are isolated will be removed; this means that when only one pixel changed, that pixel will reverted to the non-changed state. But for example when a large change happens and a lot of adjacent pixels are changed, the eroding will not be able to revert them.
|
||||
|
||||
The higher the number of the erode parameter, the more aggressive the eroding will be. So high erode values, will make it possible that also large changes will be reverted to the non-changed state.
|
||||
|
||||
##### Threshold
|
||||
|
||||
When doing the comparison of two images, we won't end up with a clean black and white image. In most of the cases the values will be between 0 and 255; so gray values. This means that the value 0 will mean that both pixels where the same in both image, and values 255 mean that both pixels where totally different in both images. Of course we will also have values between 0-255, so pixels that are a little bit different in both images. So to make the resulting black and white image, we will need to apply a threshold value.
|
||||
|
||||
The threshold will specify how much a pixel has to be different in the two images. So for example when the threshold is 30, it means that the difference between two pixels has to be equal or more then 30. The higher the threshold the more the pixel needs to be different, to be marked as changed.
|
||||
|
||||
## Expositor
|
||||
|
||||
After the algorithm is executed, the expositor will determine, a region, where the changes were detected. An expositor can constrain a region in terms of selecting a hull or defining a rectangle.
|
||||
|
||||
An expositor receives a black and white image as parameter and should modify a JSON object with all the information it processed. The JSON object must include: the bounding rectangle(s) of the positions where the pixels of interest are located and the number of pixels of interest. But can also include other optional parameters.
|
||||
|
||||
You can change the expositor by changing the `config/config.xml` file, and choose one of the following:
|
||||
- Hull
|
||||
- Rectangle
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
...
|
||||
<expositor file="expositor.xml">Hull</expositor>
|
||||
...
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
### Rectangle
|
||||
|
||||
This is a trivial expositor. A rectangle region can be defined to constrain the locations of pixels of interest. The rectangle repositor will return the region of the pixels of interest.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the rectangle expositor can be found in the config/expositor.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<expositors>
|
||||
<Rectangle>
|
||||
<region>
|
||||
<x1 type="number">0</x1>
|
||||
<y1 type="number">0</y1>
|
||||
<x2 type="number">1280</x2>
|
||||
<y2 type="number">720</y2>
|
||||
</region>
|
||||
</Rectangle>
|
||||
</expositors>
|
||||
```
|
||||
|
||||
##### Region
|
||||
|
||||
The region parameter contains 4 values; x1, y1, x2 and y2 respectively. The values x1 and y1 indicate the x- and y-coordinate of the left upper starting point. The values x2 and y2 are the bottom right coordinates. A virtual rectangle will be drawn from (x1,y1) to (x2,y2). Pixels of interest that lie within this rectangle are valid pixels; if not they are invalid.
|
||||
|
||||
### Hull
|
||||
|
||||
This hull is a more complex expositor than the rectangle. A hull can be selected with the web, you can select one or more coordinates to create a flexible region. The coordinates can be adjusted afterwards and be removed by double clicking on the coordinate. You can expand the hull by removing the start coordinate, which is marked by the white bullet.
|
||||
|
||||

|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the hull expositor can be found in the config/expositor.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<expositors>
|
||||
<Hull>
|
||||
<region type="hullselection">347,361|627,266|975,328|1091,328|1148,413|1158,516|1121,534|962,567|699,648|531,700|243,613|423,550|665,453|850,470|666,361|467,385|325,460|165,372</region>
|
||||
</Hull>
|
||||
</expositors>
|
||||
```
|
||||
|
||||
##### Region
|
||||
The region parameter contains n values. Each value represents a coordinate (x,y) and are seperated by the "|" delimiter. These coordinates are used to calculate the concave hull. Pixels of interest that lie within the concave hull are valid pixels; if not they are invalid.
|
||||
|
||||
## Heuristic
|
||||
|
||||
The heuristic is the last step in the four passway which will decide if the detection is valid or not. It will do this by using information from the previous steps (the expositor and the algorithm); e.g. number of changed pixels.
|
||||
|
||||
You can change the heuristic by changing the `config/config.xml` file, and choose one of the following:
|
||||
- Sequence
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
...
|
||||
<heuristic file="heuristic.xml">Sequence</heuristic>
|
||||
...
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
### Sequence
|
||||
|
||||
This is a trivial heuristic. The sequence heuristic will store a single integer in memory, that will count the numbers of valid detections. When the heuristic will detect a false detection, it will decrease the count. The sequence heuristic will return true, if a threshold is reached; for example when something was detected three times in a row.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the Sequence heuristic can be found in the config/heuristic.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<heuristics>
|
||||
<Sequence>
|
||||
<minimumChanges type="number">1</minimumChanges>
|
||||
<minimumDuration type="number">1</minimumDuration>
|
||||
<noMotionDelayTime type="number">2000</noMotionDelayTime>
|
||||
</Sequence>
|
||||
</heuristics>
|
||||
```
|
||||
|
||||
##### Minimum changes
|
||||
|
||||
The heuristic will only return true if enough changes have been detected. The minimum of changes indicates the minimum number of pixels that have to been changed, to be a valid detection.
|
||||
|
||||
##### Minimum durations
|
||||
|
||||
The minimum number of detections in a row to be a valid detection.
|
||||
|
||||
##### No motion delay time
|
||||
|
||||
When the heuristic failed, due to not enough pixels changed or not x detections in a row, the heuristic will idle for some time.
|
||||
|
||||
## Output
|
||||
|
||||
If the heuristic determined that the evaluation was valid, one or more output operations can be executed. You configure which ooutput operations that will be executed, by modifying the configuration file or using the web interface.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
<kerberos>
|
||||
<instance>
|
||||
...
|
||||
<io file="io.xml" type="multiple">Video</io>
|
||||
...
|
||||
</instance>
|
||||
</kerberos>
|
||||
```
|
||||
|
||||
You can choose which output devices you will be using. If you select multiple outputs, seperate them with an `,`. You can change the output device by changing the `config/config.xml` file, and choose one of the following:
|
||||
- Disk
|
||||
- Video
|
||||
- GPIO
|
||||
- TCPSocket
|
||||
- Webhook
|
||||
- MQTT
|
||||
- Script
|
||||
|
||||
### Disk
|
||||
|
||||
An image can be saved to disk.
|
||||
|
||||
#### Parameters
|
||||
|
||||
The parameters of the Disk output device can be found in the `config/io.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios>
|
||||
<Disk>
|
||||
<fileFormat type="text">timestamp_microseconds_instanceName_regionCoordinates_numberOfChanges_token.jpg</fileFormat>
|
||||
<directory type="text">/etc/opt/kerberosio/capture/</directory>
|
||||
<markWithTimestamp type="bool">false</markWithTimestamp>
|
||||
<timestampColor type="text">white</timestampColor>
|
||||
<privacy type="bool">false</privacy>
|
||||
<throttler type="number">0</throttler>
|
||||
</Disk>
|
||||
</ios>
|
||||
```
|
||||
|
||||
##### File format
|
||||
|
||||
The format that will be used for the name of the image. One or more variables can be defined and will be replaced by the machinery. Note that when you're using a variables name in the file format, that this name should be defined in the JSON object.
|
||||
|
||||
##### Directory
|
||||
|
||||
The directory where the image will be saved to. By default images are saved to the /etc/opt/kerberosio/capture directory.
|
||||
|
||||
##### Mark with timestamp
|
||||
|
||||
When this settings is set to true, the image is marked with a timestamp.
|
||||
|
||||
##### Timestamp color
|
||||
A color can be defined for timestamp: white, black, red, green and blue.
|
||||
|
||||
##### Privacy
|
||||
The privacy mode can be activated to remove some parts from the image. This especially helpful if you want to filter out public areas. When this option is enabled you will seee that after configuring the Hull expositor, you'll see that the pixels outside your region of interest (Hull) are made black.
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the Disk will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
### Video
|
||||
When a valid event is detected, a video will be recorded for x seconds. When more valid events are detected, while a video is recording, the video file will further record for x seconds; so no new video file be recorded, but the existing one will be expanded.
|
||||
|
||||
#### Parameters
|
||||
The parameters of the Video output device can be found in the `config/io.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios>
|
||||
<Video>
|
||||
<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>
|
||||
<throttler type="number">0</throttler>
|
||||
</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 the machinery can't write the desired FPS.
|
||||
|
||||
```text
|
||||
[trivial] IoVideo: framerate is too fast, can't record video at this speed (8/FPS)
|
||||
```
|
||||
##### 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.
|
||||
|
||||
##### Extensions
|
||||
The extension or container of the video file. We highly recommend to use the MP4 container if you want cross-browser support. Leave this setting by default, if you don't know what you're doing.
|
||||
|
||||
##### Codec
|
||||
The codec that is used to encode the video file.
|
||||
|
||||
##### File format
|
||||
The format that will be used for the name of the image. One or more variables can be defined and will be replaced by the machinery. Note that when you're using a variables name in the file format, that this name should be defined in the JSON object.
|
||||
|
||||
##### 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
|
||||
When this settings is set to true, the video is marked with a timestamp (similar to the Disk device).
|
||||
|
||||
##### Timestamp color
|
||||
A color can be defined for timestamp: white, black, red, green and blue.
|
||||
|
||||
##### Privacy
|
||||
The privacy mode can be activated to remove some parts from the video. This especially helpful if you want to filter out public areas.
|
||||
|
||||
##### Video privacy
|
||||
After updating the configuration, you'll see that the pixels outside your region of interest (ROI) are made black; the image below illustrates this.
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the Video will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
### TCP/IP client
|
||||
|
||||
The TCP/IP client will send a TCP packet to a server.
|
||||
|
||||
#### Parameters
|
||||
The parameters of the TCP/IP client can be found in the config/io.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios>
|
||||
<TCPSocket>
|
||||
<server type="number">127.0.0.1</server>
|
||||
<port type="number">1337</port>
|
||||
<message type="text">it's so fluffy</message>
|
||||
<throttler type="number">0</throttler>
|
||||
</TCPSocket>
|
||||
</ios>
|
||||
```
|
||||
|
||||
##### Server
|
||||
The IP of the TCP server.
|
||||
|
||||
##### Port
|
||||
This is the port of the TCP server.
|
||||
|
||||
##### Message
|
||||
You can send some data to a TCP server.
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the TCP will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
### GPIO
|
||||
A GPIO pin can be set as output device.
|
||||
|
||||
#### Parameters
|
||||
The parameters of the GPIO pin can be found in the `config/io.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios>
|
||||
<GPIO>
|
||||
<pin type="number">17</pin>
|
||||
<periods type="number">5</periods>
|
||||
<periodTime type="number">100000</periodTime>
|
||||
<throttler type="number">0</throttler>
|
||||
</GPIO>
|
||||
</ios>
|
||||
```
|
||||
|
||||
##### Pin
|
||||
The pin that will be triggered.
|
||||
|
||||
##### Periods
|
||||
The number of times the pin will be triggered.
|
||||
|
||||
##### Period time
|
||||
The time in microseconds that the pin will be set high.
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the GPIO will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
### Webhook
|
||||
Detailed information (a JSON object) is send as a POST request to a webhook. The JSON object contains the number of changes, the region, the URL of the image, etc. This is useful if you want to integrate with your own application.
|
||||
|
||||
Make sure that the Webhook comes after the Disk device, otherwise the URL of the image is not included.
|
||||
|
||||
#### Parameters
|
||||
The parameters of the webhook can be found in the config/io.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios>
|
||||
<Webhook>
|
||||
<url type="text">http://kerberos.web/api/v1/webhook</url>
|
||||
<throttler type="number">0</throttler>
|
||||
</Webhook>
|
||||
</ios>
|
||||
```
|
||||
|
||||
##### Url
|
||||
This is the URL, to which the machinery will send a JSON object (as a POST request).
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the Webhook will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
##### Output
|
||||
A JSON object is POSTed to the url you've defined.
|
||||
|
||||
```json
|
||||
[
|
||||
'regionCoordinates' : [618, 317, 703, 493],
|
||||
'numberOfChanges' : 5446,
|
||||
'timestamp' : '1465894497',
|
||||
'microseconds' : '5-97451',
|
||||
'token' : 695,
|
||||
'pathToImage' : '1465894497_5-97451_frontdoor_618-317-703-493_5446_695.jpg',
|
||||
'instanceName' : 'frontdoor',
|
||||
]
|
||||
```
|
||||
|
||||
### Script
|
||||
A bash script can be executed after a valid event was detected. A JSON object is send in the first parameter to the script you've defined.
|
||||
|
||||
#### Parameters
|
||||
The parameters of the Script output device can be found in the config/io.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios>
|
||||
<Script>
|
||||
<path type="text">/etc/opt/kerberosio/scripts/run.sh</path>
|
||||
<throttler type="number">0</throttler>
|
||||
</Script>
|
||||
</ios>
|
||||
```
|
||||
|
||||
##### Path
|
||||
The location of the script that will be executed on detection.
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the Script will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
##### Example
|
||||
By default the script will point to /etc/opt/kerberosio/scripts/run.sh, which contains a template how you should start your script. Note that when using KiOS, this script will be read-only, copy it to the /data folder and change the path parameter.
|
||||
|
||||
```python
|
||||
#!/bin/bash
|
||||
# -------------------------------------------
|
||||
# This is an example script which illustrates
|
||||
# how to use the Script IO device.
|
||||
#
|
||||
# --------------------------------------
|
||||
# The first parameter is the JSON object
|
||||
#
|
||||
# e.g. {"regionCoordinates":[308,250,346,329],"numberOfChanges":194,"timestamp":"1486049622","microseconds":"6-161868","token":344,"pathToImage":"1486049622_6-161868_frontdoor_308-250-346-329_194_344.jpg","instanceName":"frontdoor"}
|
||||
JSON=$1
|
||||
# -------------------------------------------
|
||||
# You can use python to parse the JSON object
|
||||
# and get the required fields
|
||||
name=$(echo $JSON | python -c "import sys, json; print json.load(sys.stdin)['instanceName']")
|
||||
coordinates=$(echo $JSON | python -c "import sys, json; print json.load(sys.stdin)['regionCoordinates']")
|
||||
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.
|
||||
```
|
||||
|
||||
### MQTT
|
||||
MQTT protocol is a light-weight Machine to Machine (M2M) protocol widely used in Internet of things.
|
||||
Detailed information (a JSON object) is published to an MQTT topic. The JSON object contains the number of changes, the region, the URL of the image, etc.
|
||||
|
||||
#### Parameters
|
||||
The parameters of the MQTT output can be found in the config/io.xml file, but you can also use the web to modify the parameters. Below you see a default configuration file.
|
||||
|
||||
```xml
|
||||
<ios
|
||||
<MQTT>
|
||||
<secure type="bool">false</secure>
|
||||
<verifycn type="bool">false</verifycn>
|
||||
<server type="number">127.0.0.1</server>
|
||||
<port type="number">1883</port>
|
||||
<topic type="text">kios/mqtt</topic>
|
||||
<username type="text"></username>
|
||||
<password type="text"></password>
|
||||
<throttler type="number">0</throttler>
|
||||
</MQTT>
|
||||
</ios>
|
||||
```
|
||||
|
||||
##### Secure
|
||||
If checked, enable SSL/TLS support. Please note that when SSL/TLS support is enabled, the server certificate issuer is verified against the CA (Certification Authority) files available in /etc/ssl/certs.
|
||||
|
||||
##### Verifycn
|
||||
If checked, the MQTT server FQDN or ip address must match the CN (Common Name) of the server certificate.
|
||||
|
||||
##### Server
|
||||
IP address or FQDN of the MQTT broker.
|
||||
|
||||
##### Port
|
||||
TCP port of the MQTT broker.
|
||||
|
||||
##### Topic
|
||||
The topic to publish to.
|
||||
|
||||
##### Username
|
||||
The username for authenticating to the MQTT broker. This is only supported by brokers that implement the MQTT spec v3.1. If username is not set (empty), the password argument is ignored. This is only needed if the MQTT broker is configured for authentication.
|
||||
|
||||
##### Password
|
||||
The password to use, together with the username, for authenticating to the MQTT broker. This is only supported by brokers that implement the MQTT spec v3.1. This is only needed if the MQTT broker is configured for authentication.
|
||||
|
||||
##### Throttler
|
||||
Control the number of executions by setting a throttling value. E.g. if you set throttling to 5, the MQTT will only be triggered once in 5 seconds, nevertheless more detections occurred.
|
||||
|
||||
##### Output
|
||||
A JSON object is published to the topic of the MQTT broker you have configured.
|
||||
|
||||
```json
|
||||
[
|
||||
'regionCoordinates' : [618, 317, 703, 493],
|
||||
'numberOfChanges' : 5446,
|
||||
'timestamp' : '1465894497',
|
||||
'microseconds' : '5-97451',
|
||||
'token' : 695,
|
||||
'pathToImage' : '1465894497_5-97451_frontdoor_618-317-703-493_5446_695.jpg',
|
||||
'instanceName' : 'frontdoor',
|
||||
]
|
||||
```
|
||||
|
||||
##### Example
|
||||
It is possible to subscribe multiple distributed IoT devices to the same MQTT topic and perform specific actions upon the detection of a motion. Devices with more resources could fetch the image to perform further elaboration.
|
||||
|
||||
## Streaming
|
||||
|
||||
The machinery has the ability to stream your capture device as a MJPG stream.
|
||||
|
||||
### Parameters
|
||||
|
||||
The parameters for the supported streaming protocols can be found in the `config/stream.xml` file, but you can also use the web to modify the parameters. Below you see a default configuration file; at the moment of writing only a MJPG stream is supported.
|
||||
|
||||
```xml
|
||||
<streams>
|
||||
<Mjpg>
|
||||
<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>
|
||||
```
|
||||
|
||||
#### Enabled
|
||||
|
||||
A boolean which turns ON/OFF the stream. This is interesting when working with IP cameras, where you already have an RTSP/MJPG stream from the camera itself.
|
||||
|
||||
#### Stream Port
|
||||
|
||||
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. 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:
|
||||
|
||||
```ts
|
||||
http://username:password@ip-camera:8899
|
||||
```
|
||||
336
src/open-source/releases.mdx
Normal file
@@ -0,0 +1,336 @@
|
||||
---
|
||||
name: Releases
|
||||
menu: Open Source
|
||||
route: /opensource/releases
|
||||
---
|
||||
|
||||
# Release notes
|
||||
|
||||
### 2.8.0
|
||||
|
||||
Aligned machinery, web and KiOS versions. Too many people were confused by the versioning.
|
||||
|
||||
#### Web
|
||||
|
||||
* Videos displayed on canvas were blocked in latest browsers.
|
||||
* Disabled reboot and shutdown.
|
||||
* Disabled upgrade process, use fwupdate shell command instead.
|
||||
|
||||
#### KiOS
|
||||
|
||||
* Major upgrade, solved many different problems (list to long); not possible to upgrade from 2.7.0 to 2.8.0.
|
||||
* Updated firmware to latest Raspbian (raspberrypi-kernel_1.20180417-1).
|
||||
* Support for the Raspberry Pi 4.
|
||||
|
||||
### 2.7.2
|
||||
|
||||
#### Machinery
|
||||
|
||||
* To optimise the cloud experience we've added a proxy.kerberos.io machine in between.
|
||||
* We've changed the S3 storage scheme (class:ONEZONE_IA).
|
||||
|
||||
### 2.7.1
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Resolved deadlock with livestreaming while restarting machinery.
|
||||
* Revert logging library; enabled log rotating.
|
||||
|
||||
#### KiOS
|
||||
|
||||
* Updated firmware to latest Raspbian (raspberrypi-kernel_1.20180417-1).
|
||||
* Resolved issue with WIFI on Raspberry Pi 3B+
|
||||
|
||||
### 2.7.0
|
||||
|
||||
#### Web
|
||||
|
||||
* Unique session cookie, which allows to open multiple web interfaces (e.g. when using docker).
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Added live streaming feature for app.kerberos.io
|
||||
* Upgraded logging library: log file can be max 5MB, and will rotate.
|
||||
* Better logging for cloud uploads (failed information).
|
||||
|
||||
#### Docker
|
||||
|
||||
* No longer need docker-compose, we merged the web and machinery containers to [a single container](http://hub.docker.com/r/kerberos/kerberos).
|
||||
|
||||
#### KiOS
|
||||
|
||||
* Updated firmware to latest Raspbian.
|
||||
* Support for the Raspberry Pi 3B+.
|
||||
|
||||
### 2.6.1
|
||||
|
||||
#### Web
|
||||
|
||||
* Solved issue with persisting login configuration. [#111](https://github.com/kerberos-io/web/issues/111)
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Added Pushbullet. [#139](https://github.com/kerberos-io/machinery/pull/139)
|
||||
* Cloud upload was not longer working (hotfix also in 2.6.0).
|
||||
|
||||
### 2.6.0
|
||||
|
||||
#### Web
|
||||
|
||||
* Add a cloud connection verification method. [#112](https://github.com/kerberos-io/web/issues/112)
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Add background color timestamp. [#128](https://github.com/kerberos-io/machinery/issues/128)
|
||||
* Send instanceId in AWS header when uploading to cloud (necessary for new cloud app).
|
||||
* Better support for Chinese IP cameras.
|
||||
|
||||
#### Docker
|
||||
|
||||
* Bug: Autoremove old images/video within Docker Containers. [#104](https://github.com/kerberos-io/web/issues/104)
|
||||
|
||||
### 2.5.0
|
||||
|
||||
#### Web
|
||||
|
||||
* Added Chinese and Italian language.
|
||||
* Resolved issue with INSTALLED=true.
|
||||
* Make latest_sequence available with basic auth. [#99](https://github.com/kerberos-io/web/issues/99)
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Provide an IO service for publishing events to MQTT. [#89](https://github.com/kerberos-io/machinery/issues/89)
|
||||
* Optimize recording with H264_OMX. [#83](https://github.com/kerberos-io/machinery/issues/83)
|
||||
* Implement throttler for Io detections. [#96](https://github.com/kerberos-io/machinery/issues/96)
|
||||
* SSL version 1.0.0 is no longer accessible in Raspbian. [#109](https://github.com/kerberos-io/machinery/issues/109)
|
||||
|
||||
### 2.4.2
|
||||
|
||||
#### Web
|
||||
|
||||
* Typo in french translation, causes the web interface crash.
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Resolved major bug in livestream: memory leak in stream class. [#94](https://github.com/kerberos-io/machinery/issues/94)
|
||||
* Capture health verification: check if the chosen capture device is still grabbing (and didn't stalled).
|
||||
* Extra logging when recording with raspberry pi camera.
|
||||
* Make sure the cloud upload is functioning properly, after an upload it's verified if the files really exist in the cloud.
|
||||
|
||||
### 2.4.1
|
||||
|
||||
#### Web
|
||||
|
||||
* Show warning when system is disabled. [#88](https://github.com/kerberos-io/web/issues/88).
|
||||
* Hull selector in basic view not always working.
|
||||
|
||||
### 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)
|
||||
|
||||
### 2.3.1
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Update for kerberos.cloud: pushing content-type.
|
||||
* Change default configurations.
|
||||
|
||||
### 2.3.0
|
||||
|
||||
#### Ecosystem
|
||||
|
||||
* Support for Raspberry Pi Zero W. [#8](https://github.com/kerberos-io/kios/issues/8)
|
||||
|
||||
### 2.2.1
|
||||
|
||||
#### Ecosystem
|
||||
|
||||
* Upgraded FFmpeg and libx264 on KiOS.
|
||||
|
||||
#### Web
|
||||
|
||||
* Add Bulgarian translation. [#81](https://github.com/kerberos-io/web/pull/81)
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Bug: IoVideo crashes due to a memory leak. [#70](https://github.com/kerberos-io/machinery/issues/70)
|
||||
|
||||
### 2.2.0
|
||||
|
||||
#### Ecosystem
|
||||
|
||||
* Added support for Armbian.
|
||||
* Raspbian: Async requests causes session corruption. [#78](https://github.com/kerberos-io/web/issues/78)
|
||||
|
||||
#### Web
|
||||
|
||||
* Bug: Issue format instance name. [#57](https://github.com/kerberos-io/web/issues/57)
|
||||
* Redesign settings page (better UX). [#39](https://github.com/kerberos-io/web/issues/39)
|
||||
* Possibility to edit password through web interface. [#63](https://github.com/kerberos-io/web/issues/63)
|
||||
* Support for viewing videos.
|
||||
* Update radius of heatmap.
|
||||
* PHP7 support. [#60](https://github.com/kerberos-io/web/issues/60)
|
||||
* Welcome/installation page. [#60](https://github.com/kerberos-io/web/issues/60)
|
||||
* Translation updated. [#74](https://github.com/kerberos-io/web/issues/74)
|
||||
* Privacy mode. [#54](https://github.com/kerberos-io/web/issues/54)
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Output as video file. [#60](https://github.com/kerberos-io/machinery/issues/60)
|
||||
* Bug: System hangs when a wrong IP camera url was defined. [#48](https://github.com/kerberos-io/machinery/issues/48)
|
||||
* Run arbitrary script/program. [#31](https://github.com/kerberos-io/machinery/issues/31)
|
||||
* Bug: Weird colors from RPi Camera. [#64](https://github.com/kerberos-io/machinery/issues/64)
|
||||
* Upgrade to OpenCV 3.2.0.
|
||||
|
||||
### 2.1.0
|
||||
|
||||
#### Web
|
||||
|
||||
* Added PhotoSwipe for image overview (easier to browse through images). [#45](https://github.com/kerberos-io/web/issues/45)
|
||||
* Added reboot and shutdown commands. [#46](https://github.com/kerberos-io/web/issues/46)
|
||||
* Added logging view to system page. [#33](https://github.com/kerberos-io/web/issues/33)
|
||||
* Added labels to check if machinery is running.
|
||||
* Added error handling if web interface isn’t working properly.
|
||||
* Fixed Heatmap.js fail to load by ad-blocker. [#42](https://github.com/kerberos-io/web/issues/42)
|
||||
* Show additional information on the dashboard (streaming is opening or not) there is no data available.
|
||||
* Settings page is now visible on mobile (+ changed icon).
|
||||
* Fixed sorting of news articles.
|
||||
* Removed links to assets in the cloud (.css files).
|
||||
* Design: improved layout of login page, async loading of image view.
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Added configurable streaming port and quality. [#41](https://github.com/kerberos-io/machinery/issues/41)
|
||||
* Added new algorithm: Background subtraction.
|
||||
* Added new heuristic: Counter (for object/people counting). [#42](https://github.com/kerberos-io/machinery/issues/42)
|
||||
* Added video capture, which can be used for debugging purposes (replay a video fragment).
|
||||
* It’s now possible to mark the images with a timestamp. [#36](https://github.com/kerberos-io/machinery/issues/36)
|
||||
* Fixed blocking streaming socket. [#39](https://github.com/kerberos-io/machinery/issues/39)
|
||||
|
||||
#### Ecosystem
|
||||
|
||||
* Fix removal images if disk is almost full (wrong path was defined).
|
||||
* Support for the Raspberry Pi Camera module v2.1. [#3](https://github.com/kerberos-io/kios/issues/3)
|
||||
* Support for the Raspberry Pi Zero; updated kernel to latest Raspbian. [#3](https://github.com/kerberos-io/kios/issues/3)
|
||||
* KiOS GUI installer.
|
||||
|
||||
### 2.0.0
|
||||
|
||||
#### Web
|
||||
|
||||
* Add simple ON/OFF toggle. [#24](https://github.com/kerberos-io/web/issues/24)
|
||||
* Added update strategy when using KiOS. [#23](https://github.com/kerberos-io/web/issues/23)
|
||||
* A system page which shows system information. [#20](https://github.com/kerberos-io/web/issues/20)
|
||||
* Heatmap on dashboard page [#19](https://github.com/kerberos-io/web/issues/19)
|
||||
* Added live stream view on the dashboard page [#2](https://github.com/kerberos-io/web/issues/2)
|
||||
* Fixed bug cloud syncing [#16](https://github.com/kerberos-io/web/issues/16)
|
||||
* Fixed broken settings page when space in instane name [#16](https://github.com/kerberos-io/web/issues/16)
|
||||
|
||||
#### Machinery
|
||||
|
||||
* RTSP support for IP-camera's. [#21](https://github.com/kerberos-io/machinery/issues/21)
|
||||
* Verbose logging. [#35](https://github.com/kerberos-io/machinery/issues/35)
|
||||
* IO-devices are executed in a seperate thread. [#28](https://github.com/kerberos-io/machinery/issues/28)
|
||||
* Live streaming (MJPEG). [#26](https://github.com/kerberos-io/machinery/issues/26)
|
||||
* Execute multiple instances on a machine. [#24](https://github.com/kerberos-io/machinery/issues/24)
|
||||
* Override config by arguments. [#22](https://github.com/kerberos-io/machinery/issues/22)
|
||||
* Move S3 upload to machinery and remove sync-s3 repository. [#16](https://github.com/kerberos-io/machinery/issues/16)
|
||||
|
||||
#### Docker
|
||||
|
||||
* Added Docker image (x86_x64) to Docker Hub.
|
||||
|
||||
#### Ecosystem
|
||||
|
||||
* Add support for Raspberry Pi 1, 2 and 3. [#1](https://github.com/kerberos-io/kios/issues/1)
|
||||
|
||||
### 1.1.0
|
||||
|
||||
#### Web
|
||||
|
||||
* Support IP camera's with MJPEG stream. [#3](https://github.com/kerberos-io/web/issues/3)
|
||||
* Introduce new API methods to configure the machinery, using basic auth. [#4](https://github.com/kerberos-io/web/issues/4)
|
||||
* Optimization of loading image and dashboard page, completely redesigned the retrieval of images. [#5](https://github.com/kerberos-io/web/issues/5)
|
||||
* Optimization of settings page. [#5](https://github.com/kerberos-io/web/issues/5)
|
||||
* Timebar gradient only works in Chrome. [#6](https://github.com/kerberos-io/web/issues/6)
|
||||
* Minor CSS fixes for responsive layout.
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Flip/rotate option for capture devices. [#5](https://github.com/kerberos-io/machinery/issues/1)
|
||||
* Support IP camera's with MJPEG stream. [#4](https://github.com/kerberos-io/machinery/issues/4)
|
||||
* Introduced webhook io device. [#5](https://github.com/kerberos-io/machinery/issues/5)
|
||||
|
||||
#### Cloud
|
||||
|
||||
* Fixed problem when syncing a huge amount of images. [#1](https://github.com/kerberos-io/sync-s3/issues/1)
|
||||
|
||||
### 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.
|
||||
|
||||
### 1.0.2
|
||||
|
||||
#### Web
|
||||
|
||||
* Timezone on settings page is also used for the webinterface.
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Added extra timezones to timezone.xml.
|
||||
|
||||
### 1.0.1
|
||||
|
||||
#### Web
|
||||
|
||||
* Improved error handling (date search).
|
||||
|
||||
#### Machinery
|
||||
|
||||
* Improved memory cleanup.
|
||||
|
||||
### 1.0.0
|
||||
|
||||
#### 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.
|
||||
* Algorithms: **Differential Images**.
|
||||
* Heuristics: **Sequence**.
|
||||
* Expositors: Select a **Hull** or **Rectangle**.
|
||||
* Outputs: Write image to **Disk**, trigger an **GPIO** output pin and send a **TCP/IP packet**.
|
||||
* Cloud: send your images to the **Kerberos.io cloud aplication**.
|
||||
43
src/open-source/upgrade.mdx
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
name: Upgrade
|
||||
menu: Open Source
|
||||
route: /opensource/upgrade
|
||||
---
|
||||
|
||||
# Upgrade
|
||||
|
||||
To upgrade your Kerberos agent to a new version you should follow the approach which fits your initial installation method. If you installed KiOS follow the KiOS upgrade procedure, if installed on Raspbian follow the Raspbian upgrade procedure, etc.
|
||||
|
||||
Please note that it might be possible that some new files are added or existing files were updated. To make sure everything works as expected, you should clear your browser cache.
|
||||
|
||||
## KiOS
|
||||
|
||||
If you installed KiOS, you can use the built-in upgrade method, `fwupdate`. The `fwupdate` command is a shell script which contains a couple of functions. For example it allows you to download, extract and flash a new version of KiOS to your SD card. The process is pretty straight forward.
|
||||
|
||||
First SSH or connect to KiOS first, and execute following command to see your current version.
|
||||
|
||||
```bash
|
||||
fwupdate current
|
||||
```
|
||||
|
||||
Next look for all available versions of KiOS.
|
||||
|
||||
```bash
|
||||
fwupdate versions
|
||||
```
|
||||
|
||||
Select the version to which you would like to upgrade, and run following command.
|
||||
|
||||
```bash
|
||||
fwupdate upgrade <version>
|
||||
```
|
||||
|
||||
KiOS will reboot, and your new version will be available.
|
||||
|
||||
## Raspbian
|
||||
|
||||
If you want to install a new version of the Kerberos agent for Raspbian, there is no automated versioning process available like KiOS. To perform an upgrade you'll need to follow the [traditional installation](/opensource/installation#raspbian) procedure of Raspbian.
|
||||
|
||||
## Docker
|
||||
|
||||
When a new release is available, a new Docker image will be available on the Docker hub. You can simply delete your existing container and image, and download it again.
|
||||
228
src/open-source/web.mdx
Normal file
@@ -0,0 +1,228 @@
|
||||
---
|
||||
name: Web
|
||||
menu: Open Source
|
||||
route: /opensource/web
|
||||
---
|
||||
|
||||
# Web interface
|
||||
|
||||
The web is responsible for the visualization. It's a GUI which helps the user to find activity at a specific period, configure the machinery, view a live stream, see system information and much more.
|
||||
|
||||
It's written in PHP using the extremely popular PHP Framework Laravel, and Javascript using the client-side framework BackboneJS. We will discuss the different pages and functionality briefly. Please check out [the demo environment](https://demo.kerberos.io) if you want to see a real life example.
|
||||
|
||||
## Overview
|
||||
|
||||
We will shortly discuss the different pages that make up the web interface of Kerberos Open Source.
|
||||
|
||||
### Dashboard
|
||||
|
||||
The landing page of the web is the dashboard. On the dashboard a user will see some statistics: activity per hour, activity per day, a live stream, the latest activity and a heatmap.
|
||||
|
||||

|
||||
|
||||
### Overview
|
||||
|
||||
When selecting a specific day, you'll will get a timeline and overview. By using the timeline you can navigate through a day; the timeline highlights the amount of activity, from gray to red.
|
||||
|
||||

|
||||
|
||||
### Settings
|
||||
|
||||
The settings page allows you to configure the machinery. You can define the type of camera, post-processes, conditions and much more; it's highly configurable.
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
### System
|
||||
|
||||
The system page allows you to monitor the system. On this page you'll get an overview of the system specifications (CPU, Memory, Network, etc). Several actions are available: you can download system information (for debugging purposes) and download or remove your images.
|
||||
|
||||

|
||||
|
||||
## Project structure
|
||||
|
||||
The web interface is using the Laravel framework (version 5.4). There is a lot of documentation related to Laravel, please review [their documentation website here](https://laravel.com/docs/5.4). In a nutshell this is how the web is organised.
|
||||
|
||||
### Back-end
|
||||
|
||||
- config/app.php - general application settings.
|
||||
- config/kerberos.php - this file contains web 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.
|
||||
|
||||
### Front-end
|
||||
|
||||
- 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/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 web repository.
|
||||
- public/Gruntfile.js - We are using Grunt for our task manager.
|
||||
|
||||
## API
|
||||
|
||||
If you want to integrate the Kerberos agent with your own application, you're at the right place! The web interface comes with a RESTfull API, that allows you to retrieve and modify information from the Kerberos agent.
|
||||
|
||||
- Disable the machinery
|
||||
- Health check
|
||||
- Enable or disable output devices
|
||||
- etc.
|
||||
|
||||
### Authentication
|
||||
|
||||
To use the RESTfull API of your Kerberos agent you need to define an Authorization header with each request. We use Basic Authentication to secure the different endpoints.
|
||||
|
||||
```json
|
||||
"Authorization": "Basic root:root"
|
||||
```
|
||||
|
||||
An example with Python looks like this.
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
import base64
|
||||
url = "http://ip-of-pi/api/v1/condition/enabled"
|
||||
username = "user"
|
||||
password = "passw"
|
||||
basicAuth = base64.b64encode('%s:%s' % (username, password))
|
||||
headers = {"Authorization": "Basic " + basicAuth, "Content-Type": "application/json"}
|
||||
data = '{"active": "true"}'
|
||||
#Call REST API
|
||||
response = requests.put(url, data=data, headers=headers)
|
||||
print(response.text)
|
||||
```
|
||||
|
||||
If you're using the wrong credentials, the web will return following error message.
|
||||
|
||||
```text
|
||||
Invalid credentials.
|
||||
```
|
||||
|
||||
### Endpoints
|
||||
|
||||
All endpoints are prefixed with api/v[version]/, in which the last part defines the API version number. Below you will find all the available endpoints with there signature and response. Note that when you call an endpoint which doesn't exists, the web will throw an 404.
|
||||
|
||||
```json
|
||||
{
|
||||
"error": "API method does not exists"
|
||||
}
|
||||
```
|
||||
|
||||
### Version 1
|
||||
|
||||
Below you'll find a list of all API methods which are available for version 1.
|
||||
|
||||
`GET api/v1/name`
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve the name of your instance.
|
||||
|
||||
**Response**
|
||||
```json
|
||||
{
|
||||
"name": "frontdoor"
|
||||
}
|
||||
```
|
||||
|
||||
`PUT api/v1/name`
|
||||
|
||||
**Description**
|
||||
|
||||
Change the name of your instance.
|
||||
|
||||
**Payload**
|
||||
```json
|
||||
{
|
||||
"name": "frontdoor-changed"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**
|
||||
```json
|
||||
{
|
||||
"name": "frontdoor-changed"
|
||||
}
|
||||
```
|
||||
|
||||
`GET api/v1/images/latest_sequence`
|
||||
|
||||
**Description**
|
||||
|
||||
Retrieve the latest sequence detected.
|
||||
|
||||
**Response**
|
||||
```json
|
||||
[
|
||||
{
|
||||
time: "10:59:57",
|
||||
src: "https://demo.kerberos.io/capture/1501491597_6-310145_frontdoor_722-691-873-926_703_511.mp4",
|
||||
local_src: "/var/www/web/public/capture/1501491597_6-310145_frontdoor_722-691-873-926_703_511.mp4",
|
||||
metadata: {
|
||||
key: "1501491597_6-310145_frontdoor_722-691-873-926_703_511.mp4",
|
||||
user: "1501491597_6-310145_frontdoor_722-691-873-926_703_511.mp4",
|
||||
timestamp: 1501491597,
|
||||
microseconds: "6-310145",
|
||||
instanceName: "frontdoor",
|
||||
regionCoordinates: "722-691-873-926",
|
||||
numberOfChanges: "703",
|
||||
token: "511"
|
||||
},
|
||||
type: "video"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
`GET api/v1/condition/enabled`
|
||||
|
||||
**Description**
|
||||
|
||||
Check if enabled or disabled.
|
||||
|
||||
**Response**
|
||||
```json
|
||||
{
|
||||
"active": "true",
|
||||
"delay": "5000"
|
||||
}
|
||||
```
|
||||
|
||||
`PUT api/v1/condition/enabled`
|
||||
|
||||
**Description**
|
||||
|
||||
Activate or disable the system.
|
||||
|
||||
**Payload**
|
||||
```json
|
||||
{
|
||||
"active": "false"
|
||||
}
|
||||
```
|
||||
|
||||
**Response**
|
||||
```json
|
||||
{
|
||||
"active": "false",
|
||||
"delay": "5000"
|
||||
}
|
||||
```
|
||||
|
||||
`GET api/v1/system/health`
|
||||
|
||||
**Description**
|
||||
|
||||
Check if the machinery is running (the stream is connected).
|
||||
|
||||
**Response**
|
||||
```json
|
||||
{
|
||||
"status": "false"
|
||||
}
|
||||
```
|
||||