ifs = NetworkInterface.getNetworkInterfaces();
diff --git a/src/main/java/com/bwssystems/HABridge/BridgeSettingsDescriptor.java b/src/main/java/com/bwssystems/HABridge/BridgeSettingsDescriptor.java
index 5ab2cb7..baa4713 100644
--- a/src/main/java/com/bwssystems/HABridge/BridgeSettingsDescriptor.java
+++ b/src/main/java/com/bwssystems/HABridge/BridgeSettingsDescriptor.java
@@ -4,8 +4,8 @@ import java.util.List;
public class BridgeSettingsDescriptor {
private String upnpconfigaddress;
- private String serverport;
- private String upnpresponseport;
+ private Integer serverport;
+ private Integer upnpresponseport;
private String upnpdevicedb;
private IpList veraaddress;
private IpList harmonyaddress;
@@ -37,18 +37,24 @@ public class BridgeSettingsDescriptor {
public void setUpnpConfigAddress(String upnpConfigAddress) {
this.upnpconfigaddress = upnpConfigAddress;
}
- public String getServerPort() {
+ public Integer getServerPort() {
return serverport;
}
- public void setServerPort(String serverPort) {
+ public void setServerPort(Integer serverPort) {
this.serverport = serverPort;
}
- public String getUpnpResponsePort() {
+ public void setServerPort(String serverPort) {
+ this.serverport = Integer.valueOf(serverPort);
+ }
+ public Integer getUpnpResponsePort() {
return upnpresponseport;
}
- public void setUpnpResponsePort(String upnpResponsePort) {
+ public void setUpnpResponsePort(Integer upnpResponsePort) {
this.upnpresponseport = upnpResponsePort;
}
+ public void setUpnpResponsePort(String upnpResponsePort) {
+ this.upnpresponseport = Integer.valueOf(upnpResponsePort);
+ }
public String getUpnpDeviceDb() {
return upnpdevicedb;
}
diff --git a/src/main/java/com/bwssystems/HABridge/HABridge.java b/src/main/java/com/bwssystems/HABridge/HABridge.java
index c5cc047..a61f8b7 100644
--- a/src/main/java/com/bwssystems/HABridge/HABridge.java
+++ b/src/main/java/com/bwssystems/HABridge/HABridge.java
@@ -52,7 +52,7 @@ public class HABridge {
// sparkjava config directive to set ip address for the web server to listen on
// ipAddress("0.0.0.0"); // not used
// sparkjava config directive to set port for the web server to listen on
- port(Integer.valueOf(bridgeSettings.getBridgeSettingsDescriptor().getServerPort()));
+ port(bridgeSettings.getBridgeSettingsDescriptor().getServerPort());
// sparkjava config directive to set html static file location for Jetty
staticFileLocation("/public");
// setup system control api first
diff --git a/src/main/java/com/bwssystems/HABridge/upnp/UpnpListener.java b/src/main/java/com/bwssystems/HABridge/upnp/UpnpListener.java
index de15ae0..fb4a8a3 100644
--- a/src/main/java/com/bwssystems/HABridge/upnp/UpnpListener.java
+++ b/src/main/java/com/bwssystems/HABridge/upnp/UpnpListener.java
@@ -25,7 +25,7 @@ public class UpnpListener {
public UpnpListener(BridgeSettingsDescriptor theSettings, BridgeControlDescriptor theControl) {
super();
- upnpResponsePort = Integer.valueOf(theSettings.getUpnpResponsePort());
+ upnpResponsePort = theSettings.getUpnpResponsePort();
httpServerPort = Integer.valueOf(theSettings.getServerPort());
responseAddress = theSettings.getUpnpConfigAddress();
strict = theSettings.isUpnpStrict();
diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js
index 45b4d4f..8ed226f 100644
--- a/src/main/resources/public/scripts/app.js
+++ b/src/main/resources/public/scripts/app.js
@@ -517,6 +517,13 @@ app.controller('SystemController', function ($scope, $location, $http, $window,
$scope.imgUrl = "glyphicon glyphicon-plus";
$scope.visibleBk = false;
$scope.imgBkUrl = "glyphicon glyphicon-plus";
+ $scope.addVeratoSettings = function (newveraname, newveraip) {
+ if($scope.bridge.settings.veraddress == null) {
+ $scope.bridge.settings.veraddress = { devices: [] };
+ }
+
+ $scope.bridge.settings.veraaddress.devices.push("{" +"\"name\":\"" + newveraname +"\",\"ip\":\"" + newveraip + "\"}");
+ };
$scope.saveSettings = function() {
bridgeService.saveSettings();
};
diff --git a/src/main/resources/public/views/system.html b/src/main/resources/public/views/system.html
index b9f523e..6011227 100644
--- a/src/main/resources/public/views/system.html
+++ b/src/main/resources/public/views/system.html
@@ -52,88 +52,123 @@
- | config.file |
- {{bridge.settings.configfile}} |
+ Configuration Path and File |
+ |
- | upnp.devices.db |
- {{bridge.settings.upnpdevicedb}} |
+ Device DB Path and File |
+ |
- | upnp.config.address |
- {{bridge.settings.upnpconfigaddress}} |
+ UPNP IP Address |
+ |
- | server.port |
- {{bridge.settings.serverport}} |
+ Web Server Port |
+ |
- | upnp.response.port |
- {{bridge.settings.upnpresponseport}} |
+ UPNP Response Port |
+ |
- | vera.address |
+ Vera Names and IP Addresses |
|
- | harmony.address |
+ Harmony Names and IP Addresses |
|
- | harmony.user |
- {{bridge.settings.harmonyuser}} |
+ Harmony Username |
+ |
- | harmony.pwd |
- {{bridge.settings.harmonypwd}} |
+ Harmony Password |
+ |
- | button.sleep |
- {{bridge.settings.buttonsleep}} ms |
+ Button Press Sleep Interval (ms) |
+ |
- | nest.user |
- {{bridge.settings.nestuser}} |
+ Nest Username |
+ |
- | nest.pwd |
- {{bridge.settings.nestpwd}} |
+ Nest Password |
+ |
- | upnp.strict |
- {{bridge.settings.upnpstrict}} |
+ UPNP Strict Handling |
+ {{bridge.settings.upnpstrict}} |
- | trace.upnp |
- {{bridge.settings.traceupnp}} |
+ Trace UPNP Calls |
+ {{bridge.settings.traceupnp}} |
- | dev.mode |
- {{bridge.settings.devmode}} |
+ Harmony Development Mode |
+ {{bridge.settings.devmode}} |