diff --git a/content/applications/broadlink.md b/content/applications/broadlink.md deleted file mode 100644 index 0d3995f..0000000 --- a/content/applications/broadlink.md +++ /dev/null @@ -1,8 +0,0 @@ -+++ -title = "Broadlink" -date = "2018-10-26" -+++ - -# Broadlink - - diff --git a/content/applications/broadlink/_index.md b/content/applications/broadlink/_index.md new file mode 100644 index 0000000..cb7d255 --- /dev/null +++ b/content/applications/broadlink/_index.md @@ -0,0 +1,49 @@ ++++ +title = "Broadlink" +date = "2018-08-06T13:43:48.000Z" ++++ +The broadlink app will output all found devices on start, you can use this to setup your config file as shown bellow + +Config Setup example + +``` +class Config(ConfigObject): + + def setup(self): + # Broadlink devices -------------------------------------------------------- + self.broadlink_livingroom = EventObject("broadlink", "064cdf434ead4")` + + # WebApp ------------------------------------------------------------------- + self.webapp_livingroom_tv_on = EventObject("webapp", "livingroom.tv.on", "true") + + def process_event(self): + if self.webapp_livingroom_tv_on.event == "true": + self.broadlink_livingroom.set("26008403120a110b0e0f0d0f0d100d2c110b0d100d0f0d0f0d100d0f0e0f0d0f0d0f0e2b1309" + "0e0f0d100d0f0e0e0e0f0d0f110c0d2b0e0f0d2c0f290e2b0e2b120a120b11280d0f0d2c0e2b" + "0e2b0e2a0e0f11280e00097876350f0d0e2b120a0d100d0f0d100d0f120a0d100d0f0d100e0" + "e0e0f0d2b0e0f110b0d100d0f120a120b0d0f0d100e0e0d2c0e0e0e0f0d0f0d100e0e0e0e13" + "090e0f0d2c0e0f0d2b132613260f2a0e0e120a0f2a0e0f0d2c112713260e2b120a0e2b130009") +``` + +To lear a ir code send "learning" event to a broadlink device, aim you remote towards the broadlink device and +push the button you which to learn. + +You will then get an event back from the broadlink app with the code, cut and past that into your config file +as showed above + +Learning event example + +``` +class Config(ConfigObject): + + def setup(self): + # Broadlink devices -------------------------------------------------------- + self.broadlink_livingroom = EventObject("broadlink", "064cdf434ead4")` + + # WebApp ------------------------------------------------------------------- + self.webapp_livingroom_learn = EventObject("webapp", "livingroom.broadling.learn", "true") + + def process_event(self): + if self.webapp_livingroom_learn.event == "true": + self.broadlink_livingroom.set("learning") +``` \ No newline at end of file diff --git a/content/applications/broadlink/changelog.md b/content/applications/broadlink/changelog.md new file mode 100644 index 0000000..d5e8175 --- /dev/null +++ b/content/applications/broadlink/changelog.md @@ -0,0 +1,9 @@ ++++ +title = "Changelog" +date = "2018-08-06T13:43:48.000Z" ++++ +### v1.0 +Basic function like send ir/rf codes and learning ir/rf codes works now + +### v0.5 +Sending ir/rf codes works now \ No newline at end of file diff --git a/content/applications/huee.md b/content/applications/huee.md deleted file mode 100644 index e5664cc..0000000 --- a/content/applications/huee.md +++ /dev/null @@ -1,9 +0,0 @@ -+++ -title = "Huee" -date = "2018-10-26" -Weight=2 -+++ - -# Huee - - diff --git a/content/applications/huee/_index.md b/content/applications/huee/_index.md new file mode 100644 index 0000000..9a07d34 --- /dev/null +++ b/content/applications/huee/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Huee" +date = "2018-08-06T13:14:07.000Z" ++++ diff --git a/content/applications/huee/changelog.md b/content/applications/huee/changelog.md new file mode 100644 index 0000000..edbb2ff --- /dev/null +++ b/content/applications/huee/changelog.md @@ -0,0 +1,4 @@ ++++ +title = "Changelog" +date = "2018-08-06T13:14:07.000Z" ++++ diff --git a/content/applications/webapp.md b/content/applications/webapp.md deleted file mode 100644 index 2440813..0000000 --- a/content/applications/webapp.md +++ /dev/null @@ -1,8 +0,0 @@ -+++ -title = "WebApp" -date = "2018-10-26" -+++ - -# Webapp - - diff --git a/content/applications/webapp/_index.md b/content/applications/webapp/_index.md new file mode 100644 index 0000000..34deac7 --- /dev/null +++ b/content/applications/webapp/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Webapp" +date = "2018-10-23T20:28:25.000Z" ++++ diff --git a/content/applications/webapp/changelog.md b/content/applications/webapp/changelog.md new file mode 100644 index 0000000..1c8f73a --- /dev/null +++ b/content/applications/webapp/changelog.md @@ -0,0 +1,9 @@ ++++ +title = "Changelog" +date = "2018-10-23T20:28:25.000Z" ++++ +### v0.10 +Updated web UI, we now group the buttons with color and som style update on buttons + +### v0.5 +Toggle and trigger buttons are auto generated and you can disable triggers by sending a false event \ No newline at end of file diff --git a/content/applications/zwave.md b/content/applications/zwave.md deleted file mode 100644 index 338cc5d..0000000 --- a/content/applications/zwave.md +++ /dev/null @@ -1,8 +0,0 @@ -+++ -title = "Zwave" -date = "2018-10-26" -+++ - -# Zwave - - diff --git a/content/applications/zwave/_index.md b/content/applications/zwave/_index.md new file mode 100644 index 0000000..315ac86 --- /dev/null +++ b/content/applications/zwave/_index.md @@ -0,0 +1,4 @@ ++++ +title = "Zwave" +date = "2018-08-06T12:01:09.000Z" ++++ diff --git a/content/applications/zwave/changelog.md b/content/applications/zwave/changelog.md new file mode 100644 index 0000000..e0628d4 --- /dev/null +++ b/content/applications/zwave/changelog.md @@ -0,0 +1,4 @@ ++++ +title = "Changelog" +date = "2018-08-06T12:01:09.000Z" ++++ diff --git a/content/cli/_index.md b/content/cli/_index.md index d4090ae..d925ecc 100644 --- a/content/cli/_index.md +++ b/content/cli/_index.md @@ -1,7 +1,5 @@ +++ title = "CLI" -date = "2018-10-28" -Weight=4 +weight = 7 +date = "2018-08-06T11:09:51.000Z" +++ - -TEST diff --git a/content/cli/changelog.md b/content/cli/changelog.md new file mode 100644 index 0000000..ebf4ec5 --- /dev/null +++ b/content/cli/changelog.md @@ -0,0 +1,4 @@ ++++ +title = "Changelog" +date = "2018-08-06T11:09:51.000Z" ++++ diff --git a/content/core/_index.md b/content/core/_index.md new file mode 100644 index 0000000..49842f6 --- /dev/null +++ b/content/core/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Core" +head = "" +weight = 5 +date = "2018-08-06T20:43:20.000Z" ++++ diff --git a/content/core/changelog.md b/content/core/changelog.md new file mode 100644 index 0000000..bcb4252 --- /dev/null +++ b/content/core/changelog.md @@ -0,0 +1,18 @@ ++++ +title = "Changelog" +date = "2018-08-06T20:43:20.000Z" ++++ +### v1.2 + +* Changed from plain text message to json message +* Fixed init request + +### v1.1 + +* Added init and refresh request support +* Readme file updated + +### v1.0 + +* First release + diff --git a/content/hardware/_index.md b/content/hardware/_index.md index f42f5f4..ef1fd34 100644 --- a/content/hardware/_index.md +++ b/content/hardware/_index.md @@ -1,7 +1,8 @@ +++ title = "Hardware" -weight=6 +weight = 8 alwaysopen = true +head = "" +++ TEST diff --git a/get_app_data.py b/get_app_data.py new file mode 100755 index 0000000..ffd6a26 --- /dev/null +++ b/get_app_data.py @@ -0,0 +1,54 @@ +#!/bin/python +import requests +import sys +import os + +apps = {"broadlink": "68", "zwave": "60", "huee": "62", "webapp": "59"} +headers = {"PRIVATE-TOKEN": sys.argv[1]} + +# Core +date = requests.get('https://git.cmtec.se/api/v4/projects/58/repository/commits/master', headers=headers).json()["committed_date"] +readme = requests.get('https://git.cmtec.se/api/v4/projects/58/repository/files/README.md/raw?ref=master', headers=headers).text +changelog = requests.get('https://git.cmtec.se/api/v4/projects/58/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text + +meta_readme = '+++\ntitle = "Core"\nhead = ""\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 +date = requests.get('https://git.cmtec.se/api/v4/projects/69/repository/commits/master', headers=headers).json()["committed_date"] +readme = requests.get('https://git.cmtec.se/api/v4/projects/69/repository/files/README.md/raw?ref=master', headers=headers).text +changelog = requests.get('https://git.cmtec.se/api/v4/projects/69/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text + +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 +for app in apps.keys(): + date = requests.get('https://git.cmtec.se/api/v4/projects/' + apps[app] + '/repository/commits/master', headers=headers).json()["committed_date"] + readme = requests.get('https://git.cmtec.se/api/v4/projects/' + apps[app] + '/repository/files/README.md/raw?ref=master', headers=headers).text + changelog = requests.get('https://git.cmtec.se/api/v4/projects/' + apps[app] + '/repository/files/CHANGELOG.md/raw?ref=master', headers=headers).text + + meta_readme = '+++\ntitle = "' + app[0].upper() + app[1:] + '"\ndate = "' + date + '"\n+++\n' + meta_changelog = '+++\ntitle = "Changelog"\ndate = "' + date + '"\n+++\n' + + 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) +