From 211e2ce25ecf2e72a22587c8bf8cc298ae4c9b7c Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 20:25:27 +0100 Subject: [PATCH 1/8] added switch pushOn and pushOff --- templates/switches.html | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/templates/switches.html b/templates/switches.html index 8bed10c..5254a90 100644 --- a/templates/switches.html +++ b/templates/switches.html @@ -1,4 +1,5 @@ +
@@ -20,7 +21,15 @@ {% if "switch" in v[1] %} {% elif "dimmer" in v[1] %} -   + + {% elif "pushOn" in v[1] %} +
+ +
+ {% elif "pushOff" in v[1] %} +
+ +
{% elif "setpoint" in v[1] %}

@@ -81,6 +90,7 @@ $(document).ready(function() { var updateSetpoints_block_{{count}}=[]; {% for k, v in blockArray[count]["switches"].iteritems() %} + {% if v[2] %} $('#s_title_{{ count }}').html("{{ v[2] }}"); {% endif %} @@ -89,7 +99,11 @@ $(document).ready(function() { changeSwitch(this, {{v[0]}}); }); updateSwitches_block_{{count}}.push("{{v[0]}}"); - {% elif (v[1] == "setpoint") %} + {% elif (v[1] == "pushOn") or (v[1] == "pushOff") %} + $('button[id="push_{{v[0]}}_block_{{count}}"]').click(function() { + changeSwitch(this, {{v[0]}}); + }); + {% elif (v[1] == "setpoint") %} updateSetpoints_block_{{count}}.push("{{v[0]}}"); {% elif (v[1] == "dimmer" or v[1] == "rgb") %} updateDimmers_block_{{count}}.push("{{v[0]}}"); From f054d39aa39fa538b74ce8a05c27a2349fd798ab Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 20:25:58 +0100 Subject: [PATCH 2/8] css file with the push button style in it --- static/css/buttons.css | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 static/css/buttons.css diff --git a/static/css/buttons.css b/static/css/buttons.css new file mode 100644 index 0000000..d6b5b90 --- /dev/null +++ b/static/css/buttons.css @@ -0,0 +1,40 @@ +.btn-circle, .btn-circle-3d{ + border-radius: 50% !important; + padding: 5px; +} + +.btn-primary.btn-circle{ + -webkit-box-shadow: 0px 0px 3px 1px #245580; + -moz-box-shadow: 0px 0px 3px 1px #245580; + box-shadow: 0px 0px 3px 1px #245580; +} + +.btn-info.btn-circle{ + -webkit-box-shadow: 0px 0px 3px 1px #28a4c9; + -moz-box-shadow: 0px 0px 3px 1px #28a4c9; + box-shadow: 0px 0px 3px 1px #28a4c9; +} + +.btn-success.btn-circle{ + -webkit-box-shadow: 0px 0px 3px 1px #3e8f3e; + -moz-box-shadow: 0px 0px 3px 1px #3e8f3e; + box-shadow: 0px 0px 3px 1px #3e8f3e; +} + +.btn-danger.btn-circle{ + -webkit-box-shadow: 0px 0px 3px 1px #b92c28; + -moz-box-shadow: 0px 0px 3px 1px #b92c28; + box-shadow: 0px 0px 3px 1px #b92c28; +} + +.btn-warning.btn-circle{ + -webkit-box-shadow: 0px 0px 3px 1px #e38d13; + -moz-box-shadow: 0px 0px 3px 1px #e38d13; + box-shadow: 0px 0px 3px 1px #e38d13; +} + +.btn-default.btn-circle{ + -webkit-box-shadow: 0px 0px 3px 1px #ccc; + -moz-box-shadow: 0px 0px 3px 1px #ccc; + box-shadow: 0px 0px 3px 1px #ccc; +} From aa75b3f40b0c37738867108b9d2251316a8976e9 Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 20:27:53 +0100 Subject: [PATCH 3/8] added example for pushOn and pushOff --- example.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example.conf b/example.conf index 63e6890..76da10b 100644 --- a/example.conf +++ b/example.conf @@ -49,6 +49,8 @@ Stekkerblok = 121, switch Slaapkamer dimmer = 123, dimmer Slaapkamer lightstrip = 12, rgb + Open Garage door = 456, pushOn + Close Garage door = 567, pushOff [[power_usage]] Totaal slaapkamer lamp = 12 Totaal playstation = 71 From 240b8da24afd0a67224265f6dede8a736f0235ab Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 20:39:19 +0100 Subject: [PATCH 4/8] changed some style formats --- templates/switches.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/switches.html b/templates/switches.html index 5254a90..7efa159 100644 --- a/templates/switches.html +++ b/templates/switches.html @@ -22,11 +22,11 @@ {% elif "dimmer" in v[1] %} - {% elif "pushOn" in v[1] %} + {% elif "pushon" in v[1] %}
- {% elif "pushOff" in v[1] %} + {% elif "pushoff" in v[1] %}
@@ -99,7 +99,7 @@ $(document).ready(function() { changeSwitch(this, {{v[0]}}); }); updateSwitches_block_{{count}}.push("{{v[0]}}"); - {% elif (v[1] == "pushOn") or (v[1] == "pushOff") %} + {% elif (v[1] == "pushon") or (v[1] == "pushoff") %} $('button[id="push_{{v[0]}}_block_{{count}}"]').click(function() { changeSwitch(this, {{v[0]}}); }); From d0b64f0ab69e603b069c088da1856994a9c761f2 Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 20:39:44 +0100 Subject: [PATCH 5/8] added pushon and off feature and buienradar to examples --- example.conf | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/example.conf b/example.conf index 76da10b..059ae13 100644 --- a/example.conf +++ b/example.conf @@ -20,6 +20,7 @@ Badkamer = badkamer Auto = auto Tuin = tuin + Security = security Verkeer = verkeer Flitsers = flitsers Statistics = statistics @@ -49,8 +50,8 @@ Stekkerblok = 121, switch Slaapkamer dimmer = 123, dimmer Slaapkamer lightstrip = 12, rgb - Open Garage door = 456, pushOn - Close Garage door = 567, pushOff + Open Garage door = 456, pushon + Close Garage door = 567, pushoff [[power_usage]] Totaal slaapkamer lamp = 12 Totaal playstation = 71 @@ -109,6 +110,28 @@ Chromecast = 73 PS4 = 75 +[tuin] +[[display_components]] +components = buienradar, weather, camera[Garden] +[[buienradar]] +[[weather]] + Location = "Eindhoven, NB" +[[camera]] + [[[Garden]]] + url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx + +[security] +[[display_components]] +components = top_tiles, camera[Frontdoor], camera[Backdoor] +[[top_tiles]] + Memory = 12, percent + HDD = 34, percent +[[camera]] + [[[Frontdoor]]] + url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx + [[[Backdoor]]] + url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx + [server] [[display_components]] components = top_tiles, serverlog From e56d99f1f3d884d46a7ecceda4597c7b76589e91 Mon Sep 17 00:00:00 2001 From: squandor Date: Mon, 2 Jan 2017 20:40:02 +0100 Subject: [PATCH 6/8] added pushon and pushof to list of switches --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12779e6..ceaf7ca 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ Just one config is used to configure Domoboard. A example can be found the appli - dimmer - rgb - setpoint + - pushon + - pushoff - camera - weather - news @@ -99,10 +101,10 @@ Above screenshots shows the settings page. # Contributing -Everybody can contribute to the project! For development purposes the "develop" branch is used. The "master" branch contains the stable version of Domoboard. +Everybody can contribute to the project! For development purposes the "develop" branch is used. The "master" branch contains the stable version of Domoboard. -Please let us know when you've created a plugin, so we can can add to the plugin Github repository. +Please let us know when you've created a plugin, so we can can add to the plugin Github repository. # Special thanks -Special thanks to https://github.com/squandor for developing and testing on Domoboard before it was made public. +Special thanks to https://github.com/squandor for developing and testing on Domoboard before it was made public. From c68a7b161078e26d28d99d7707ee4e82bbf34d23 Mon Sep 17 00:00:00 2001 From: wez3 Date: Mon, 2 Jan 2017 20:58:32 +0100 Subject: [PATCH 7/8] Remove alignment div --- templates/switches.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/templates/switches.html b/templates/switches.html index 7efa159..a4ebeae 100644 --- a/templates/switches.html +++ b/templates/switches.html @@ -23,13 +23,9 @@ {% elif "dimmer" in v[1] %} {% elif "pushon" in v[1] %} -
-
{% elif "pushoff" in v[1] %} -
-
{% elif "setpoint" in v[1] %}

From 9f391f1a3ac0937de847b4318e2cff0e8488e150 Mon Sep 17 00:00:00 2001 From: wez3 Date: Mon, 2 Jan 2017 21:06:36 +0100 Subject: [PATCH 8/8] Add alignment --- example.conf | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/example.conf b/example.conf index 059ae13..5835dd7 100644 --- a/example.conf +++ b/example.conf @@ -111,26 +111,26 @@ PS4 = 75 [tuin] -[[display_components]] -components = buienradar, weather, camera[Garden] -[[buienradar]] -[[weather]] - Location = "Eindhoven, NB" -[[camera]] - [[[Garden]]] - url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx + [[display_components]] + components = buienradar, weather, camera[Garden] + [[buienradar]] + [[weather]] + Location = "Eindhoven, NB" + [[camera]] + [[[Garden]]] + url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx [security] -[[display_components]] -components = top_tiles, camera[Frontdoor], camera[Backdoor] -[[top_tiles]] - Memory = 12, percent - HDD = 34, percent -[[camera]] - [[[Frontdoor]]] - url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx - [[[Backdoor]]] - url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx + [[display_components]] + components = top_tiles, camera[Frontdoor], camera[Backdoor] + [[top_tiles]] + Memory = 12, percent + HDD = 34, percent + [[camera]] + [[[Frontdoor]]] + url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx + [[[Backdoor]]] + url = http://x.x.x.x:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx [server] [[display_components]]