diff --git a/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHandler.java b/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHandler.java index 3cf189c..7a02339 100644 --- a/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHandler.java +++ b/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHandler.java @@ -94,7 +94,7 @@ public class HarmonyHandler { } public Boolean pressButton(ButtonPress aDeviceButton) { - log.debug("Harmony api press a button requested for device: " + aDeviceButton.getDevice() + " and a for button: " + aDeviceButton.getButton() + " for a hub: " + aDeviceButton.getHub() + " noop mode: " + noopCalls); + log.debug("Harmony api press a button requested for device: " + aDeviceButton.getDevice() + " and a for button: " + aDeviceButton.getButton() + " with pressTime of: " + aDeviceButton.getPressTime() + " for a hub: " + aDeviceButton.getHub() + " noop mode: " + noopCalls); if (aDeviceButton.isValid()) { try { if (noopCalls || devMode) { diff --git a/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHome.java b/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHome.java index 1b6eb1c..b18393c 100644 --- a/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHome.java +++ b/src/main/java/com/bwssystems/HABridge/plugins/harmony/HarmonyHome.java @@ -181,7 +181,7 @@ public class HarmonyHome implements Home { aMultiUtil.setTheDelay(anItem.getDelay()); else aMultiUtil.setTheDelay(aMultiUtil.getDelayDefault()); - log.debug("pressing button: " + deviceButtons[z].getDevice() + " - " + deviceButtons[z].getButton() + " - iteration: " + String.valueOf(z) + " - count: " + String.valueOf(y)); + log.debug("pressing button: " + deviceButtons[z].getDevice() + " - " + deviceButtons[z].getButton() + " with pressTime of: " + deviceButtons[z].getPressTime() + " - iteration: " + String.valueOf(z) + " - count: " + String.valueOf(y)); if(deviceButtons[z].getHub() == null || deviceButtons[z].getHub().isEmpty()) deviceButtons[z].setHub(device.getTargetDevice()); HarmonyHandler myHarmony = getHarmonyHandler(deviceButtons[z].getHub()); diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index f2443bf..58fa27f 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -1936,12 +1936,12 @@ app.controller('HarmonyController', function ($scope, $location, bridgeService, var postCmd = "\"}"; if(onpresstime !== undefined && onpresstime !== "0") postCmd = "\",\"pressTime\":" + onpresstime + "}"; - onpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOn.command + "\",\"hub\":\"" + harmonydevice.hub + "\"}"; + onpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOn.command + "\",\"hub\":\"" + harmonydevice.hub + postCmd; if(offpresstime !== undefined && offpresstime !== "0") postCmd = "\",\"pressTime\":" + offpresstime + "}"; else postCmd = "\"}"; - offpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\",\"hub\":\"" + harmonydevice.hub + "\"}"; + offpayload = "{\"device\":\"" + harmonydevice.device.id + "\",\"button\":\"" + actionOff.command + "\",\"hub\":\"" + harmonydevice.hub + postCmd; bridgeService.buildUrls(onpayload, null, offpayload, true, actionOn.command, harmonydevice.device.label, harmonydevice.hub, "button", "harmonyButton", null, null); $scope.device = bridgeService.state.device; @@ -3065,7 +3065,7 @@ app.controller('EditController', function ($scope, $location, bridgeService) { $scope.onDevices = null; $scope.dimDevices = null; $scope.offDevices = null; - if ($scope.devicec && $scope.device.name !== undefined) { + if ($scope.device !== undefined && $scope.device.name !== undefined) { if($scope.bridge.device.onUrl !== undefined) $scope.onDevices = bridgeService.getCallObjects($scope.bridge.device.onUrl); if($scope.bridge.device.dimUrl !== undefined)