Re-instating line endings that were erroneously removed

This commit is contained in:
Monica Goward
2017-02-04 18:40:28 +00:00
parent cf3ec7cfe4
commit 6b8a714959
12 changed files with 63 additions and 64 deletions

View File

@@ -329,7 +329,7 @@ public class BridgeSettingsDescriptor {
}
public Boolean isValidHass() {
if(this.getHassaddress() == null || this.getHassaddress().getDevices().size() <= 0)
return false;
return false;
List<NamedIP> devicesList = this.getHassaddress().getDevices();
if(devicesList.get(0).getIp().contains(Configuration.DEFAULT_ADDRESS))
return false;
@@ -337,7 +337,7 @@ public class BridgeSettingsDescriptor {
}
public Boolean isValidDomoticz() {
if(this.getDomoticzaddress() == null || this.getDomoticzaddress().getDevices().size() <= 0)
return false;
return false;
List<NamedIP> devicesList = this.getDomoticzaddress().getDevices();
if(devicesList.get(0).getIp().contains(Configuration.DEFAULT_ADDRESS))
return false;

View File

@@ -65,7 +65,7 @@ public class DeviceMapTypes {
public ArrayList<String[]> getDeviceMapTypes() {
return deviceMapTypes;
}
public Boolean validateType(String type) {
if(type == null || type.trim().isEmpty())
return false;

View File

@@ -20,7 +20,7 @@ app.config (function ($locationProvider, $routeProvider) {
controller: 'VeraController'
}).when ('/verascenes', {
templateUrl: 'views/verascene.html',
controller: 'VeraController'
controller: 'VeraController'
}).when ('/harmonydevices', {
templateUrl: 'views/harmonydevice.html',
controller: 'HarmonyController'
@@ -41,7 +41,7 @@ app.config (function ($locationProvider, $routeProvider) {
controller: 'MQTTController'
}).when ('/hassdevices', {
templateUrl: 'views/hassdevice.html',
controller: 'HassController'
controller: 'HassController'
}).when ('/domoticzdevices', {
templateUrl: 'views/domoticzdevice.html',
controller: 'DomoticzController'
@@ -167,20 +167,20 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
this.deviceContainsType = function (device, aType) {
if(device.mapType !== undefined && device.mapType !== null && device.mapType.indexOf(aType) >= 0)
return true;
if(device.deviceType !== undefined && device.deviceType !== null && device.deviceType.indexOf(aType) >= 0)
return true;
if(device.onUrl !== undefined && device.onUrl !== null && device.onUrl.indexOf(aType) >= 0)
return true;
if(device.dimUrl !== undefined && device.dimUrl !== null && device.dimUrl.indexOf(aType) >= 0)
return true;
if(device.offUrl !== undefined && device.offUrl !== null && device.offUrl.indexOf(aType) >= 0)
return true;
return false;
}
this.compareHarmonyNumber = function(r1, r2) {
@@ -484,7 +484,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
return currentItem;
};
this.getCallObjects = function (deviceString) {
if (deviceString === undefined || deviceString === "")
return null;
@@ -504,7 +504,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
}
return newDevices
}
this.updateCallObjectsType = function (theDevices) {
var i, s, type, len = theDevices.length
for (i=0; i<len; ++i) {
@@ -517,9 +517,9 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
}
}
return theDevices
}
this.viewMapTypes = function () {
return $http.get(this.state.base + "/map/types").then(
function (response) {
@@ -805,7 +805,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
);
return;
};
this.formatUrlItem = function (currentItem) {
var formattedItem = "";
if (currentItem !== "") {
@@ -832,7 +832,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
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 !== undefined && dimpayload !== null && dimpayload !== "") {
self.state.device.dimUrl = self.formatUrlItem(currentDim);
self.state.device.dimUrl = self.formatUrlItem(currentDim);
}
if (onpayload !== undefined && onpayload !== null && onpayload !== "") {
@@ -856,7 +856,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = "[{\"item\":";
}
if (isObject) {
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + dimpayload;
@@ -864,7 +864,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
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 !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + "\"" + dimpayload + "\"";
@@ -873,7 +873,7 @@ app.service ('bridgeService', function ($http, $window, ngToast) {
if (offpayload !== undefined && offpayload !== null && offpayload !== "")
self.state.device.offUrl = self.state.device.offUrl + "\"" + offpayload + "\"";
}
if (count !== undefined && count !== null && count !== "") {
if (dimpayload !== undefined && dimpayload !== null && dimpayload !== "")
self.state.device.dimUrl = self.state.device.dimUrl + ",\"count\":\"" + count;
@@ -1005,7 +1005,7 @@ app.controller ('SystemController', function ($scope, $location, $http, $window,
if($scope.bridge.settings.hassaddress.devices[i].name === hassname && $scope.bridge.settings.hassaddress.devices[i].ip === hassip) {
$scope.bridge.settings.hassaddress.devices.splice(i, 1);
}
}
}
};
$scope.addDomoticztoSettings = function (newdomoticzname, newdomoticzip, newdomoticzport, newdomoticzusername, newdomoticzpassword) {
if($scope.bridge.settings.domoticzaddress === undefined || $scope.bridge.settings.domoticzaddress === null) {
@@ -1023,7 +1023,7 @@ app.controller ('SystemController', function ($scope, $location, $http, $window,
if($scope.bridge.settings.domoticzaddress.devices[i].name === domoticzname && $scope.bridge.settings.domoticzaddress.devices[i].ip === domoticzip) {
$scope.bridge.settings.domoticzaddress.devices.splice(i, 1);
}
}
}
};
$scope.addSomfytoSettings = function (newsomfyname, newsomfyip, newsomfyusername, newsomfypassword) {
if($scope.bridge.settings.somfyaddress == null) {
@@ -1373,7 +1373,7 @@ app.controller('VeraController', function ($scope, $location, $http, bridgeServi
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -1398,7 +1398,7 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe
$scope.buildActivityUrls = function (harmonyactivity) {
onpayload = "{\"name\":\"" + harmonyactivity.activity.id + "\",\"hub\":\"" + harmonyactivity.hub + "\"}";
offpayload = "{\"name\":\"-1\",\"hub\":\"" + harmonyactivity.hub + "\"}";
offpayload = "{\"name\":\"-1\",\"hub\":\"" + harmonyactivity.hub + "\"}";
bridgeService.buildUrls(onpayload, null, offpayload, true, harmonyactivity.activity.id, harmonyactivity.activity.label, harmonyactivity.hub, "activity", "harmonyActivity", null, null);
$scope.device = bridgeService.state.device;
@@ -1434,7 +1434,7 @@ app.controller('HarmonyController', function ($scope, $location, $http, bridgeSe
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -1535,7 +1535,7 @@ app.controller('NestController', function ($scope, $location, $http, bridgeServi
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -1652,7 +1652,7 @@ app.controller('HueController', function ($scope, $location, $http, bridgeServic
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -1722,7 +1722,7 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
+ nameCmd
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ postCmd;
offpayload = "http://" + haldevice.haladdress
offpayload = "http://" + haldevice.haladdress
+ preOffCmd
+ nameCmd
+ haldevice.haldevicename.replaceAll(" ", "%20")
@@ -1755,17 +1755,17 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
};
$scope.buildHALHeatUrls = function (haldevice) {
onpayload = "http://" + haldevice.haladdress
onpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Heat?Token="
+ $scope.bridge.settings.haltoken;
dimpayload = "http://" + haldevice.haladdress
dimpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Heat!HeatSpValue=${intensity.percent}?Token="
+ $scope.bridge.settings.haltoken;
offpayload = "http://" + haldevice.haladdress
offpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Off?Token="
@@ -1777,17 +1777,17 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
};
$scope.buildHALCoolUrls = function (haldevice) {
onpayload = "http://" + haldevice.haladdress
onpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Cool?Token="
+ $scope.bridge.settings.haltoken;
dimpayload = "http://" + haldevice.haladdress
dimpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Cool!CoolSpValue=${intensity.percent}?Token="
+ $scope.bridge.settings.haltoken;
offpayload = "http://" + haldevice.haladdress
offpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Off?Token="
@@ -1799,12 +1799,12 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
};
$scope.buildHALAutoUrls = function (haldevice) {
onpayload = "http://" + haldevice.haladdress
onpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Auto?Token="
+ $scope.bridge.settings.haltoken;
offpayload = "http://" + haldevice.haladdress
offpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Off?Token="
@@ -1815,16 +1815,16 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
};
$scope.buildHALOffUrls = function (haldevice) {
onpayload = "http://" + haldevice.haladdress
onpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Auto?Token="
+ $scope.bridge.settings.haltoken;
offpayload = "http://" + haldevice.haladdress
offpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!HVACMode=Off?Token="
$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);
$scope.device = bridgeService.state.device;
bridgeService.editNewDevice($scope.device);
@@ -1832,12 +1832,12 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
};
$scope.buildHALFanUrls = function (haldevice) {
onpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
onpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!FanMode=On?Token="
+ $scope.bridge.settings.haltoken;
offpayload = "http://" + haldevice.haladdress
offpayload = "http://" + haldevice.haladdress
+ "/HVACService!HVACCmd=Set!HVACName="
+ haldevice.haldevicename.replaceAll(" ", "%20")
+ "!FanMode=Auto?Token="
@@ -1939,7 +1939,7 @@ app.controller('HalController', function ($scope, $location, $http, bridgeServic
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -1984,7 +1984,7 @@ app.controller('MQTTController', function ($scope, $location, $http, bridgeServi
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -2179,7 +2179,7 @@ app.controller('HassController', function ($scope, $location, $http, bridgeServi
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -2234,7 +2234,7 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
+ preCmd
+ domoticzdevice.idx
+ postOnCmd;
offpayload = "http://" + domoticzdevice.domoticzaddress
offpayload = "http://" + domoticzdevice.domoticzaddress
+ preCmd
+ domoticzdevice.idx
+ postOffCmd;
@@ -2330,7 +2330,7 @@ app.controller('DomoticzController', function ($scope, $location, $http, bridgeS
className: 'ngdialog-theme-default'
});
};
$scope.editDevice = function (device) {
bridgeService.editDevice(device);
$location.path('/editdevice');
@@ -2476,11 +2476,11 @@ app.controller('EditController', function ($scope, $location, $http, bridgeServi
if($scope.bridge.device.offUrl !== undefined)
$scope.offDevices = bridgeService.getCallObjects($scope.bridge.device.offUrl);
}
$scope.newOnItem = {};
$scope.newDimItem = {};
$scope.newOffItem = {};
$scope.mapTypeSelected = bridgeService.getMapType($scope.device.mapType);
$scope.mapTypeSelected = bridgeService.getMapType($scope.device.mapType);
$scope.device_dim_control = "";
$scope.imgButtonsUrl = "glyphicon glyphicon-plus";
$scope.buttonsVisible = false;
@@ -2546,7 +2546,7 @@ app.controller('EditController', function ($scope, $location, $http, bridgeServi
if($scope.onDevices[i].item === anItem.item && $scope.onDevices[i].type === anItem.type) {
$scope.onDevices.splice(i, 1);
}
}
}
};
$scope.addItemDim = function (anItem) {
@@ -2563,7 +2563,7 @@ app.controller('EditController', function ($scope, $location, $http, bridgeServi
if($scope.dimDevices[i].item === anItem.item && $scope.dimDevices[i].type === anItem.type) {
$scope.dimDevices.splice(i, 1);
}
}
}
};
$scope.addItemOff = function (anItem) {
@@ -2580,7 +2580,7 @@ app.controller('EditController', function ($scope, $location, $http, bridgeServi
if($scope.offDevices[i].item === anItem.item && $scope.offDevices[i].type === anItem.type) {
$scope.offDevices.splice(i, 1);
}
}
}
};
$scope.toggleButtons = function () {
$scope.buttonsVisible = !$scope.buttonsVisible;

View File

@@ -42,7 +42,7 @@
payload&quot;},{&quot;item&quot;:&quot;another payload&quot;}] to
execute multiple entries. Adding the value replacements
(${intensity..byte},${intensity.percent},${intensity.math(X*1)}) will
also work. Also, you can go back to any helper tab and click a build
also work. Also, you can go back to any helper tab and click a build
action button to add another item for a multi-command.</p>
<p>When copying, update the name and select the "Add Bridge
Device" Button.</p>

View File

@@ -30,7 +30,7 @@
<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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
for the Echo or Google Home. 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
@@ -132,7 +132,7 @@
</h2>
</div>
<div ng-if="buttonsVisible" class="panel-body">
<scrollable-table watch="bridge.haldevices">
<table class="table table-bordered table-striped table-hover">
<thead>

View File

@@ -30,7 +30,7 @@
<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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
will be the keyword for the Echo or Google Home. 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

View File

@@ -30,7 +30,7 @@
<p class="text-muted">For any Harmony Device and Buttons, 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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
to anything you want that will be the keyword for the Echo or Google Home. 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

View File

@@ -31,7 +31,7 @@
<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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
for the Echo or Google Home. 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

View File

@@ -26,7 +26,7 @@
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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
to anything you want that will be the keyword for the Echo or Google Home. 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

View File

@@ -30,7 +30,7 @@
<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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
for the Echo or Google Home. 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

View File

@@ -31,7 +31,7 @@
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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
for the Echo or Google Home. 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
@@ -50,7 +50,6 @@
feature. Select your items and dim control type if wanted, then click
bulk add below. Your items will be added with on and off or dim and
off if selected with the name of the device from the Vera.</p>
</div>
<scrollable-table watch="bridge.veradevices">
<table class="table table-bordered table-striped table-hover">
<thead>

View File

@@ -29,7 +29,7 @@
<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 the Echo or Google Home. Also, you can go back to any helper tab and click a build
for the Echo or Google Home. 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