mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-19 00:20:26 +00:00
Finished MQTT support and some testing. Updated harmony-java-client to
v1.1.1 to fix authentication error.
This commit is contained in:
@@ -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--) {
|
||||
|
||||
Reference in New Issue
Block a user