Finished MQTT support and some testing. Updated harmony-java-client to

v1.1.1 to fix authentication error.
This commit is contained in:
Admin
2016-11-18 15:14:58 -06:00
parent 68f38e1d95
commit 08166c0ebf
9 changed files with 49 additions and 46 deletions

View File

@@ -702,14 +702,16 @@ app.controller('SystemController', function ($scope, $location, $http, $window,
}
}
};
$scope.addMQTTtoSettings = function (newmqttname, newmqttip) {
$scope.addMQTTtoSettings = function (newmqttname, newmqttip, newmqttusername, newmqttpassword) {
if($scope.bridge.settings.mqttaddress == null) {
$scope.bridge.settings.mqttaddress = { devices: [] };
}
var newmqtt = {name: newmqttname, ip: newmqttip }
var newmqtt = {name: newmqttname, ip: newmqttip, username: newmqttusername, password: newmqttpassword }
$scope.bridge.settings.mqttaddress.devices.push(newmqtt);
$scope.newmqttname = null;
$scope.newmqttip = null;
$scope.newmqttusername = null;
$scope.newmqttpassword = null;
};
$scope.removeMQTTtoSettings = function (mqttname, mqttip) {
for(var i = $scope.bridge.settings.mqttaddress.devices.length - 1; i >= 0; i--) {