diff --git a/src/main/resources/public/scripts/app.js b/src/main/resources/public/scripts/app.js index 79356f2..23cc8b2 100644 --- a/src/main/resources/public/scripts/app.js +++ b/src/main/resources/public/scripts/app.js @@ -3667,7 +3667,7 @@ app.controller('HassController', function ($scope, $location, bridgeService, ngD dimpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"on\"}"; offpayload = "{\"entityId\":\"" + hassdevice.deviceState.entity_id + "\",\"hassName\":\"" + hassdevice.hassname + "\",\"state\":\"off\"}"; - bridgeService.buildUrls(onpayload, dimpayload, offpayload, null, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, null, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, "switch", "hassDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); @@ -3797,7 +3797,7 @@ app.controller('HomeWizardController', function ($scope, $location, bridgeServic onpayload = "{\"deviceid\":\"" + homewizarddevice.id + "\",\"action\":\"on\"}"; offpayload = "{\"deviceid\":\"" + homewizarddevice.id + "\",\"action\":\"off\"}"; - bridgeService.buildUrls(onpayload, dimpayload, offpayload, null, true, homewizarddevice.id, homewizarddevice.name, homewizarddevice.gateway, null, "homewizardDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, null, true, homewizarddevice.id, homewizarddevice.name, homewizarddevice.gateway, "switch", "homewizardDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { @@ -4091,7 +4091,7 @@ app.controller('LifxController', function ($scope, $location, bridgeService, ngD dimpayload = angular.toJson(lifxdevice); onpayload = angular.toJson(lifxdevice); offpayload = angular.toJson(lifxdevice); - bridgeService.buildUrls(onpayload, dimpayload, offpayload, null, true, lifxdevice.name, lifxdevice.name, lifxdevice.name, null, "lifxDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, null, true, lifxdevice.name, lifxdevice.name, lifxdevice.name, "switch", "lifxDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); @@ -4392,7 +4392,7 @@ app.controller('OpenHABController', function ($scope, $location, bridgeService, else colorpayload = null; } - bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, openhabdevice.item.name + "-" + openhabdevice.name, openhabdevice.item.name, openhabdevice.name, openhabdevice.item.type, "openhabDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, openhabdevice.item.name + "-" + openhabdevice.name, openhabdevice.item.name, openhabdevice.name, "switch", "openhabDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); @@ -4534,7 +4534,7 @@ app.controller('MozIotController', function ($scope, $location, bridgeService, n else if (coloraction !== undefined && coloraction !== null && coloraction !== '') colorpayload = "{\"url\":\"" + preCmd + "color\",\"command\":{\"color\":\"" + coloraction + "\"}}"; - bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, moziotdevice.deviceDetail.name + "-" + moziotdevice.deviceDetail.type, moziotdevice.deviceDetail.name, moziotdevice.gatewayName, "Switch", "moziotDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, moziotdevice.deviceDetail.title + "-" + moziotdevice.deviceDetail.type, moziotdevice.deviceDetail.title, moziotdevice.gatewayName, "switch", "moziotDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); @@ -4678,7 +4678,7 @@ app.controller('FhemController', function ($scope, $location, bridgeService, ngD colorpayload = null; onpayload = "{\"url\":\"http://" + fhemdevice.address + preCmd + "\",\"command\":\"on\"}"; offpayload = "{\"url\":\"http://" + fhemdevice.address + preCmd + "\",\"command\":\"off\"}"; - bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, fhemdevice.item.Name + "-" + fhemdevice.name, fhemdevice.item.Name, fhemdevice.name, fhemdevice.item.type, "fhemDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, fhemdevice.item.Name + "-" + fhemdevice.name, fhemdevice.item.Name, fhemdevice.name, "switch", "fhemDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); @@ -4837,7 +4837,7 @@ app.controller('BroadlinkController', function ($scope, $location, bridgeService else colorpayload = null; } - bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, broadlinkdevice.id, broadlinkdevice.name, broadlinkdevice.id, broadlinkdevice.desc, "broadlinkDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, broadlinkdevice.id, broadlinkdevice.name, broadlinkdevice.id, "switch", "broadlinkDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); @@ -4977,7 +4977,7 @@ app.controller('HomeGenieController', function ($scope, $location, bridgeService // else if (coloraction !== undefined && coloraction !== null && coloraction !== '') // colorpayload = "{\"url\":\"" + preCmd + "color\",\"command\":{\"color\":\"" + coloraction + "\"}}"; - bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, homegeniedevice.deviceDetail.Name + "-" + homegeniedevice.deviceDetail.DeviceType, homegeniedevice.deviceDetail.Name, homegeniedevice.gatewayName, homegeniedevice.deviceDetail.DeviceType, "homegenieDevice", null, null); + bridgeService.buildUrls(onpayload, dimpayload, offpayload, colorpayload, true, homegeniedevice.deviceDetail.Name + "-" + homegeniedevice.deviceDetail.DeviceType, homegeniedevice.deviceDetail.Name, homegeniedevice.gatewayName, "switch", "homegenieDevice", null, null); $scope.device = bridgeService.state.device; if (!buildonly) { bridgeService.editNewDevice($scope.device); diff --git a/src/main/resources/public/views/configuration.html b/src/main/resources/public/views/configuration.html index f346799..f5662c8 100644 --- a/src/main/resources/public/views/configuration.html +++ b/src/main/resources/public/views/configuration.html @@ -57,6 +57,7 @@ + diff --git a/src/main/resources/public/views/editdevice.html b/src/main/resources/public/views/editdevice.html index 0edc9ae..96a0de0 100644 --- a/src/main/resources/public/views/editdevice.html +++ b/src/main/resources/public/views/editdevice.html @@ -144,7 +144,8 @@ - + + diff --git a/src/main/resources/public/views/homegeniedevice.html b/src/main/resources/public/views/homegeniedevice.html index 8a73fa4..e80da41 100644 --- a/src/main/resources/public/views/homegeniedevice.html +++ b/src/main/resources/public/views/homegeniedevice.html @@ -19,7 +19,7 @@
  • HomeWizard Devices
  • OpenHAB Devices
  • FHEM Devices
  • -
  • HomeGenie Devices
  • +
  • Mozilla IOT Devices
  • Broadlink Devices
  • diff --git a/src/main/resources/public/views/moziotdevice.html b/src/main/resources/public/views/moziotdevice.html index b966547..d1a1b73 100644 --- a/src/main/resources/public/views/moziotdevice.html +++ b/src/main/resources/public/views/moziotdevice.html @@ -19,8 +19,9 @@
  • HomeWizard Devices
  • OpenHAB Devices
  • FHEM Devices
  • -
  • HomeGenie Devices
  • Broadlink Devices
  • +
  • HomeGenie Devices
  • Broadlink Devices
  • Add/Edit