-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
572 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 67 additions & 67 deletions
134
...ngs/OpenWeatherMapSettings.component.html → ...nWeatherMapServiceSettings.component.html
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,68 @@ | ||
<div class="panel panel-default"> | ||
<div class="panel-heading">Open Weather Map settings</div> | ||
<div class="panel-body"> | ||
|
||
<div class="alert alert-info" role="alert">In order to use the Open Weather Map powered weather station you must create a free account at <a href="https://home.openweathermap.org/users/sign_up">Open Weather Map</a> and fill the required fields.</div> | ||
<div class="alert alert-warning" role="alert">If there is already an HA4IoT installation in your LAN it is highly recommended to use the slave controller service | ||
to receive the actual values from the master controller. This will reduce the effective API calls to the Open | ||
Weather Map API which are limited for free accounts.</div> | ||
|
||
<form class="form-horizontal"> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Enabled</label> | ||
<div class="col-md-10"> | ||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.IsEnabled"><label></label> | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Latitude</label> | ||
<div class="col-md-10"> | ||
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Latitude"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Longitude</label> | ||
<div class="col-md-10"> | ||
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Longitude"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">App ID</label> | ||
<div class="col-md-10"> | ||
<input type="text" class="form-control" ng-model="owmsCtrl.Model.AppId"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Values</label> | ||
|
||
<div class="col-md-10"> | ||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseTemperature">Use temperature | ||
</label> | ||
|
||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseHumidity">Use humidity | ||
</label> | ||
|
||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseSunriseSunset">Use sunrise / sunset | ||
</label> | ||
|
||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseWeather">Use weather | ||
</label> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="panel-footer clearfix"> | ||
<button class="btn btn-default pull-right" ng-click="owmsCtrl.save()">Save</button> | ||
</div> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading">Open Weather Map settings</div> | ||
<div class="panel-body"> | ||
|
||
<div class="alert alert-info" role="alert">In order to use the Open Weather Map powered weather station you must create a free account at <a href="https://home.openweathermap.org/users/sign_up">Open Weather Map</a> and fill the required fields.</div> | ||
<div class="alert alert-warning" role="alert">If there is already an HA4IoT installation in your LAN it is highly recommended to use the slave controller service | ||
to receive the actual values from the master controller. This will reduce the effective API calls to the Open | ||
Weather Map API which are limited for free accounts.</div> | ||
|
||
<form class="form-horizontal"> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Enabled</label> | ||
<div class="col-md-10"> | ||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.IsEnabled"><label></label> | ||
</label> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Latitude</label> | ||
<div class="col-md-10"> | ||
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Latitude"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Longitude</label> | ||
<div class="col-md-10"> | ||
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Longitude"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">App ID</label> | ||
<div class="col-md-10"> | ||
<input type="text" class="form-control" ng-model="owmsCtrl.Model.AppId"> | ||
</div> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label class="col-md-2 control-label">Values</label> | ||
|
||
<div class="col-md-10"> | ||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseTemperature">Use temperature | ||
</label> | ||
|
||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseHumidity">Use humidity | ||
</label> | ||
|
||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseSunriseSunset">Use sunrise / sunset | ||
</label> | ||
|
||
<label class="checkbox-inline"> | ||
<input type="checkbox" ng-model="owmsCtrl.Model.UseWeather">Use weather | ||
</label> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="panel-footer clearfix"> | ||
<button class="btn btn-default pull-right" ng-click="owmsCtrl.save()">Save</button> | ||
</div> | ||
</div> |
84 changes: 42 additions & 42 deletions
84
...tings/OpenWeatherMapSettings.component.js → ...penWeatherMapServiceSettings.component.js
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
(function () { | ||
var module = angular.module("app"); | ||
|
||
function createController(controllerProxyService, modalService) { | ||
|
||
var ctrl = this; | ||
|
||
ctrl.Model = { | ||
Latitude: "", | ||
Longitude: "", | ||
AppId: "", | ||
UseTemperature: true, | ||
UseHumidity: true, | ||
UseSunriseSunset: true, | ||
UseWeather: true, | ||
IsEnabled: true | ||
} | ||
|
||
ctrl.$onInit = function () { | ||
controllerProxyService.get("Service/ISettingsService/GetSettings", { "Uri": "OpenWeatherMapServiceSettings" }, function (response) { | ||
ctrl.Model = response; | ||
}); | ||
} | ||
|
||
ctrl.save = function () { | ||
var payload = { | ||
Uri: "OpenWeatherMapServiceSettings", | ||
Settings: ctrl.Model | ||
} | ||
|
||
controllerProxyService.execute("Service/ISettingsService/Replace", payload); | ||
|
||
modalService.show("Info", "Open Weahter Map settings successfully saved."); | ||
} | ||
} | ||
|
||
module.component("openWeatherMapSettings", { | ||
templateUrl: "Settings/OpenWeatherMapSettings.component.html", | ||
controllerAs: "owmsCtrl", | ||
controller: ["controllerProxyService", "modalService", createController] | ||
}); | ||
|
||
(function () { | ||
var module = angular.module("app"); | ||
|
||
function createController(controllerProxyService, modalService) { | ||
|
||
var ctrl = this; | ||
|
||
ctrl.Model = { | ||
Latitude: "", | ||
Longitude: "", | ||
AppId: "", | ||
UseTemperature: true, | ||
UseHumidity: true, | ||
UseSunriseSunset: true, | ||
UseWeather: true, | ||
IsEnabled: true | ||
} | ||
|
||
ctrl.$onInit = function () { | ||
controllerProxyService.get("Service/ISettingsService/GetSettings", { "Uri": "OpenWeatherMapServiceSettings" }, function (response) { | ||
ctrl.Model = response; | ||
}); | ||
} | ||
|
||
ctrl.save = function () { | ||
var payload = { | ||
Uri: "OpenWeatherMapServiceSettings", | ||
Settings: ctrl.Model | ||
} | ||
|
||
controllerProxyService.execute("Service/ISettingsService/Replace", payload); | ||
|
||
modalService.show("Info", "Open Weahter Map settings successfully saved."); | ||
} | ||
} | ||
|
||
module.component("openWeatherMapSettings", { | ||
templateUrl: "Settings/OpenWeatherMapSettings.component.html", | ||
controllerAs: "owmsCtrl", | ||
controller: ["controllerProxyService", "modalService", createController] | ||
}); | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
CACHE MANIFEST | ||
# Version 1.17.170 | ||
# Version 1.17.173 | ||
|
||
CACHE: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
192.168.1.15= | ||
192.168.1.16= |
Oops, something went wrong.