MAjor update

This commit is contained in:
Christoffer Martinsson 2018-10-27 19:47:36 +02:00
parent 198a4d829b
commit 47118b3768
21 changed files with 280 additions and 40 deletions

View File

@ -13,57 +13,25 @@ defaultContentLanguage = "en"
defaultContentLanguageInSubdir= false
enableMissingTranslationPlaceholders = false
# [Languages]
# [Languages.en]
# title = "Documentation for Hugo docDock"
# weight = 1
# languageName = "English"
#
# [Languages.fr]
# title = "Documentation du thème docDock"
# weight = 2
# languageName = "Français"
[params]
editURL = ""
showVisitedLinks = true # default is false
themeStyle = "flex" # "original" or "flex" # default "flex"
themeVariant = "" # choose theme variant "green", "gold" , "gray", "blue" (default)
ordersectionsby = "weight" # ordersectionsby = "title"
disableHomeIcon = false # default is false
disableHomeIcon = true # default is false
disableSearch = false # default is false
disableNavChevron = false # set true to hide next/prev chevron, default is false
highlightClientSide = false # set true to use highlight.pack.js instead of the default hugo chroma highlighter
menushortcutsnewtab = false # set true to open shortcuts links to a new tab/window
enableGitInfo = true
enableGitInfo = false
[outputs]
home = [ "HTML", "RSS", "JSON"]
[[menu.shortcuts]]
pre = "<h3>More</h3>"
name = "<i class='fa fa-github'></i> <label>Github repo</label>"
identifier = "ds"
url = "https://github.com/vjeantet/hugo-theme-docdock"
name = "<i class='fa fa-gitlab'></i> <label>GitLab repo</label>"
url = "https://git.cmtec.se/haasp"
weight = 10
[[menu.shortcuts]]
name = "<i class='fa fa-cloud-download'></i> <label>Download</label>"
url = "https://github.com/vjeantet/hugo-theme-docdock/archive/master.zip"
weight = 11
[[menu.shortcuts]]
name = "<i class='fa fa-bookmark'></i> <label>Hugo Documentation</label>"
identifier = "hugodoc"
url = "https://gohugo.io/"
weight = 20
[[menu.shortcuts]]
name = "<i class='fa fa-bullhorn'></i> <label>Credits</label>"
url = "/credits"
weight = 30

1
content/_footer.md Normal file
View File

@ -0,0 +1 @@
Copyright 2018 CMtec

2
content/_header.md Normal file
View File

@ -0,0 +1,2 @@
![LOGO](/images/HAASPSquareLogo_Light.svg) [HAASP](/)

31
content/_index.md Normal file
View File

@ -0,0 +1,31 @@
![LOGO](images/HAASPLogo_Dark.png)
**H**ome **A**utomation **A**nd **S**ecurity **P**latform is a sowftware framework for home automation and security installations. Primary written in python and optimized for use within docker containers HAASP consist of following modules:
### Lib
* **libHaasp** : HAASP main module package - [https://git.cmtec.se/haasp/libhaasp](https://git.cmtec.se/haasp/libhaasp)
### Core
* **Core** : HAASP core application to handle all events and configurations - [https://git.cmtec.se/haasp/haasp_core](https://git.cmtec.se/haasp/haasp_core)
* ***haasp_core*** HAASP core executable
### Applications
* **Zwave** : Zwave application to relay zwave events to HAASP - [https://git.cmtec.se/haasp/haasp_zwave](https://git.cmtec.se/haasp/haasp_zwave)
* ***haasp_zwave*** HAASP zwave executable
* **Huee** : HUE Emulator to enable Amazon Echo to send events to HAASP - [https://git.cmtec.se/haasp/haasp_huee](https://git.cmtec.se/haasp/haasp_huee)
* ***haasp_huee*** HAASP huee executable
* **Broadlink** : IR Wifi extender support for HAASP - [https://git.cmtec.se/haasp/haasp_broadlink](https://git.cmtec.se/haasp/haasp_broadlink)
* ***haasp_broadlink*** HAASP broadlink executable
* **WebApp** : Web application to interact with HAASP - [https://git.cmtec.se/haasp/haasp_webapp](https://git.cmtec.se/haasp/haasp_webapp)
* ***haasp_webapp*** HAASP webapp executable
* **Supervisor** : Hardware supervisor that send SMS depending of HAASP events - [TBD]()
* ***haasp_supervisor*** HAASP supervisor executable
### Management
* **Cli** : HAASP cli to send command and view logging - [https://git.cmtec.se/haasp/haasp_cli](https://git.cmtec.se/haasp/haasp_cli)
* ***haasp_cli*** HAASP cli executable
{{< figure src="/images/cmtecLogo_Dark_600x276.png" width="100px" link="https://pages.cmtec.se/cmtec.se" >}}

View File

@ -0,0 +1,5 @@
+++
title = "Applications"
+++
TEST

View File

@ -0,0 +1,9 @@
+++
title = "Zwave"
date = "2018-10-26"
Weight=2
+++
# Zwave

View File

@ -0,0 +1,44 @@
+++
title = "Configuration"
date = "2017-04-29T18:36:24+02:00"
Weight=3
+++
The config file is located at `~/.haasp/haasp_config.py`
### Template
```
from haasp import EventObject, ConfigObject
class Config(ConfigObject):
def config(self):
config = {}
# Clock
config["clock"] = {}
config["clock"]["location"] = "copenhagen"
return config
def setup(self):
# -------------------------------------------------------------------------
# Create event objects
# -------------------------------------------------------------------------
self.clock = EventObject("clock", "now")
self.timer_test = EventObject("timer", "test")
def process_event(self):
# -------------------------------------------------------------------------
# Create workflows
# -------------------------------------------------------------------------
if self.timer_test.event == "triggered":
self.log.debug("Timer DONE!")
```

View File

@ -0,0 +1,91 @@
+++
title = "Installation"
date = "2018-10-26"
Weight=2
+++
Following instructions assumes that the HAASP is installed to a Debian based Linux OS
### Install dependancies
`sudo apt-get update`
`sudo apt-get install git python-pip python-all-dev`
`sudo pip install -U pip virtualenv`
### Install libHAASP
`mkdir ~/.haasp`
`cd ~/.haasp`
`virtualenv env`
`~/.haasp/env/bin/pip install -U git+https://git.cmtec.se/haasp/libhaasp.git`
### Install HAASP core
`cd ~/.haasp`
`virtualenv env`
`~/.haasp/env/bin/pip install -U git+https://git.cmtec.se/haasp/haasp_core.git`
### Install HAASP application
`~/.haasp/env/bin/haasp_install <APP> --ip <CORE_IP> --subname <SUBNAME>`
***--ip*** *is optional and should be used if application and core is running on different hardware*
***--subname*** *is optional and should be used if multiple instances of the application needs to be running*
### Install HAASP cli on remote/seperate computer
Make sure you have python3, git and pip installed
`pip install --user -U git+https://git.cmtec.se/haasp/haasp.git`
`pip install --user -U git+https://git.cmtec.se/haasp/haasp_cli.git`
To run the cli then add the ip for the core to the command `haasp_cli --ip <CORE_IP>`
### Enable autostart
Create file /etc/init.d/haasp and add following code (`sudo vi /etc/init.d/haasp`):
```
#! /bin/sh
### BEGIN INIT INFO
# Provides: haasp
# Required-Start: $remote_fs $local_fs $network $named $time $syslog
# Required-Stop: $remote_fs $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: HAASP init script
# Description: HAASP nit script
### END INIT INFO
USER=pi
# Carry out specific functions when asked to by the system
case "$1" in
start)
echo "Starting haasp"
# run application you want to start
sudo -u $USER /home/$USER/.haasp/core/env/bin/haasp start
;;
stop)
echo "Stopping haasp"
# kill application you want to stop
sudo -u $USER /home/$USER/.haasp/core/env/bin/haasp stop
;;
restart)
echo "Restarting haasp"
# kill application you want to stop
sudo -u $USER /home/$USER/.haasp/core/env/bin/haasp restart
;;
*)
echo "Usage: /etc/init.d/haasp {start|stop|restart}"
exit 1
;;
esac
exit 0
```
Change the `USER=pi` if you don't use pi as user.
Make the init file executable:
`sudo chmod +x /etc/init.d/haasp`
Enable autostart of the file:
`sudo update-rc.d haasp defaults`
Make sure the user have privilege to run the init file as sudo without password prompt. If not then add following code to visudo:
```
# User privilege specification
%users ALL=(ALL) NOPASSWD: /etc/init.d/haasp
```

0
layouts/.gitkeep Normal file
View File

View File

@ -0,0 +1 @@
<link rel="stylesheet" href="/css/custom.css">

90
static/css/custom.css Normal file
View File

@ -0,0 +1,90 @@
header {
background-color: #000;
color: #c6c6c6;
}
article > aside {
background-color: #262626;
color: #c6c6c6;
}
article > aside .menu .dd-item.active > div * {
border-color: #000;
background-color: #262626;
}
article > aside .menu .dd-item li {
border-color: #c6c6c6;
}
article > aside .menu .dd-item div a:hover, article > aside .menu .dd-item div a:focus, article > aside .menu .dd-item div a:active {
background-color: #262626;
border-radius: 0;
color: #c6c6c6;
}
article {
background-color: #808080;
color: #c6c6c6;
}
.searchbox input {
background: #6c6c6c;
color: #000;
border-color: #6c6c6c;
}
.searchbox ::-webkit-input-placeholder {
color: #000;
}
.searchbox span {
color: #000;
}
footer {
background-color: #808080;
color: #000;
}
article section.page {
color: #262626;
font-family: "Helvetica";
font-weight: normal;
}
section strong {
font-weight: bold;
}
article section.page a{
color: #262626;
}
#navigation {
border-color: #6c6c6c;
color: #808080;
}
article section.page h1:first-of-type {
color: #c6c6c6;
font-size: 3.25rem;
font-family: "Helvetica";
}
.nav i {
color: #c6c6c6;
}
.nav label {
color: #c6c6c6;
}
body {
background-color: #808080;
}
article section.page pre {
background: #c6c6c6;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 99 99" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><rect id="HAASP_Logo_Light" x="0" y="0" width="98.137" height="98.332" style="fill:none;"/><g><path d="M98.072,5.884c0,-3.247 -2.636,-5.884 -5.884,-5.884l-86.304,0c-3.247,0 -5.884,2.637 -5.884,5.884l0,86.304c0,3.248 2.637,5.884 5.884,5.884l86.304,0c3.248,0 5.884,-2.636 5.884,-5.884l0,-86.304Z" style="fill:#f2f2f2;"/><g><path d="M35.732,36.525c0.262,-1.35 1.027,-2.533 1.894,-3.725c4.881,-6.713 12.581,-21.735 15.659,-14.795c-3.77,4.07 -2.803,12.449 0.431,15.736c5.815,5.908 -1.017,-1.912 -5.128,2.492c-1.13,1.21 -1.361,0.952 -1.151,2.476l16.016,15.62c1.209,1.179 1.944,2.664 2.199,4.214c0.257,0.881 0.246,1.826 -0.038,2.705c-0.262,1.35 -0.892,2.645 -1.894,3.725c-5.579,6.016 -7.096,18.409 -15.056,14.983c4.348,-4.744 3.9,-12.236 -1.179,-16.722c-1.241,-1.096 6.633,-2.646 6.423,-4.17l-16.016,-15.62c-1.208,-1.179 -1.943,-2.664 -2.199,-4.214c-0.257,-0.881 -0.246,-1.826 0.039,-2.705Z" style="fill:#333;"/><path d="M53.982,62.88c-0.831,0.934 -2.008,1.489 -3.258,1.533c-1.249,0.045 -2.463,-0.424 -3.358,-1.297c-4.989,-4.865 -14.288,-13.935 -20.17,-19.672c-2.961,-2.888 -3.08,-7.611 -0.267,-10.644c5.579,-6.015 14.386,-15.512 19.068,-20.56c0.839,-0.905 2.004,-1.436 3.236,-1.476c1.232,-0.04 2.43,0.414 3.325,1.261c0.024,0.023 0.049,0.046 0.073,0.069c1.846,1.747 1.936,4.656 0.202,6.513c-3.918,4.197 -10.608,11.364 -14.719,15.767c-1.977,2.117 -1.882,5.431 0.212,7.433c4.325,4.132 11.332,10.827 15.396,14.71c1.785,1.705 1.9,4.517 0.26,6.362c0,0 0,0 0,0.001Z" style="fill:#377bba;"/><path d="M48.128,34.894c0.83,-0.935 2.007,-1.489 3.257,-1.534c1.25,-0.045 2.463,0.424 3.359,1.297c4.988,4.866 14.287,13.935 20.169,19.672c2.962,2.888 3.08,7.611 0.267,10.644c-5.579,6.016 -14.386,15.512 -19.068,20.561c-0.838,0.904 -2.003,1.435 -3.236,1.475c-1.232,0.041 -2.429,-0.414 -3.325,-1.261c-0.024,-0.023 -0.048,-0.046 -0.073,-0.069c-1.845,-1.746 -1.936,-4.655 -0.201,-6.513c3.918,-4.197 10.608,-11.363 14.718,-15.767c1.977,-2.117 1.883,-5.431 -0.212,-7.432c-4.325,-4.132 -11.331,-10.827 -15.396,-14.711c-1.784,-1.705 -1.899,-4.516 -0.26,-6.361c0,-0.001 0,-0.001 0.001,-0.001Z" style="fill:#4fc842;"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 99 99" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><rect id="HAASP_Logo_Dark" x="0" y="0" width="98.137" height="98.332" style="fill:none;"/><g><path d="M98.072,5.884c0,-3.247 -2.636,-5.884 -5.884,-5.884l-86.304,0c-3.247,0 -5.884,2.637 -5.884,5.884l0,86.304c0,3.248 2.637,5.884 5.884,5.884l86.304,0c3.248,0 5.884,-2.636 5.884,-5.884l0,-86.304Z" style="fill:#3e3e3e;"/><g><path d="M35.732,36.525c0.262,-1.35 1.027,-2.533 1.894,-3.725c4.881,-6.713 12.581,-21.735 15.659,-14.795c-3.77,4.07 -2.803,12.449 0.431,15.736c5.815,5.908 -1.017,-1.912 -5.128,2.492c-1.13,1.21 -1.361,0.952 -1.151,2.476l16.016,15.62c1.209,1.179 1.944,2.664 2.199,4.214c0.257,0.881 0.246,1.826 -0.038,2.705c-0.262,1.35 -0.892,2.645 -1.894,3.725c-5.579,6.016 -7.096,18.409 -15.056,14.983c4.348,-4.744 3.9,-12.236 -1.179,-16.722c-1.241,-1.096 6.633,-2.646 6.423,-4.17l-16.016,-15.62c-1.208,-1.179 -1.943,-2.664 -2.199,-4.214c-0.257,-0.881 -0.246,-1.826 0.039,-2.705Z" style="fill:#f2f2f2;"/><path d="M53.982,62.88c-0.831,0.934 -2.008,1.489 -3.258,1.533c-1.249,0.045 -2.463,-0.424 -3.358,-1.297c-4.989,-4.865 -14.288,-13.935 -20.17,-19.672c-2.961,-2.888 -3.08,-7.611 -0.267,-10.644c5.579,-6.015 14.386,-15.512 19.068,-20.56c0.839,-0.905 2.004,-1.436 3.236,-1.476c1.232,-0.04 2.43,0.414 3.325,1.261c0.024,0.023 0.049,0.046 0.073,0.069c1.846,1.747 1.936,4.656 0.202,6.513c-3.918,4.197 -10.608,11.364 -14.719,15.767c-1.977,2.117 -1.882,5.431 0.212,7.433c4.325,4.132 11.332,10.827 15.396,14.71c1.785,1.705 1.9,4.517 0.26,6.362c0,0 0,0 0,0.001Z" style="fill:#377bba;"/><path d="M48.128,34.894c0.83,-0.935 2.007,-1.489 3.257,-1.534c1.25,-0.045 2.463,0.424 3.359,1.297c4.988,4.866 14.287,13.935 20.169,19.672c2.962,2.888 3.08,7.611 0.267,10.644c-5.579,6.016 -14.386,15.512 -19.068,20.561c-0.838,0.904 -2.003,1.435 -3.236,1.475c-1.232,0.041 -2.429,-0.414 -3.325,-1.261c-0.024,-0.023 -0.048,-0.046 -0.073,-0.069c-1.845,-1.746 -1.936,-4.655 -0.201,-6.513c3.918,-4.197 10.608,-11.363 14.718,-15.767c1.977,-2.117 1.883,-5.431 -0.212,-7.432c-4.325,-4.132 -11.331,-10.827 -15.396,-14.711c-1.784,-1.705 -1.899,-4.516 -0.26,-6.361c0,-0.001 0,-0.001 0.001,-0.001Z" style="fill:#4fc842;"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 812 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB