Merge pull request #31 from wez3/develop

Develop -> Master
This commit is contained in:
wez3 2017-01-02 21:07:39 +01:00 committed by GitHub
commit de2e8df7a6
4 changed files with 82 additions and 5 deletions

View File

@ -31,6 +31,8 @@ Just one config is used to configure Domoboard. A example can be found the appli
- dimmer - dimmer
- rgb - rgb
- setpoint - setpoint
- pushon
- pushoff
- camera - camera
- weather - weather
- news - news
@ -99,10 +101,10 @@ Above screenshots shows the settings page.
# Contributing # 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
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.

View File

@ -20,6 +20,7 @@
Badkamer = badkamer Badkamer = badkamer
Auto = auto Auto = auto
Tuin = tuin Tuin = tuin
Security = security
Verkeer = verkeer Verkeer = verkeer
Flitsers = flitsers Flitsers = flitsers
Statistics = statistics Statistics = statistics
@ -49,6 +50,8 @@
Stekkerblok = 121, switch Stekkerblok = 121, switch
Slaapkamer dimmer = 123, dimmer Slaapkamer dimmer = 123, dimmer
Slaapkamer lightstrip = 12, rgb Slaapkamer lightstrip = 12, rgb
Open Garage door = 456, pushon
Close Garage door = 567, pushoff
[[power_usage]] [[power_usage]]
Totaal slaapkamer lamp = 12 Totaal slaapkamer lamp = 12
Totaal playstation = 71 Totaal playstation = 71
@ -107,6 +110,28 @@
Chromecast = 73 Chromecast = 73
PS4 = 75 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] [server]
[[display_components]] [[display_components]]
components = top_tiles, serverlog components = top_tiles, serverlog

40
static/css/buttons.css Normal file
View File

@ -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;
}

View File

@ -1,4 +1,5 @@
<link href="/static/css/bootstrap-switch.css" rel="stylesheet" type="text/css" /> <link href="/static/css/bootstrap-switch.css" rel="stylesheet" type="text/css" />
<link href="/static/css/buttons.css" rel="stylesheet" type="text/css" />
<div class="col-md-6 col-sm-6 col-xs-12"> <div class="col-md-6 col-sm-6 col-xs-12">
<div class="x_panel"> <div class="x_panel">
<div class="x_title"> <div class="x_title">
@ -20,7 +21,11 @@
{% if "switch" in v[1] %} {% if "switch" in v[1] %}
<input id="switch_{{v[0]}}_block_{{count}}" type="checkbox" checked data-size="mini"> <input id="switch_{{v[0]}}_block_{{count}}" type="checkbox" checked data-size="mini">
{% elif "dimmer" in v[1] %} {% elif "dimmer" in v[1] %}
&nbsp;<input id="dimmer_{{v[0]}}_block_{{count}}" data-slider-id='dimmer_{{v[0]}}' type="text" test={{ v[1] }} data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="14" /> <input id="dimmer_{{v[0]}}_block_{{count}}" data-slider-id='dimmer_{{v[0]}}' type="text" test={{ v[1] }} data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="14" />
{% elif "pushon" in v[1] %}
<button id="push_{{v[0]}}_block_{{count}}" class="btn btn-primary btn-circle">On</button>
{% elif "pushoff" in v[1] %}
<button id="push_{{v[0]}}_block_{{count}}" class="btn btn-primary btn-circle">Off</button>
{% elif "setpoint" in v[1] %} {% elif "setpoint" in v[1] %}
<div> <div>
<div style="float: left; margin-right: 5px"><h1 id="setpoint_{{v[0]}}_block_{{count}}" style="font-size: 16px;"></h1></div> <div style="float: left; margin-right: 5px"><h1 id="setpoint_{{v[0]}}_block_{{count}}" style="font-size: 16px;"></h1></div>
@ -81,6 +86,7 @@ $(document).ready(function() {
var updateSetpoints_block_{{count}}=[]; var updateSetpoints_block_{{count}}=[];
{% for k, v in blockArray[count]["switches"].iteritems() %} {% for k, v in blockArray[count]["switches"].iteritems() %}
{% if v[2] %} {% if v[2] %}
$('#s_title_{{ count }}').html("{{ v[2] }}"); $('#s_title_{{ count }}').html("{{ v[2] }}");
{% endif %} {% endif %}
@ -89,7 +95,11 @@ $(document).ready(function() {
changeSwitch(this, {{v[0]}}); changeSwitch(this, {{v[0]}});
}); });
updateSwitches_block_{{count}}.push("{{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]}}"); updateSetpoints_block_{{count}}.push("{{v[0]}}");
{% elif (v[1] == "dimmer" or v[1] == "rgb") %} {% elif (v[1] == "dimmer" or v[1] == "rgb") %}
updateDimmers_block_{{count}}.push("{{v[0]}}"); updateDimmers_block_{{count}}.push("{{v[0]}}");