Added new script
This commit is contained in:
parent
6d54150f06
commit
c734a812fa
@ -1,33 +1,26 @@
|
|||||||
+++
|
+++
|
||||||
title = "Home"
|
title = "Home"
|
||||||
weight = 1
|
weight = 1
|
||||||
|
date = "2018-10-29"
|
||||||
+++
|
+++
|
||||||

|

|
||||||
|
|
||||||
**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:
|
**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.
|
||||||
|
|
||||||
### Lib
|
{{% alert theme="info" %}}At the moment access to HAASP is only granted by sending us a request email at [info@haasp.net](mailto:info@haasp.net) or [info@cmtec.se](mailto:info@cmtec.se){{% /alert %}}
|
||||||
* **libHaasp** : HAASP main module package - [https://git.cmtec.se/haasp/libhaasp](https://git.cmtec.se/haasp/libhaasp)
|
|
||||||
|
**Features:**
|
||||||
|
|
||||||
### Core
|
* Scalable non restricted workflow - *Configuration made entirely in python*
|
||||||
* **Core** : HAASP core application to handle all events and configurations - [https://git.cmtec.se/haasp/haasp_core](https://git.cmtec.se/haasp/haasp_core)
|
* Scalable module network - *Communication between modules via tcp protocol*
|
||||||
* ***haasp_core*** HAASP core executable
|
* Deployable on Docker environment
|
||||||
|
* Deployable on Unraid server (via Docker containers)
|
||||||
|
* Deployable on dedecated hardware (ex: raspberry pi)
|
||||||
|
|
||||||
### 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
|
**Contribution:**
|
||||||
* **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
|
If you want to contribute to the HAASP project please feel free to send an email to [info@haasp.net](mailto:info@haasp.net) or [info@cmtec.se](mailto:info@cmtec.se)
|
||||||
|
|
||||||
{{< figure src="/images/cmtecLogo_Dark_600x276.png" width="100px" link="https://pages.cmtec.se/cmtec.se" >}}
|
{{< figure src="/images/cmtecLogo_Dark_600x276.png" width="100px" link="https://pages.cmtec.se/cmtec.se" >}}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
title = "Applications"
|
title = "Applications"
|
||||||
weight=5
|
weight=8
|
||||||
alwaysopen = true
|
alwaysopen = true
|
||||||
+++
|
+++
|
||||||
|
|
||||||
TEST
|
:
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
+++
|
+++
|
||||||
|
weight = "10"
|
||||||
title = "Broadlink"
|
title = "Broadlink"
|
||||||
date = "2018-08-06T13:43:48.000Z"
|
date = "2018-08-06T13:43:48.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
The broadlink app will output all found devices on start, you can use this to setup your config file as shown bellow
|
The broadlink app will output all found devices on start, you can use this to setup your config file as shown bellow
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
+++
|
+++
|
||||||
title = "Changelog"
|
title = "Changelog"
|
||||||
date = "2018-08-06T13:43:48.000Z"
|
date = "2018-08-06T13:43:48.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
### v1.0
|
### v1.0
|
||||||
Basic function like send ir/rf codes and learning ir/rf codes works now
|
Basic function like send ir/rf codes and learning ir/rf codes works now
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
|
weight = "11"
|
||||||
title = "Huee"
|
title = "Huee"
|
||||||
date = "2018-08-06T13:14:07.000Z"
|
date = "2018-08-06T13:14:07.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
+++
|
+++
|
||||||
title = "Changelog"
|
title = "Changelog"
|
||||||
date = "2018-08-06T13:14:07.000Z"
|
date = "2018-08-06T13:14:07.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
|
weight = "12"
|
||||||
title = "Webapp"
|
title = "Webapp"
|
||||||
date = "2018-10-23T20:28:25.000Z"
|
date = "2018-10-23T20:28:25.000Z"
|
||||||
|
lastmodifierdisplayname = "christianm"
|
||||||
|
lastmodifieremail = "chrillemz@gmail.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
+++
|
+++
|
||||||
title = "Changelog"
|
title = "Changelog"
|
||||||
date = "2018-10-23T20:28:25.000Z"
|
date = "2018-10-23T20:28:25.000Z"
|
||||||
|
lastmodifierdisplayname = "christianm"
|
||||||
|
lastmodifieremail = "chrillemz@gmail.com"
|
||||||
+++
|
+++
|
||||||
### v0.10
|
### v0.10
|
||||||
Updated web UI, we now group the buttons with color and som style update on buttons
|
Updated web UI, we now group the buttons with color and som style update on buttons
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
|
weight = "13"
|
||||||
title = "Zwave"
|
title = "Zwave"
|
||||||
date = "2018-08-06T12:01:09.000Z"
|
date = "2018-08-06T12:01:09.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
+++
|
+++
|
||||||
title = "Changelog"
|
title = "Changelog"
|
||||||
date = "2018-08-06T12:01:09.000Z"
|
date = "2018-08-06T12:01:09.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -2,4 +2,6 @@
|
|||||||
title = "CLI"
|
title = "CLI"
|
||||||
weight = 7
|
weight = 7
|
||||||
date = "2018-08-06T11:09:51.000Z"
|
date = "2018-08-06T11:09:51.000Z"
|
||||||
|
lastmodifierdisplayname = "Christian Martinsson"
|
||||||
|
lastmodifieremail = "chrillemz@gmail.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
+++
|
+++
|
||||||
title = "Changelog"
|
title = "Changelog"
|
||||||
date = "2018-08-06T11:09:51.000Z"
|
date = "2018-08-06T11:09:51.000Z"
|
||||||
|
lastmodifierdisplayname = "Christian Martinsson"
|
||||||
|
lastmodifieremail = "chrillemz@gmail.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -7,7 +7,7 @@ The config file is located at `~/.haasp/haasp_config.py`
|
|||||||
|
|
||||||
### Template
|
### Template
|
||||||
```python
|
```python
|
||||||
from haasp import EventObject, ConfigObject
|
from libhaasp import EventObject, ConfigObject
|
||||||
|
|
||||||
class Config(ConfigObject):
|
class Config(ConfigObject):
|
||||||
|
|
||||||
@ -38,5 +38,4 @@ class Config(ConfigObject):
|
|||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
if self.timer_test.event == "triggered":
|
if self.timer_test.event == "triggered":
|
||||||
self.log.debug("Timer DONE!")
|
self.log.debug("Timer DONE!")
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
+++
|
+++
|
||||||
title = "Core"
|
title = "Core"
|
||||||
head = "<label>Modules</label>"
|
weight = 6
|
||||||
weight = 5
|
|
||||||
date = "2018-08-06T20:43:20.000Z"
|
date = "2018-08-06T20:43:20.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
+++
|
+++
|
||||||
title = "Changelog"
|
title = "Changelog"
|
||||||
date = "2018-08-06T20:43:20.000Z"
|
date = "2018-08-06T20:43:20.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "christoffer.martinsson@mildef.com"
|
||||||
+++
|
+++
|
||||||
### v1.2
|
### v1.2
|
||||||
|
|
||||||
|
|||||||
8
content/libhaasp/_index.md
Normal file
8
content/libhaasp/_index.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
+++
|
||||||
|
title = "libHAASP"
|
||||||
|
head = "<label>Modules</label>"
|
||||||
|
weight = 5
|
||||||
|
date = "2018-08-09T14:27:53.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "cm@cmtec.se"
|
||||||
|
+++
|
||||||
6
content/libhaasp/changelog.md
Normal file
6
content/libhaasp/changelog.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
+++
|
||||||
|
title = "Changelog"
|
||||||
|
date = "2018-08-09T14:27:53.000Z"
|
||||||
|
lastmodifierdisplayname = "Christoffer Martinsson"
|
||||||
|
lastmodifieremail = "cm@cmtec.se"
|
||||||
|
+++
|
||||||
@ -6,49 +6,49 @@ import os
|
|||||||
apps = {"broadlink": "68", "zwave": "60", "huee": "62", "webapp": "59"}
|
apps = {"broadlink": "68", "zwave": "60", "huee": "62", "webapp": "59"}
|
||||||
headers = {"PRIVATE-TOKEN": sys.argv[1]}
|
headers = {"PRIVATE-TOKEN": sys.argv[1]}
|
||||||
|
|
||||||
|
def get_data(id_number):
|
||||||
|
commit = requests.get('https://git.cmtec.se/api/v4/projects/' + id_number + '/repository/commits/master', headers=headers)
|
||||||
|
date = commit.json()["committed_date"]
|
||||||
|
name = commit.json()["committer_name"]
|
||||||
|
email = commit.json()["committer_email"]
|
||||||
|
readme = requests.get('https://git.cmtec.se/api/v4/projects/' + id_number + '/repository/files/README.md/raw?ref=master', headers=headers).text
|
||||||
|
changelog = requests.get('https://git.cmtec.se/api/v4/projects/' + id_number + '/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text
|
||||||
|
|
||||||
|
return (date, name, email, readme, changelog)
|
||||||
|
|
||||||
|
def create_files(path, readme, changelog):
|
||||||
|
if not os.path.exists("content/" + path):
|
||||||
|
os.makedirs("content/" + path)
|
||||||
|
with open('content/'+path+'/_index.md', 'w') as file:
|
||||||
|
file.write(readme)
|
||||||
|
with open('content/'+path+'/changelog.md', 'w') as file:
|
||||||
|
file.write(changelog)
|
||||||
|
|
||||||
|
|
||||||
|
# LibHAASP
|
||||||
|
date,name,email,readme,changelog = get_data("64")
|
||||||
|
meta_readme = '+++\ntitle = "libHAASP"\nhead = "<label>Modules</label>"\nweight = 5\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
|
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
|
create_files("libhaasp", meta_readme + readme, meta_changelog + changelog)
|
||||||
|
|
||||||
# Core
|
# Core
|
||||||
date = requests.get('https://git.cmtec.se/api/v4/projects/58/repository/commits/master', headers=headers).json()["committed_date"]
|
date,name,email,readme,changelog = get_data("58")
|
||||||
readme = requests.get('https://git.cmtec.se/api/v4/projects/58/repository/files/README.md/raw?ref=master', headers=headers).text
|
meta_readme = '+++\ntitle = "Core"\nweight = 6\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
changelog = requests.get('https://git.cmtec.se/api/v4/projects/58/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text
|
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
|
create_files("core", meta_readme + readme, meta_changelog + changelog)
|
||||||
meta_readme = '+++\ntitle = "Core"\nhead = "<label>Modules</label>"\nweight = 5\ndate = "' + date + '"\n+++\n'
|
|
||||||
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\n+++\n'
|
|
||||||
|
|
||||||
if not os.path.exists("content/core"):
|
|
||||||
os.makedirs("content/core")
|
|
||||||
with open('content/core/_index.md', 'w') as file:
|
|
||||||
file.write(meta_readme + readme)
|
|
||||||
with open('content/core/changelog.md', 'w') as file:
|
|
||||||
file.write(meta_changelog + changelog)
|
|
||||||
|
|
||||||
# CLI
|
# CLI
|
||||||
date = requests.get('https://git.cmtec.se/api/v4/projects/69/repository/commits/master', headers=headers).json()["committed_date"]
|
date,name,email,readme,changelog = get_data("69")
|
||||||
readme = requests.get('https://git.cmtec.se/api/v4/projects/69/repository/files/README.md/raw?ref=master', headers=headers).text
|
meta_readme = '+++\ntitle = "CLI"\nweight = 7\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
changelog = requests.get('https://git.cmtec.se/api/v4/projects/69/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text
|
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
|
create_files("cli", meta_readme + readme, meta_changelog + changelog)
|
||||||
meta_readme = '+++\ntitle = "CLI"\nweight = 7\ndate = "' + date + '"\n+++\n'
|
|
||||||
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\n+++\n'
|
|
||||||
|
|
||||||
if not os.path.exists("content/cli"):
|
|
||||||
os.makedirs("content/cli")
|
|
||||||
with open('content/cli/_index.md', 'w') as file:
|
|
||||||
file.write(meta_readme + readme)
|
|
||||||
with open('content/cli/changelog.md', 'w') as file:
|
|
||||||
file.write(meta_changelog + changelog)
|
|
||||||
|
|
||||||
# Applications
|
# Applications
|
||||||
for app in apps.keys():
|
weight = 10
|
||||||
date = requests.get('https://git.cmtec.se/api/v4/projects/' + apps[app] + '/repository/commits/master', headers=headers).json()["committed_date"]
|
for app in sorted(apps.keys()):
|
||||||
readme = requests.get('https://git.cmtec.se/api/v4/projects/' + apps[app] + '/repository/files/README.md/raw?ref=master', headers=headers).text
|
date,name,email,readme,changelog = get_data(apps[app])
|
||||||
changelog = requests.get('https://git.cmtec.se/api/v4/projects/' + apps[app] + '/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text
|
meta_readme = '+++\nweight = "' + str(weight) + '"\ntitle = "' + app[0].upper() + app[1:] + '"\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
|
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\nlastmodifierdisplayname = "' + name + '"\nlastmodifieremail = "' + email + '"\n+++\n'
|
||||||
meta_readme = '+++\ntitle = "' + app[0].upper() + app[1:] + '"\ndate = "' + date + '"\n+++\n'
|
create_files("applications/" + app, meta_readme + readme, meta_changelog + changelog)
|
||||||
meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\n+++\n'
|
weight = weight + 1
|
||||||
|
|
||||||
if not os.path.exists("content/applications/" + app):
|
|
||||||
os.makedirs("content/applications/" + app)
|
|
||||||
with open('content/applications/' + app + '/_index.md', 'w') as file:
|
|
||||||
file.write(meta_readme + readme)
|
|
||||||
with open('content/applications/' + app + '/changelog.md', 'w') as file:
|
|
||||||
file.write(meta_changelog + changelog)
|
|
||||||
|
|
||||||
|
|||||||
@ -36,21 +36,10 @@ article > aside .menu .dd-item div i.category-icon:hover {
|
|||||||
article {
|
article {
|
||||||
background-color: #262626;
|
background-color: #262626;
|
||||||
color: #c6c6c6;
|
color: #c6c6c6;
|
||||||
width: 1300px;
|
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1300px) {
|
|
||||||
article {
|
|
||||||
background-color: #262626;
|
|
||||||
color: #c6c6c6;
|
|
||||||
width: 100%;
|
|
||||||
margin-left: none;
|
|
||||||
margin-right: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.searchbox input {
|
.searchbox input {
|
||||||
background: #303030;
|
background: #303030;
|
||||||
color: #c6c6c6;
|
color: #c6c6c6;
|
||||||
@ -78,6 +67,7 @@ article section.page {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
overflow-y: initial;
|
overflow-y: initial;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
width: 1000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
section strong {
|
section strong {
|
||||||
@ -132,6 +122,7 @@ code {
|
|||||||
article section.page pre {
|
article section.page pre {
|
||||||
background: #303030;
|
background: #303030;
|
||||||
color: #c6c6c6;
|
color: #c6c6c6;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-select {
|
.nav-select {
|
||||||
@ -175,3 +166,24 @@ article section.page table td {
|
|||||||
background: #262626;
|
background: #262626;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1300px) {
|
||||||
|
article {
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
article section.page {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
article section.page pre {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
article {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
article section.page {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user