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>
<artifactId>ha-bridge</artifactId>
<version>4beta3.5</version>
<version>4beta3.6</version>
<packaging>jar</packaging>
<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) {
if (!deviceString.startsWith("[")) {
if (deviceString.startsWith("{\"item"))
deviceString = "[" + deviceString + "]"
else {
if (deviceString.startsWith("{"))
deviceString = "[{\"item\":" + deviceString + "}]"
else
deviceString = "[{\"item\":\"" + deviceString + "\"}]"
}
} else if (!deviceString.startsWith("[{\"item\""))
deviceString = "[{\"item\":" + deviceString + "}]"
if (deviceString === undefined || deviceString === "")
return null;
deviceString = self.formatCallItem(deviceString);
var newDevices = angular.fromJson(deviceString)
var i, s, len = newDevices.length
for (i=0; i<len; ++i) {
if (i in newDevices) {
s = newDevices[i];
if (s.type !== null)
if (s.type !== undefined && s.type !== null)
s.type = self.getMapType(s.type)
if (angular.isObject(s.item))
s.item = angular.toJson(s.item)
@@ -731,47 +737,43 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
);
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) {
var currentOn = "";
var currentDim = "";
var currentOff = "";
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;
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;
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;
}
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;
if (dimpayload !== null) {
if (currentDim.indexOf("{\"item") !== 1 ) {
if (isObject)
currentDim = "[{\"item\":" + currentDim + ",\"type\":\"" + deviceMapType + "\"}]";
else
currentDim = "[{\"item\":\"" + currentDim + "\",\"type\":\"" + deviceMapType + "\"}]";
}
self.state.device.dimUrl = currentDim.substr(0, currentDim.indexOf("]")) + ",{\"item\":";
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "") {
self.state.device.dimUrl = self.formatUrlItem(currentDim);
}
if (currentOn.indexOf("{\"item") !== 1 ) {
if (isObject)
currentOn = "[{\"item\":" + currentOn + ",\"type\":\"" + deviceMapType + "\"}]";
else
currentOn = "[{\"item\":\"" + currentOn + "\",\"type\":\"" + deviceMapType + "\"}]";
if (onpayload !== undefined && onpayload !== null && onpayload !== "") {
self.state.device.onUrl = self.formatUrlItem(currentOn);
}
self.state.device.onUrl = currentOn.substr(0, currentOn.indexOf("]")) + ",{\"item\":";
if (currentOff.indexOf("{\"item") !== 1 ) {
if (isObject)
currentOff = "[{\"item\":" + currentOff + ",\"type\":\"" + deviceMapType + "\"}]";
else
currentOff = "[{\"item\":\"" + currentOff + "\",\"type\":\"" + deviceMapType + "\"}]";
if (offpayload !== undefined && offpayload !== null && offpayload !== "") {
self.state.device.offUrl = self.formatUrlItem(currentOff);
}
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 === "") {
this.clearDevice();
self.state.device.deviceType = deviceType;
@@ -779,41 +781,53 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
self.state.device.targetDevice = deviceTarget;
self.state.device.mapType = deviceMapType;
self.state.device.mapId = anId;
if(dimpayload !== null)
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = "[{\"item\":";
self.state.device.onUrl = "[{\"item\":";
self.state.device.offUrl = "[{\"item\":";
if (onpayload !== undefined && onpayload !== null && onpayload !== "")
self.state.device.onUrl = "[{\"item\":";
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = "[{\"item\":";
}
if (isObject) {
if (dimpayload !== null)
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + dimpayload;
self.state.device.onUrl = self.state.device.onUrl + onpayload;
self.state.device.offUrl = self.state.device.offUrl + offpayload;
if (onpayload !== undefined && onpayload !== null && onpayload !== "")
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 {
if (dimpayload !== null)
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + "\"" + dimpayload + "\"";
self.state.device.onUrl = self.state.device.onUrl + "\"" + onpayload + "\"";
self.state.device.offUrl = self.state.device.offUrl + "\"" + offpayload + "\"";
if (onpayload !== undefined && onpayload !== null && onpayload !== "")
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 (dimpayload !== null)
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + ",\"count\":\"" + count;
self.state.device.onUrl = self.state.device.onUrl + ",\"count\":\"" + count;
self.state.device.offUrl = self.state.device.offUrl + ",\"count\":\"" + count;
if (onpayload !== undefined && onpayload !== null && onpayload !== "")
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 (dimpayload !== null)
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + ",\"delay\":\"" + delay;
self.state.device.onUrl = self.state.device.onUrl + ",\"delay\":\"" + delay;
self.state.device.offUrl = self.state.device.offUrl + ",\"delay\":\"" + delay;
if (onpayload !== undefined && onpayload !== null && onpayload !== "")
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.onUrl = self.state.device.onUrl + ",\"type\":\"" + deviceMapType + "\"}]";
self.state.device.offUrl = self.state.device.offUrl + ",\"type\":\"" + deviceMapType + "\"}]";
if (onpayload !== undefined && onpayload !== null && onpayload !== "")
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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildSceneUrls = function (verascene) {
@@ -1160,23 +1176,9 @@ app.controller('VeraController', function ($scope, $location, $http, bridgeServi
+ verascene.id;
bridgeService.buildUrls(onpayload, null, offpayload, false, verascene.id, verascene.name, verascene.veraname, "scene", "veraScene", null, null);
};
$scope.addDevice = function () {
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.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
};
$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) {
}
);
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.toggleButtons = function () {
@@ -1363,6 +1353,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
offpayload = "{\"name\":\"" + nestitem.id + "\",\"away\":true,\"control\":\"status\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, nestitem.id, nestitem.name, nestitem.name, "home", "nestHomeAway", null, null);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildNestTempUrls = function (nestitem) {
@@ -1371,6 +1363,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildNestHeatUrls = function (nestitem) {
@@ -1379,6 +1373,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildNestCoolUrls = function (nestitem) {
@@ -1387,6 +1383,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildNestRangeUrls = function (nestitem) {
@@ -1394,6 +1392,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildNestOffUrls = function (nestitem) {
@@ -1401,6 +1401,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildNestFanUrls = function (nestitem) {
@@ -1408,21 +1410,8 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
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);
$scope.device = bridgeService.state.device;
};
$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) {
}
);
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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 + "\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, huedevice.device.uniqueid, huedevice.device.name, huedevice.huename, "passthru", "hueDevice", null, null);
$scope.device = bridgeService.state.device;
};
$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)
}
);
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.bulkAddDevices = function() {
@@ -1649,6 +1624,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ postCmd;
bridgeService.buildUrls(onpayload, dimpayload, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname, haldevice.haldevicename, haldevice.halname, aDeviceType, "halDevice", null, null);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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;
bridgeService.buildUrls(onpayload, null, offpayload, false, haldevice.haldevicename + "-" + haldevice.halname + "-HomeAway", haldevice.haldevicename, haldevice.halname, "home", "halHome", null, null);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildHALHeatUrls = function (haldevice) {
@@ -1686,6 +1667,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ $scope.bridge.settings.haltoken;
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;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildHALCoolUrls = function (haldevice) {
@@ -1706,6 +1689,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ $scope.bridge.settings.haltoken;
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;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildHALAutoUrls = function (haldevice) {
@@ -1720,6 +1705,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ "!HVACMode=Off?Token="
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;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildHALOffUrls = function (haldevice) {
@@ -1735,6 +1722,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.buildHALFanUrls = function (haldevice) {
@@ -1750,22 +1739,8 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ $scope.bridge.settings.haltoken;
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.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)
}
);
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
};
$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) {
}
);
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$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);
$scope.device = bridgeService.state.device;
};
$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)
}
);
bridgeService.editDevice($scope.device);
$location.path('/editdevice');
};
$scope.bulkAddDevices = function(dim_control) {

View File

@@ -25,10 +25,12 @@
({{bridge.haldevices.length}})</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any HAL Device, use the action buttons
to generate the device addition information below automatically. Then
<p class="text-muted">For any HAL Device, use the build action buttons
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
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
is already setup for your HAL.</p>
<p>
@@ -60,7 +62,7 @@
<th sortable-header col="halname">HAL</th>
<th>On Button</th>
<th>Off Button</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr ng-repeat="haldevice in bridge.haldevices">
@@ -86,10 +88,9 @@
</td>
<td>
<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
Bridge Device</button>
ng-click="buildDeviceUrls(haldevice, device_dim_control)">Build Item</button>
<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"
ng-click="buildButtonUrls(haldevice, button_on, button_off)">Build
A Button</button>
@@ -159,59 +160,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -25,10 +25,12 @@
<h2 class="panel-title">Harmony Activity List</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any Harmony Activity, use the action
buttons to generate the device addition information below
automatically. Then you can modify the name to anything you want that
will be the keyword for Alexa. Click the 'Add Bridge Device' to
<p class="text-muted">For any Harmony Activity, use the build action buttons
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 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
below will show what is already setup for your Harmony Hubs.</p>
</div>
@@ -41,7 +43,7 @@
<th sortable-header col="label" comparator-fn="comparatorLabel">Name</th>
<th sortable-header col="id" comparator-fn="comparatorNumber">Id</th>
<th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr
@@ -52,8 +54,7 @@
<td>{{harmonyactivity.hub}}</td>
<td>
<button class="btn btn-success" type="submit"
ng-click="buildActivityUrls(harmonyactivity)">Generate
Bridge Device</button>
ng-click="buildActivityUrls(harmonyactivity)">Build Item</button>
</td>
</tr>
</table>
@@ -96,51 +97,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -26,11 +26,11 @@
</div>
<div class="panel-body">
<p class="text-muted">For any Harmony Device and Buttons, use the
build button to generate the configuration for this bridge device.
You can add button presses by selecting yoru devic and buttons and
then selecting the Build Button. This will allow multiple button
presses to be built for a given device. Then you can modify the name
to anything you want that will be the keyword for Alexa. Click the
build action buttons
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 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 Harmony Buttons' list below will show what is already
setup for your Harmony Hubs.</p>
@@ -46,7 +46,7 @@
<th sortable-header col="hub" comparator-fn="comparatorHub">Hub</th>
<th>On Button</th>
<th>Off Button</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr ng-repeat="harmonydevice in bridge.harmonydevices">
@@ -117,50 +117,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -27,10 +27,12 @@
({{bridge.hassdevices.length}})</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any HomeAssistant Device, use the action buttons
to generate the device addition information below automatically. Then
<p class="text-muted">For any HomeAssistant Device, use the build action buttons
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
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
is already setup for your HomeAssitant.</p>
<p>
@@ -59,7 +61,7 @@
ng-checked="selectAll"
ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="hassname">HomeAssitant</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr ng-repeat="hassdevice in bridge.hassdevices">
@@ -72,8 +74,7 @@
<td>{{hassdevice.hassname}}</td>
<td>
<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
Bridge Device</button>
ng-click="buildDeviceUrls(hassdevice, device_dim_control)">Build Item</button>
<ul ng-if="hassdevice.domain == 'climate'" class="list-group">
<li class="list-group-item">
<p>
@@ -138,59 +139,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -26,10 +26,12 @@
({{bridge.huedevices.length}})</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any Hue Device, use the action buttons
to generate the device addition information below automatically. Then
<p class="text-muted">For any Hue Device, use the build action buttons
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
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
is already setup for your Hue.</p>
<p>Use the check boxes by the names to use the bulk addition
@@ -48,7 +50,7 @@
ng-click="toggleSelectAll()"> Name</span></th>
<th sortable-header col="id">Id</th>
<th sortable-header col="huename">Hue</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr ng-repeat="huedevice in bridge.huedevices">
@@ -62,8 +64,7 @@
<td>{{huedevice.huename}}</td>
<td>
<button class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(huedevice)">Generate Bridge
Device</button>
ng-click="buildDeviceUrls(huedevice)">Build Item</button>
</td>
</tr>
</table>
@@ -110,38 +111,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -20,10 +20,13 @@
</div>
<div class="panel-body">
<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
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
Configured MQTT Publish messages' list below will show what is already
setup for your MQTT Brokers.</p>
@@ -38,7 +41,7 @@
<th sortable-header col="ip">IP</th>
<th>Topic</th>
<th>Content</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr ng-repeat="mqttbroker in bridge.mqttbrokers">
@@ -100,50 +103,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -25,10 +25,12 @@
<h2 class="panel-title">Nest Items List</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any Nest Item, use the action buttons to
generate the device addition information below automatically. Then
<p class="text-muted">For any Nest Item, use the build action buttons
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
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
is already setup for your Nest.</p>
</div>
@@ -41,7 +43,7 @@
<th sortable-header col="name">Name</th>
<th sortable-header col="type">Type</th>
<th sortable-header col="location">Location</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr
@@ -115,50 +117,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -25,10 +25,13 @@
({{bridge.veradevices.length}})</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any Vera Device, use the action buttons
to generate the device addition information below automatically. Then
<p class="text-muted">For any Vera Device, use the build action buttons
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
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
what is already setup for your Vera.</p>
<p>
@@ -59,7 +62,7 @@
<th sortable-header col="category">Category</th>
<th sortable-header col="room">Room</th>
<th sortable-header col="veraname">Vera</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr
@@ -76,8 +79,7 @@
<td>{{veradevice.veraname}}</td>
<td>
<button class="btn btn-success" type="submit"
ng-click="buildDeviceUrls(veradevice, device_dim_control)">Generate
Bridge Device</button>
ng-click="buildDeviceUrls(veradevice, device_dim_control)">Build Item</button>
</td>
</tr>
</table>
@@ -124,59 +126,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>

View File

@@ -24,10 +24,12 @@
<h2 class="panel-title">Vera Scene List</h2>
</div>
<div class="panel-body">
<p class="text-muted">For any Vera Scene, use the action buttons
to generate the device addition information below automatically. Then
<p class="text-muted">For any Vera Scene, use the build action buttons
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
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
is already setup for your Vera.</p>
</div>
@@ -41,7 +43,7 @@
<th sortable-header col="id" comparator-fn="comparatorUniqueId">Id</th>
<th sortable-header col="room">Room</th>
<th sortable-header col="veraname">Vera</th>
<th>Actions</th>
<th>Build Actions</th>
</tr>
</thead>
<tr ng-repeat="verascene in bridge.verascenes">
@@ -52,8 +54,7 @@
<td>{{verascene.veraname}}</td>
<td>
<button class="btn btn-success" type="submit"
ng-click="buildSceneUrls(verascene)">Generate Bridge
Device</button>
ng-click="buildSceneUrls(verascene)">Build Item</button>
</td>
</tr>
</table>
@@ -95,48 +96,6 @@
</table>
</scrollable-table>
</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">
<div class="ngdialog-message">
<h2>Device Map and Id?</h2>