Finished editor update

This commit is contained in:
Admin
2017-01-19 15:57:33 -06:00
parent 56ebe2d929
commit e5f088cfb9
11 changed files with 187 additions and 627 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.bwssystems.HABridge</groupId> <groupId>com.bwssystems.HABridge</groupId>
<artifactId>ha-bridge</artifactId> <artifactId>ha-bridge</artifactId>
<version>4beta3.5</version> <version>4beta3.6</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>HA Bridge</name> <name>HA Bridge</name>

View File

@@ -409,24 +409,30 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
); );
}; };
this.formatCallItem = function (currentItem) {
if(!currentItem.startsWith("{\"item") && !currentItem.startsWith("[{\"item")) {
if (currentItem.startsWith("[") || currentItem.startsWith("{"))
currentItem = "[{\"item\":" + currentItem + "}]";
else
currentItem = "[{\"item\":\"" + currentItem + "\"}]";
} else if(currentItem.startsWith("{\"item"))
currentItem = "[" + currentItem + "]";
return currentItem;
};
this.getCallObjects = function (deviceString) { this.getCallObjects = function (deviceString) {
if (!deviceString.startsWith("[")) { if (deviceString === undefined || deviceString === "")
if (deviceString.startsWith("{\"item")) return null;
deviceString = "[" + deviceString + "]"
else { deviceString = self.formatCallItem(deviceString);
if (deviceString.startsWith("{"))
deviceString = "[{\"item\":" + deviceString + "}]"
else
deviceString = "[{\"item\":\"" + deviceString + "\"}]"
}
} else if (!deviceString.startsWith("[{\"item\""))
deviceString = "[{\"item\":" + deviceString + "}]"
var newDevices = angular.fromJson(deviceString) var newDevices = angular.fromJson(deviceString)
var i, s, len = newDevices.length var i, s, len = newDevices.length
for (i=0; i<len; ++i) { for (i=0; i<len; ++i) {
if (i in newDevices) { if (i in newDevices) {
s = newDevices[i]; s = newDevices[i];
if (s.type !== null) if (s.type !== undefined && s.type !== null)
s.type = self.getMapType(s.type) s.type = self.getMapType(s.type)
if (angular.isObject(s.item)) if (angular.isObject(s.item))
s.item = angular.toJson(s.item) s.item = angular.toJson(s.item)
@@ -731,47 +737,43 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
); );
return; return;
}; };
this.formatUrlItem = function (currentItem) {
var formattedItem = "";
if (currentItem !== "") {
currentItem = self.formatCallItem(currentItem);
formattedItem = currentItem.substr(0, currentItem.length - 1) + ",{\"item\":";
} else
formattedItem = "[{\"item\":";
return formattedItem;
};
this.buildUrls = function (onpayload, dimpayload, offpayload, isObject, anId, deviceName, deviceTarget, deviceType, deviceMapType, count, delay) { this.buildUrls = function (onpayload, dimpayload, offpayload, isObject, anId, deviceName, deviceTarget, deviceType, deviceMapType, count, delay) {
var currentOn = ""; var currentOn = "";
var currentDim = ""; var currentDim = "";
var currentOff = ""; var currentOff = "";
if (self.state.device !== undefined && self.state.device !== null) { if (self.state.device !== undefined && self.state.device !== null) {
if (self.state.device.onUrl !== undefined && self.state.device.onUrl !== null) if (self.state.device.onUrl !== undefined && self.state.device.onUrl !== null&& self.state.device.onUrl !== "")
currentOn = self.state.device.onUrl; currentOn = self.state.device.onUrl;
if (self.state.device.dimUrl !== undefined && self.state.device.dimUrl !== null) if (self.state.device.dimUrl !== undefined && self.state.device.dimUrl !== null && self.state.device.dimUrl !== "")
currentDim = self.state.device.dimUrl; currentDim = self.state.device.dimUrl;
if (self.state.device.offUrl !== undefined && self.state.device.offnUrl !== null) if (self.state.device.offUrl !== undefined && self.state.device.offnUrl !== null && self.state.device.offnUrl !== "")
currentOff = self.state.device.offUrl; currentOff = self.state.device.offUrl;
} }
if (self.state.device !== undefined && self.state.device !== null && self.state.device.mapType !== undefined && self.state.device.mapType !== null && self.state.device.mapType !== "") { if (self.state.device !== undefined && self.state.device !== null && self.state.device.mapType !== undefined && self.state.device.mapType !== null && self.state.device.mapType !== "") {
self.state.device.mapId = self.state.device.mapId + "-" + anId; self.state.device.mapId = self.state.device.mapId + "-" + anId;
if (dimpayload !== null) { if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "") {
if (currentDim.indexOf("{\"item") !== 1 ) { self.state.device.dimUrl = self.formatUrlItem(currentDim);
if (isObject)
currentDim = "[{\"item\":" + currentDim + ",\"type\":\"" + deviceMapType + "\"}]";
else
currentDim = "[{\"item\":\"" + currentDim + "\",\"type\":\"" + deviceMapType + "\"}]";
}
self.state.device.dimUrl = currentDim.substr(0, currentDim.indexOf("]")) + ",{\"item\":";
} }
if (currentOn.indexOf("{\"item") !== 1 ) { if (onpayload !== undefined && onpayload !== null && onpayload !== "") {
if (isObject) self.state.device.onUrl = self.formatUrlItem(currentOn);
currentOn = "[{\"item\":" + currentOn + ",\"type\":\"" + deviceMapType + "\"}]";
else
currentOn = "[{\"item\":\"" + currentOn + "\",\"type\":\"" + deviceMapType + "\"}]";
} }
self.state.device.onUrl = currentOn.substr(0, currentOn.indexOf("]")) + ",{\"item\":";
if (currentOff.indexOf("{\"item") !== 1 ) { if (offpayload !== undefined && offpayload !== null && offpayload !== "") {
if (isObject) self.state.device.offUrl = self.formatUrlItem(currentOff);
currentOff = "[{\"item\":" + currentOff + ",\"type\":\"" + deviceMapType + "\"}]";
else
currentOff = "[{\"item\":\"" + currentOff + "\",\"type\":\"" + deviceMapType + "\"}]";
} }
self.state.device.offUrl = currentOff.substr(0, currentOff.indexOf("]")) + ",{\"item\":";
} else if (self.state.device === undefined || self.state.device === null || self.state.device.mapType === undefined || self.state.device.mapType === null || self.state.device.mapType === "") { } else if (self.state.device === undefined || self.state.device === null || self.state.device.mapType === undefined || self.state.device.mapType === null || self.state.device.mapType === "") {
this.clearDevice(); this.clearDevice();
self.state.device.deviceType = deviceType; self.state.device.deviceType = deviceType;
@@ -779,41 +781,53 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
self.state.device.targetDevice = deviceTarget; self.state.device.targetDevice = deviceTarget;
self.state.device.mapType = deviceMapType; self.state.device.mapType = deviceMapType;
self.state.device.mapId = anId; self.state.device.mapId = anId;
if(dimpayload !== null) if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = "[{\"item\":"; self.state.device.dimUrl = "[{\"item\":";
self.state.device.onUrl = "[{\"item\":"; if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.offUrl = "[{\"item\":"; self.state.device.onUrl = "[{\"item\":";
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = "[{\"item\":";
} }
if (isObject) { if (isObject) {
if (dimpayload !== null) if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + dimpayload; self.state.device.dimUrl = self.state.device.dimUrl + dimpayload;
self.state.device.onUrl = self.state.device.onUrl + onpayload; if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + offpayload; self.state.device.onUrl = self.state.device.onUrl + onpayload;
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + offpayload;
} else { } else {
if (dimpayload !== null) if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + "\"" + dimpayload + "\""; self.state.device.dimUrl = self.state.device.dimUrl + "\"" + dimpayload + "\"";
self.state.device.onUrl = self.state.device.onUrl + "\"" + onpayload + "\""; if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + "\"" + offpayload + "\""; self.state.device.onUrl = self.state.device.onUrl + "\"" + onpayload + "\"";
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + "\"" + offpayload + "\"";
} }
if (count !== undefined && count !== null && count !== "") { if (count !== undefined && count !== null && count !== "") {
if (dimpayload !== null) if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + ",\"count\":\"" + count; self.state.device.dimUrl = self.state.device.dimUrl + ",\"count\":\"" + count;
self.state.device.onUrl = self.state.device.onUrl + ",\"count\":\"" + count; if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + ",\"count\":\"" + count; self.state.device.onUrl = self.state.device.onUrl + ",\"count\":\"" + count;
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + ",\"count\":\"" + count;
} }
if (delay !== undefined && delay !== null && delay !== "") { if (delay !== undefined && delay !== null && delay !== "") {
if (dimpayload !== null) if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + ",\"delay\":\"" + delay; self.state.device.dimUrl = self.state.device.dimUrl + ",\"delay\":\"" + delay;
self.state.device.onUrl = self.state.device.onUrl + ",\"delay\":\"" + delay; if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + ",\"delay\":\"" + delay; self.state.device.onUrl = self.state.device.onUrl + ",\"delay\":\"" + delay;
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + ",\"delay\":\"" + delay;
} }
if (dimpayload !== null) if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + ",\"type\":\"" + deviceMapType + "\"}]"; self.state.device.dimUrl = self.state.device.dimUrl + ",\"type\":\"" + deviceMapType + "\"}]";
self.state.device.onUrl = self.state.device.onUrl + ",\"type\":\"" + deviceMapType + "\"}]"; if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + ",\"type\":\"" + deviceMapType + "\"}]"; self.state.device.onUrl = self.state.device.onUrl + ",\"type\":\"" + deviceMapType + "\"}]";
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + ",\"type\":\"" + deviceMapType + "\"}]";
}; };
}); });
@@ -1149,6 +1163,8 @@ app.controller('VeraController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, veradevice.id, veradevice.name, veradevice.veraname, "switch", "veraDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, veradevice.id, veradevice.name, veradevice.veraname, "switch", "veraDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildSceneUrls = function (verascene) { $scope.buildSceneUrls = function (verascene) {
@@ -1160,23 +1176,9 @@ app.controller('VeraController', function ($scope, $location, $http, bridgeServi
+ verascene.id; + verascene.id;
bridgeService.buildUrls(onpayload, null, offpayload, false, verascene.id, verascene.name, verascene.veraname, "scene", "veraScene", null, null); bridgeService.buildUrls(onpayload, null, offpayload, false, verascene.id, verascene.name, verascene.veraname, "scene", "veraScene", null, null);
}; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$scope.addDevice = function () { $location.path('/editdevice');
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewVeraDevices();
bridgeService.viewVeraScenes();
},
function (error) {
bridgeService.displayWarn("Error adding device: " + $scope.device.name, error)
}
);
}; };
$scope.bulkAddDevices = function(dim_control) { $scope.bulkAddDevices = function(dim_control) {
@@ -1295,6 +1297,8 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe
bridgeService.buildUrls(onpayload, null, offpayload, true, harmonyactivity.activity.id, harmonyactivity.activity.label, harmonyactivity.hub, "activity", "harmonyActivity", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, harmonyactivity.activity.id, harmonyactivity.activity.label, harmonyactivity.hub, "activity", "harmonyActivity", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildButtonUrls = function (harmonydevice, onbutton, offbutton) { $scope.buildButtonUrls = function (harmonydevice, onbutton, offbutton) {
@@ -1305,22 +1309,8 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe
bridgeService.buildUrls(onpayload, null, offpayload, true, actionOn.command, harmonydevice.device.label, harmonydevice.hub, "button", "harmonyButton", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, actionOn.command, harmonydevice.device.label, harmonydevice.hub, "button", "harmonyButton", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
}; bridgeService.editDevice($scope.device);
$location.path('/editdevice');
$scope.addDevice = function () {
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewHarmonyActivities();
bridgeService.viewHarmonyDevices();
},
function (error) {
}
);
}; };
$scope.toggleButtons = function () { $scope.toggleButtons = function () {
@@ -1363,6 +1353,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"away\":true,\"control\":\"status\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"away\":true,\"control\":\"status\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id, nestitem.name, nestitem.name, "home", "nestHomeAway", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id, nestitem.name, nestitem.name, "home", "nestHomeAway", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildNestTempUrls = function (nestitem) { $scope.buildNestTempUrls = function (nestitem) {
@@ -1371,6 +1363,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}";
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, nestitem.id + "-SetTemp", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Temperature", nestitem.location, "thermo", "nestThermoSet", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, nestitem.id + "-SetTemp", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Temperature", nestitem.location, "thermo", "nestThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildNestHeatUrls = function (nestitem) { $scope.buildNestHeatUrls = function (nestitem) {
@@ -1379,6 +1373,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}";
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, nestitem.id + "-SetHeat", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Heat", nestitem.location, "thermo", "nestThermoSet", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, nestitem.id + "-SetHeat", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Heat", nestitem.location, "thermo", "nestThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildNestCoolUrls = function (nestitem) { $scope.buildNestCoolUrls = function (nestitem) {
@@ -1387,6 +1383,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}";
bridgeService.buildUrls(onpayload,dimpayload, offpayload, true, nestitem.id + "-SetCool", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Cool", nestitem.location, "thermo", "nestThermoSet", null, null); bridgeService.buildUrls(onpayload,dimpayload, offpayload, true, nestitem.id + "-SetCool", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Cool", nestitem.location, "thermo", "nestThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildNestRangeUrls = function (nestitem) { $scope.buildNestRangeUrls = function (nestitem) {
@@ -1394,6 +1392,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id + "-SetRange", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Range", nestitem.location, "thermo", "nestThermoSet", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id + "-SetRange", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Range", nestitem.location, "thermo", "nestThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildNestOffUrls = function (nestitem) { $scope.buildNestOffUrls = function (nestitem) {
@@ -1401,6 +1401,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"off\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id + "-TurnOff", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Thermostat", nestitem.location, "thermo", "nestThermoSet", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id + "-TurnOff", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Thermostat", nestitem.location, "thermo", "nestThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildNestFanUrls = function (nestitem) { $scope.buildNestFanUrls = function (nestitem) {
@@ -1408,21 +1410,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"fan-auto\"}"; offpayload = "{\"name\":\"" + nestitem.id + "\",\"control\":\"fan-auto\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id + "-SetFan", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Fan", nestitem.location, "thermo", "nestThermoSet", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id + "-SetFan", nestitem.name.substr(0, nestitem.name.indexOf("(")) + " Fan", nestitem.location, "thermo", "nestThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
}; bridgeService.editDevice($scope.device);
$location.path('/editdevice');
$scope.addDevice = function () {
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewNestItems();
},
function (error) {
}
);
}; };
$scope.toggleButtons = function () { $scope.toggleButtons = function () {
@@ -1467,22 +1456,8 @@ app.controller('HueController', function ($scope, $location, $http, bridgeServic
offpayload = "{\"ipAddress\":\"" + huedevice.hueaddress + "\",\"deviceId\":\"" + huedevice.huedeviceid +"\",\"hueName\":\"" + huedevice.huename + "\"}"; offpayload = "{\"ipAddress\":\"" + huedevice.hueaddress + "\",\"deviceId\":\"" + huedevice.huedeviceid +"\",\"hueName\":\"" + huedevice.huename + "\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, huedevice.device.uniqueid, huedevice.device.name, huedevice.huename, "passthru", "hueDevice", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, huedevice.device.uniqueid, huedevice.device.name, huedevice.huename, "passthru", "hueDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
}; bridgeService.editDevice($scope.device);
$location.path('/editdevice');
$scope.addDevice = function () {
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewHueDevices();
},
function (error) {
bridgeService.displayWarn("Error adding device: " + $scope.device.name, error)
}
);
}; };
$scope.bulkAddDevices = function() { $scope.bulkAddDevices = function() {
@@ -1649,6 +1624,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ postCmd; + postCmd;
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname, haldevice.haldevicename, haldevice.halname, aDeviceType, "halDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname, haldevice.haldevicename, haldevice.halname, aDeviceType, "halDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildButtonUrls = function (haldevice, onbutton, offbutton) { $scope.buildButtonUrls = function (haldevice, onbutton, offbutton) {
@@ -1659,6 +1636,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-" + actionOn.DeviceName, haldevice.haldevicename, haldevice.halname, "button", "halButton", null, null); bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-" + actionOn.DeviceName, haldevice.haldevicename, haldevice.halname, "button", "halButton", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHALHomeUrls = function (haldevice) { $scope.buildHALHomeUrls = function (haldevice) {
@@ -1666,6 +1645,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
offpayload = "http://" + haldevice.haladdress + "/ModeService!ModeCmd=Set!ModeName=Away?Token=" + $scope.bridge.settings.haltoken; offpayload = "http://" + haldevice.haladdress + "/ModeService!ModeCmd=Set!ModeName=Away?Token=" + $scope.bridge.settings.haltoken;
bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-HomeAway", haldevice.haldevicename, haldevice.halname, "home", "halHome", null, null); bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-HomeAway", haldevice.haldevicename, haldevice.halname, "home", "halHome", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHALHeatUrls = function (haldevice) { $scope.buildHALHeatUrls = function (haldevice) {
@@ -1686,6 +1667,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ $scope.bridge.settings.haltoken; + $scope.bridge.settings.haltoken;
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetHeat", haldevice.haldevicename + " Heat", haldevice.halname, "thermo", "halThermoSet", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetHeat", haldevice.haldevicename + " Heat", haldevice.halname, "thermo", "halThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHALCoolUrls = function (haldevice) { $scope.buildHALCoolUrls = function (haldevice) {
@@ -1706,6 +1689,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ $scope.bridge.settings.haltoken; + $scope.bridge.settings.haltoken;
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetCool", haldevice.haldevicename + " Cool", haldevice.halname, "thermo", "halThermoSet", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetCool", haldevice.haldevicename + " Cool", haldevice.halname, "thermo", "halThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHALAutoUrls = function (haldevice) { $scope.buildHALAutoUrls = function (haldevice) {
@@ -1720,6 +1705,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ "!HVACMode=Off?Token=" + "!HVACMode=Off?Token="
bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetAuto", haldevice.haldevicename + " Auto", haldevice.halname, "thermo", "halThermoSet", null, null); bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetAuto", haldevice.haldevicename + " Auto", haldevice.halname, "thermo", "halThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHALOffUrls = function (haldevice) { $scope.buildHALOffUrls = function (haldevice) {
@@ -1735,6 +1722,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
$scope.device.offUrl = "http://" + haldevice.haladdress $scope.device.offUrl = "http://" + haldevice.haladdress
bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-TurnOff", haldevice.haldevicename + " Thermostat", haldevice.halname, "thermo", "halThermoSet", null, null); bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-TurnOff", haldevice.haldevicename + " Thermostat", haldevice.halname, "thermo", "halThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHALFanUrls = function (haldevice) { $scope.buildHALFanUrls = function (haldevice) {
@@ -1750,22 +1739,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ $scope.bridge.settings.haltoken; + $scope.bridge.settings.haltoken;
bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetFan", haldevice.haldevicename + " Fan", haldevice.halname, "thermo", "halThermoSet", null, null); bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-SetFan", haldevice.haldevicename + " Fan", haldevice.halname, "thermo", "halThermoSet", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
}; bridgeService.editDevice($scope.device);
$location.path('/editdevice');
$scope.addDevice = function () {
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewHalDevices();
},
function (error) {
bridgeService.displayWarn("Error adding device: " + $scope.device.name, error)
}
);
}; };
$scope.bulkAddDevices = function(dim_control) { $scope.bulkAddDevices = function(dim_control) {
@@ -1884,21 +1859,8 @@ app.controller('MQTTController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, null, offpayload, true, mqttbroker.clientId + "-" + mqtttopic, mqttbroker.clientId + mqtttopic, mqttbroker.clientId, "mqtt", "mqttMessage", null, null); bridgeService.buildUrls(onpayload, null, offpayload, true, mqttbroker.clientId + "-" + mqtttopic, mqttbroker.clientId + mqtttopic, mqttbroker.clientId, "mqtt", "mqttMessage", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
}; bridgeService.editDevice($scope.device);
$location.path('/editdevice');
$scope.addDevice = function () {
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewMQTTDevices();
},
function (error) {
}
);
}; };
$scope.toggleButtons = function () { $scope.toggleButtons = function () {
@@ -1949,6 +1911,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHassHeatUrls = function (hassdevice) { $scope.buildHassHeatUrls = function (hassdevice) {
@@ -1961,6 +1925,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHassCoolUrls = function (hassdevice) { $scope.buildHassCoolUrls = function (hassdevice) {
@@ -1973,6 +1939,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHassAutoUrls = function (hassdevice) { $scope.buildHassAutoUrls = function (hassdevice) {
@@ -1985,6 +1953,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHassOffUrls = function (hassdevice) { $scope.buildHassOffUrls = function (hassdevice) {
@@ -1997,6 +1967,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
}; };
$scope.buildHassFanUrls = function (hassdevice) { $scope.buildHassFanUrls = function (hassdevice) {
@@ -2009,22 +1981,8 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null); bridgeService.buildUrls(onpayload, dimpayload, offpayload, true, hassdevice.hassname + "-" + hassdevice.deviceState.entity_id, hassdevice.deviceState.entity_id, hassdevice.hassname, hassdevice.domain, "hassDevice", null, null);
$scope.device = bridgeService.state.device; $scope.device = bridgeService.state.device;
}; bridgeService.editDevice($scope.device);
$location.path('/editdevice');
$scope.addDevice = function () {
if($scope.device.name === "" && $scope.device.onUrl === "")
return;
bridgeService.addDevice($scope.device).then(
function () {
$scope.clearDevice();
bridgeService.viewDevices();
bridgeService.viewHassDevices();
},
function (error) {
bridgeService.displayWarn("Error adding device: " + $scope.device.name, error)
}
);
}; };
$scope.bulkAddDevices = function(dim_control) { $scope.bulkAddDevices = function(dim_control) {

View File

@@ -25,10 +25,12 @@
({{bridge.haldevices.length}})</h2> ({{bridge.haldevices.length}})</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any HAL Device, use the action buttons <p class="text-muted">For any HAL Device, use the build action buttons
to generate the device addition information below automatically. Then to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword you can modify the name to anything you want that will be the keyword
for Alexa. Click the 'Add Bridge Device' to finish that selection for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured HAL Devices' list below will show what setup. The 'Already Configured HAL Devices' list below will show what
is already setup for your HAL.</p> is already setup for your HAL.</p>
<p> <p>
@@ -60,7 +62,7 @@
<th sortable-header col="halname">HAL</th> <th sortable-header col="halname">HAL</th>
<th>On Button</th> <th>On Button</th>
<th>Off Button</th> <th>Off Button</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="haldevice in bridge.haldevices"> <tr ng-repeat="haldevice in bridge.haldevices">
@@ -86,10 +88,9 @@
</td> </td>
<td> <td>
<button ng-if="haldevice.haldevicetype != 'Home' && haldevice.haldevicetype != 'HVAC' && haldevice.haldevicetype != 'IrData'" class="btn btn-success" type="submit" <button ng-if="haldevice.haldevicetype != 'Home' && haldevice.haldevicetype != 'HVAC' && haldevice.haldevicetype != 'IrData'" class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(haldevice, device_dim_control)">Generate ng-click="buildDeviceUrls(haldevice, device_dim_control)">Build Item</button>
Bridge Device</button>
<button ng-if="haldevice.haldevicetype == 'Home'" class="btn btn-success" type="submit" <button ng-if="haldevice.haldevicetype == 'Home'" class="btn btn-success" type="submit"
ng-click="buildHALHomeUrls(haldevice)">Home/Away</button> ng-click="buildHALHomeUrls(haldevice)">Build Home/Away</button>
<button ng-if="haldevice.haldevicetype == 'IrData'" class="btn btn-success" type="submit" <button ng-if="haldevice.haldevicetype == 'IrData'" class="btn btn-success" type="submit"
ng-click="buildButtonUrls(haldevice, button_on, button_off)">Build ng-click="buildButtonUrls(haldevice, button_on, button_off)">Build
A Button</button> A Button</button>
@@ -159,59 +160,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add Bridge Device for a HAL Device</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-dim-url">Dim URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-dim-url"
ng-model="device.dimUrl" placeholder="URL to dim device"></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -25,10 +25,12 @@
<h2 class="panel-title">Harmony Activity List</h2> <h2 class="panel-title">Harmony Activity List</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any Harmony Activity, use the action <p class="text-muted">For any Harmony Activity, use the build action buttons
buttons to generate the device addition information below to generate the item addition information into the ha-bridge device and this will put you into the edit screen.
automatically. Then you can modify the name to anything you want that Then you can modify the name to anything you want that
will be the keyword for Alexa. Click the 'Add Bridge Device' to will be the keyword for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to
finish that selection setup. The 'Already Configured Activities' list finish that selection setup. The 'Already Configured Activities' list
below will show what is already setup for your Harmony Hubs.</p> below will show what is already setup for your Harmony Hubs.</p>
</div> </div>
@@ -41,7 +43,7 @@
<th sortable-header col="label" comparator-fn="comparatorLabel">Name</th> <th sortable-header col="label" comparator-fn="comparatorLabel">Name</th>
<th sortable-header col="id" comparator-fn="comparatorNumber">Id</th> <th sortable-header col="id" comparator-fn="comparatorNumber">Id</th>
<th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th> <th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr <tr
@@ -52,8 +54,7 @@
<td>{{harmonyactivity.hub}}</td> <td>{{harmonyactivity.hub}}</td>
<td> <td>
<button class="btn btn-success" type="submit" <button class="btn btn-success" type="submit"
ng-click="buildActivityUrls(harmonyactivity)">Generate ng-click="buildActivityUrls(harmonyactivity)">Build Item</button>
Bridge Device</button>
</td> </td>
</tr> </tr>
</table> </table>
@@ -96,51 +97,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add a Bridge Device for a Harmony
Activity</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -26,11 +26,11 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any Harmony Device and Buttons, use the <p class="text-muted">For any Harmony Device and Buttons, use the
build button to generate the configuration for this bridge device. build action buttons
You can add button presses by selecting yoru devic and buttons and to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then you can modify the name
then selecting the Build Button. This will allow multiple button to anything you want that will be the keyword for Alexa. Also, you can go back to any helper tab and click a build
presses to be built for a given device. Then you can modify the name action button to add another item for a multi-command. After you are
to anything you want that will be the keyword for Alexa. Click the done in the edit tab, click the
'Add Bridge Device' to finish that selection setup. The 'Already 'Add Bridge Device' to finish that selection setup. The 'Already
Configured Harmony Buttons' list below will show what is already Configured Harmony Buttons' list below will show what is already
setup for your Harmony Hubs.</p> setup for your Harmony Hubs.</p>
@@ -46,7 +46,7 @@
<th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th> <th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th>
<th>On Button</th> <th>On Button</th>
<th>Off Button</th> <th>Off Button</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="harmonydevice in bridge.harmonydevices"> <tr ng-repeat="harmonydevice in bridge.harmonydevices">
@@ -117,50 +117,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add a Bridge Device for Harmony Buttons</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -27,10 +27,12 @@
({{bridge.hassdevices.length}})</h2> ({{bridge.hassdevices.length}})</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any HomeAssistant Device, use the action buttons <p class="text-muted">For any HomeAssistant Device, use the build action buttons
to generate the device addition information below automatically. Then to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword you can modify the name to anything you want that will be the keyword
for Alexa. Click the 'Add Bridge Device' to finish that selection for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured HomeAssistant Devices' list below will show what setup. The 'Already Configured HomeAssistant Devices' list below will show what
is already setup for your HomeAssitant.</p> is already setup for your HomeAssitant.</p>
<p> <p>
@@ -59,7 +61,7 @@
ng-checked="selectAll" ng-checked="selectAll"
ng-click="toggleSelectAll()"> Name</span></th> ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="hassname">HomeAssitant</th> <th sortable-header col="hassname">HomeAssitant</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="hassdevice in bridge.hassdevices"> <tr ng-repeat="hassdevice in bridge.hassdevices">
@@ -72,8 +74,7 @@
<td>{{hassdevice.hassname}}</td> <td>{{hassdevice.hassname}}</td>
<td> <td>
<button ng-if="hassdevice.domain != 'climate' && hassdevice.domain != 'sensor' && hassdevice.domain != 'sun'" class="btn btn-success" type="submit" <button ng-if="hassdevice.domain != 'climate' && hassdevice.domain != 'sensor' && hassdevice.domain != 'sun'" class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(hassdevice, device_dim_control)">Generate ng-click="buildDeviceUrls(hassdevice, device_dim_control)">Build Item</button>
Bridge Device</button>
<ul ng-if="hassdevice.domain == 'climate'" class="list-group"> <ul ng-if="hassdevice.domain == 'climate'" class="list-group">
<li class="list-group-item"> <li class="list-group-item">
<p> <p>
@@ -138,59 +139,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add Bridge Device for a HomeAssitant Device</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-dim-url">Dim URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-dim-url"
ng-model="device.dimUrl" placeholder="URL to dim device"></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -26,10 +26,12 @@
({{bridge.huedevices.length}})</h2> ({{bridge.huedevices.length}})</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any Hue Device, use the action buttons <p class="text-muted">For any Hue Device, use the build action buttons
to generate the device addition information below automatically. Then to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword you can modify the name to anything you want that will be the keyword
for Alexa. Click the 'Add Bridge Device' to finish that selection for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured Hue Devices' list below will show what setup. The 'Already Configured Hue Devices' list below will show what
is already setup for your Hue.</p> is already setup for your Hue.</p>
<p>Use the check boxes by the names to use the bulk addition <p>Use the check boxes by the names to use the bulk addition
@@ -48,7 +50,7 @@
ng-click="toggleSelectAll()"> Name</span></th> ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="id">Id</th> <th sortable-header col="id">Id</th>
<th sortable-header col="huename">Hue</th> <th sortable-header col="huename">Hue</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="huedevice in bridge.huedevices"> <tr ng-repeat="huedevice in bridge.huedevices">
@@ -62,8 +64,7 @@
<td>{{huedevice.huename}}</td> <td>{{huedevice.huename}}</td>
<td> <td>
<button class="btn btn-success" type="submit" <button class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(huedevice)">Generate Bridge ng-click="buildDeviceUrls(huedevice)">Build Item</button>
Device</button>
</td> </td>
</tr> </tr>
</table> </table>
@@ -110,38 +111,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add Bridge Device for a Hue Device</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -20,10 +20,13 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any MQTT Broker, use the <p class="text-muted">For any MQTT Broker, use the
build button to generate the configuration for the publish generation. build action buttons
to generate the item addition information into the ha-bridge device and this will put you into the edit screen.
You can add topic and content in the text areas provided You can add topic and content in the text areas provided
then selecting the publish generation. Then you can modify the name then selecting the publish generation. Then you can modify the name
to anything you want that will be the keyword for Alexa. Click the to anything you want that will be the keyword for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the
'Add Bridge Device' to finish that selection setup. The 'Already 'Add Bridge Device' to finish that selection setup. The 'Already
Configured MQTT Publish messages' list below will show what is already Configured MQTT Publish messages' list below will show what is already
setup for your MQTT Brokers.</p> setup for your MQTT Brokers.</p>
@@ -38,7 +41,7 @@
<th sortable-header col="ip">IP</th> <th sortable-header col="ip">IP</th>
<th>Topic</th> <th>Topic</th>
<th>Content</th> <th>Content</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="mqttbroker in bridge.mqttbrokers"> <tr ng-repeat="mqttbroker in bridge.mqttbrokers">
@@ -100,50 +103,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add a Bridge Device for MQTT Messages</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -25,10 +25,12 @@
<h2 class="panel-title">Nest Items List</h2> <h2 class="panel-title">Nest Items List</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any Nest Item, use the action buttons to <p class="text-muted">For any Nest Item, use the build action buttons
generate the device addition information below automatically. Then to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword you can modify the name to anything you want that will be the keyword
for Alexa. Click the 'Add Bridge Device' to finish that selection for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured Nest Items' list below will show what setup. The 'Already Configured Nest Items' list below will show what
is already setup for your Nest.</p> is already setup for your Nest.</p>
</div> </div>
@@ -41,7 +43,7 @@
<th sortable-header col="name">Name</th> <th sortable-header col="name">Name</th>
<th sortable-header col="type">Type</th> <th sortable-header col="type">Type</th>
<th sortable-header col="location">Location</th> <th sortable-header col="location">Location</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr <tr
@@ -115,50 +117,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add a Bridge Device for a Nest Item</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -25,10 +25,13 @@
({{bridge.veradevices.length}})</h2> ({{bridge.veradevices.length}})</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any Vera Device, use the action buttons <p class="text-muted">For any Vera Device, use the build action buttons
to generate the device addition information below automatically. Then to generate the item addition information into the ha-bridge device
and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword you can modify the name to anything you want that will be the keyword
for Alexa. Click the 'Add Bridge Device' to finish that selection for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured Vera Devices' list below will show setup. The 'Already Configured Vera Devices' list below will show
what is already setup for your Vera.</p> what is already setup for your Vera.</p>
<p> <p>
@@ -59,7 +62,7 @@
<th sortable-header col="category">Category</th> <th sortable-header col="category">Category</th>
<th sortable-header col="room">Room</th> <th sortable-header col="room">Room</th>
<th sortable-header col="veraname">Vera</th> <th sortable-header col="veraname">Vera</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr <tr
@@ -76,8 +79,7 @@
<td>{{veradevice.veraname}}</td> <td>{{veradevice.veraname}}</td>
<td> <td>
<button class="btn btn-success" type="submit" <button class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(veradevice, device_dim_control)">Generate ng-click="buildDeviceUrls(veradevice, device_dim_control)">Build Item</button>
Bridge Device</button>
</td> </td>
</tr> </tr>
</table> </table>
@@ -124,59 +126,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add Bridge Device for a Vera Device</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-dim-url">Dim URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-dim-url"
ng-model="device.dimUrl" placeholder="URL to dim device"></textarea>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>

View File

@@ -24,10 +24,12 @@
<h2 class="panel-title">Vera Scene List</h2> <h2 class="panel-title">Vera Scene List</h2>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<p class="text-muted">For any Vera Scene, use the action buttons <p class="text-muted">For any Vera Scene, use the build action buttons
to generate the device addition information below automatically. Then to generate the item addition information into the ha-bridge device and this will put you into the edit screen. Then
you can modify the name to anything you want that will be the keyword you can modify the name to anything you want that will be the keyword
for Alexa. Click the 'Add Bridge Device' to finish that selection for Alexa. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command. After you are
done in the edit tab, click the 'Add Bridge Device' to finish that selection
setup. The 'Already Configured Vera Scenes' list below will show what setup. The 'Already Configured Vera Scenes' list below will show what
is already setup for your Vera.</p> is already setup for your Vera.</p>
</div> </div>
@@ -41,7 +43,7 @@
<th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th> <th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th>
<th sortable-header col="room">Room</th> <th sortable-header col="room">Room</th>
<th sortable-header col="veraname">Vera</th> <th sortable-header col="veraname">Vera</th>
<th>Actions</th> <th>Build Actions</th>
</tr> </tr>
</thead> </thead>
<tr ng-repeat="verascene in bridge.verascenes"> <tr ng-repeat="verascene in bridge.verascenes">
@@ -52,8 +54,7 @@
<td>{{verascene.veraname}}</td> <td>{{verascene.veraname}}</td>
<td> <td>
<button class="btn btn-success" type="submit" <button class="btn btn-success" type="submit"
ng-click="buildSceneUrls(verascene)">Generate Bridge ng-click="buildSceneUrls(verascene)">Build Item</button>
Device</button>
</td> </td>
</tr> </tr>
</table> </table>
@@ -95,48 +96,6 @@
</table> </table>
</scrollable-table> </scrollable-table>
</div> </div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">Add a Bridge Device for a Vera scene</h2>
</div>
<div class="panel-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-xs-12 col-sm-2 control-label" for="device-name">Name
</label>
<div class="col-xs-8 col-sm-7">
<input type="text" class="form-control" id="device-name"
ng-model="device.name" placeholder="Device Name">
</div>
<button type="submit" class="col-xs-4 col-sm-2 btn btn-primary"
ng-click="addDevice()">Add Bridge Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label" for="device-on-url">On
URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-on-url"
ng-model="device.onUrl" placeholder="URL to turn device on"></textarea>
</div>
<button class="btn btn-danger" ng-click="clearDevice()">
Clear Device</button>
</div>
<div class="form-group">
<div class="row">
<label class="col-xs-12 col-sm-2 control-label"
for="device-off-url">Off URL </label>
<div class="col-xs-8 col-sm-7">
<textarea rows="3" class="form-control" id="device-off-url"
ng-model="device.offUrl" placeholder="URL to turn device off"></textarea>
</div>
</div>
</form>
</div>
</div>
<script type="text/ng-template" id="deleteMapandIdDialog"> <script type="text/ng-template" id="deleteMapandIdDialog">
<div class="ngdialog-message"> <div class="ngdialog-message">
<h2>Device Map and Id?</h2> <h2>Device Map and Id?</h2>