mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-20 16:59:53 +00:00
Update script for test on and off. Incorrect body sent for off commands
error return was interpretted incorrectly.
This commit is contained in:
@@ -348,7 +348,7 @@ app.controller('ViewingController', function ($scope, $location, $http, $window,
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -360,7 +360,7 @@ app.controller('ViewingController', function ($scope, $location, $http, $window,
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else if(device.httpVerb == "POST")
|
else if(device.httpVerb == "POST")
|
||||||
@@ -369,7 +369,7 @@ app.controller('ViewingController', function ($scope, $location, $http, $window,
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
@@ -382,7 +382,7 @@ app.controller('ViewingController', function ($scope, $location, $http, $window,
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -394,16 +394,16 @@ app.controller('ViewingController', function ($scope, $location, $http, $window,
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else if(device.httpVerb == "POST")
|
else if(device.httpVerb == "POST")
|
||||||
$http.post(device.offUrl, device.contentBody).then(
|
$http.post(device.offUrl, device.contentBodyOff).then(
|
||||||
function (response) {
|
function (response) {
|
||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
@@ -531,7 +531,7 @@ app.controller('AddingController', function ($scope, $location, $http, bridgeSer
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -543,7 +543,7 @@ app.controller('AddingController', function ($scope, $location, $http, bridgeSer
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else if(device.httpVerb == "POST")
|
else if(device.httpVerb == "POST")
|
||||||
@@ -552,7 +552,7 @@ app.controller('AddingController', function ($scope, $location, $http, bridgeSer
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
@@ -565,7 +565,7 @@ app.controller('AddingController', function ($scope, $location, $http, bridgeSer
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
@@ -577,16 +577,16 @@ app.controller('AddingController', function ($scope, $location, $http, bridgeSer
|
|||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else if(device.httpVerb == "POST")
|
else if(device.httpVerb == "POST")
|
||||||
$http.post(device.offUrl, device.contentBody).then(
|
$http.post(device.offUrl, device.contentBodyOff).then(
|
||||||
function (response) {
|
function (response) {
|
||||||
$window.alert("Request Exceuted: " + response.statusText);
|
$window.alert("Request Exceuted: " + response.statusText);
|
||||||
},
|
},
|
||||||
function (error) {
|
function (error) {
|
||||||
$window.alert("Request Error: " + error.data.message);
|
$window.alert("Request Error: " + error.statusText + ", with status: " + error.status + ", Pleae look in your console log.");
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user