diff --git a/pom.xml b/pom.xml index 174b3a7..e88f7ac 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.bwssystems.HABridge ha-bridge - 1.3.7a + 1.3.7b jar HA Bridge diff --git a/src/main/java/com/bwssystems/HABridge/BridgeSettings.java b/src/main/java/com/bwssystems/HABridge/BridgeSettings.java index c9c10e7..eeb0846 100644 --- a/src/main/java/com/bwssystems/HABridge/BridgeSettings.java +++ b/src/main/java/com/bwssystems/HABridge/BridgeSettings.java @@ -11,7 +11,7 @@ public class BridgeSettings { private IpList harmonyaddress; private String harmonyuser; private String harmonypwd; - private Integer upnpresponsedevices; + private Integer buttonsleep; private boolean upnpstrict; private boolean traceupnp; private boolean devmode; @@ -67,12 +67,6 @@ public class BridgeSettings { public void setHarmonyPwd(String harmonypwd) { this.harmonypwd = harmonypwd; } - public Integer getUpnpResponseDevices() { - return upnpresponsedevices; - } - public void setUpnpResponseDevices(Integer upnpresponsedevices) { - this.upnpresponsedevices = upnpresponsedevices; - } public boolean isUpnpStrict() { return upnpstrict; } @@ -109,6 +103,12 @@ public class BridgeSettings { public void setNestConfigured(boolean isNestConfigured) { this.nestconfigured = isNestConfigured; } + public Integer getButtonsleep() { + return buttonsleep; + } + public void setButtonsleep(Integer buttonsleep) { + this.buttonsleep = buttonsleep; + } public Boolean isValidVera() { List devicesList = this.veraaddress.getDevices(); if(devicesList.get(0).getIp().contains(Configuration.DEFAULT_ADDRESS)) diff --git a/src/main/java/com/bwssystems/HABridge/Configuration.java b/src/main/java/com/bwssystems/HABridge/Configuration.java index 504a9f6..26b3bac 100644 --- a/src/main/java/com/bwssystems/HABridge/Configuration.java +++ b/src/main/java/com/bwssystems/HABridge/Configuration.java @@ -11,4 +11,5 @@ public class Configuration { public final static String DEFAULT_USER = ""; public final static String DEFAULT_PWD = ""; public final static String DFAULT_WEB_PORT = "8080"; + public final static String DFAULT_BUTTON_SLEEP = "100"; } diff --git a/src/main/java/com/bwssystems/HABridge/HABridge.java b/src/main/java/com/bwssystems/HABridge/HABridge.java index bdf1eda..d1c9b50 100644 --- a/src/main/java/com/bwssystems/HABridge/HABridge.java +++ b/src/main/java/com/bwssystems/HABridge/HABridge.java @@ -120,7 +120,7 @@ public class HABridge { bridgeSettings.setUpnpStrict(Boolean.parseBoolean(System.getProperty("upnp.strict", "true"))); bridgeSettings.setTraceupnp(Boolean.parseBoolean(System.getProperty("trace.upnp", "false"))); bridgeSettings.setDevMode(Boolean.parseBoolean(System.getProperty("dev.mode", "false"))); - bridgeSettings.setUpnpResponseDevices(Integer.parseInt(System.getProperty("upnp.response.devices", Configuration.UPNP_RESPONSE_DEVICES))); + bridgeSettings.setButtonsleep(Integer.parseInt(System.getProperty("button.sleep", Configuration.DFAULT_BUTTON_SLEEP))); bridgeSettings.setNestuser(System.getProperty("nest.user", Configuration.DEFAULT_USER)); bridgeSettings.setNestpwd(System.getProperty("nest.pwd", Configuration.DEFAULT_PWD)); diff --git a/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java b/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java index 069c3e6..a68dde6 100644 --- a/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java +++ b/src/main/java/com/bwssystems/HABridge/hue/HueMulator.java @@ -348,7 +348,7 @@ public class HueMulator { else { for(int i = 0; i < deviceButtons.length; i++) { if( i > 0) - Thread.sleep(100); + Thread.sleep(bridgeSettings.getButtonsleep()); log.debug("pressing button: " + deviceButtons[i].getDevice() + " - " + deviceButtons[i].getButton() + " - iteration: " + String.valueOf(i)); myHarmony.pressButton(deviceButtons[i]); } diff --git a/src/main/java/com/bwssystems/HABridge/upnp/UpnpSettingsResource.java b/src/main/java/com/bwssystems/HABridge/upnp/UpnpSettingsResource.java index 944e085..dbcfb41 100644 --- a/src/main/java/com/bwssystems/HABridge/upnp/UpnpSettingsResource.java +++ b/src/main/java/com/bwssystems/HABridge/upnp/UpnpSettingsResource.java @@ -49,7 +49,7 @@ public class UpnpSettingsResource { this.theSettings.setTraceupnp(theBridgeSettings.isTraceupnp()); this.theSettings.setUpnpConfigAddress(theBridgeSettings.getUpnpConfigAddress()); this.theSettings.setUpnpDeviceDb(theBridgeSettings.getUpnpDeviceDb()); - this.theSettings.setUpnpResponseDevices(theBridgeSettings.getUpnpResponseDevices()); + this.theSettings.setButtonsleep(theBridgeSettings.getButtonsleep()); this.theSettings.setUpnpResponsePort(theBridgeSettings.getUpnpResponsePort()); this.theSettings.setUpnpStrict(theBridgeSettings.isUpnpStrict()); this.theSettings.setVeraAddress(theBridgeSettings.getVeraAddress()); diff --git a/src/main/resources/public/css/ngToast.min.css b/src/main/resources/public/css/ngToast.min.css new file mode 100644 index 0000000..e0ec2ba --- /dev/null +++ b/src/main/resources/public/css/ngToast.min.css @@ -0,0 +1,7 @@ +/*! + * ngToast v1.5.6 (http://tameraydin.github.io/ngToast) + * Copyright 2015 Tamer Aydin (http://tamerayd.in) + * Licensed under MIT (http://tameraydin.mit-license.org/) + */ + +.ng-toast{position:fixed;z-index:1080;width:100%;height:0;margin-top:20px;text-align:center}.ng-toast.ng-toast--top,.ng-toast.ng-toast--top .ng-toast__list{top:0;bottom:auto}.ng-toast.ng-toast--top.ng-toast--center .ng-toast__list{position:static}.ng-toast.ng-toast--bottom,.ng-toast.ng-toast--bottom .ng-toast__list{top:auto;bottom:0}.ng-toast.ng-toast--bottom.ng-toast--center .ng-toast__list{pointer-events:none}.ng-toast.ng-toast--bottom.ng-toast--center .ng-toast__message .alert{pointer-events:auto}.ng-toast.ng-toast--right .ng-toast__list{left:auto;right:0;margin-right:20px}.ng-toast.ng-toast--right .ng-toast__message{text-align:right}.ng-toast.ng-toast--left .ng-toast__list{right:auto;left:0;margin-left:20px}.ng-toast.ng-toast--left .ng-toast__message{text-align:left}.ng-toast .ng-toast__list{display:inline-block;position:absolute;right:0;left:0;margin:0 auto;padding:0;list-style:none}.ng-toast .ng-toast__message{display:block;width:100%;text-align:center}.ng-toast .ng-toast__message .alert{display:inline-block}.ng-toast .ng-toast__message__count{display:inline-block;margin:0 15px 0 5px} \ No newline at end of file diff --git a/src/main/resources/public/index.html b/src/main/resources/public/index.html index fe08eda..c624a84 100644 --- a/src/main/resources/public/index.html +++ b/src/main/resources/public/index.html @@ -7,6 +7,7 @@ HA Bridge + +