mirror of
https://github.com/mtan93/homebridge.git
synced 2026-04-18 06:13:11 +01:00
Added more logging when there's an error getting device details.
This commit is contained in:
@@ -80,14 +80,16 @@ IndigoPlatform.prototype = {
|
|||||||
|
|
||||||
request(deviceOptions, function(deviceError, deviceResponse, deviceBody) {
|
request(deviceOptions, function(deviceError, deviceResponse, deviceBody) {
|
||||||
if (deviceError) {
|
if (deviceError) {
|
||||||
asyncCallback(deviceError);
|
console.trace("Requesting Indigo device info: " + deviceURL + "\nError: " + deviceError + "\nResponse: " + deviceBody);
|
||||||
|
asyncCallback(deviceError)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var deviceJson = JSON.parse(deviceBody);
|
||||||
|
that.log("Discovered " + deviceJson.type + ": " + deviceJson.name);
|
||||||
|
that.foundAccessories.push(
|
||||||
|
new IndigoAccessory(that.log, that.auth, deviceURL, deviceJson));
|
||||||
|
asyncCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
var deviceJson = JSON.parse(deviceBody);
|
|
||||||
that.log("Discovered " + deviceJson.type + ": " + deviceJson.name);
|
|
||||||
that.foundAccessories.push(
|
|
||||||
new IndigoAccessory(that.log, that.auth, deviceURL, deviceJson));
|
|
||||||
asyncCallback();
|
|
||||||
});
|
});
|
||||||
}, function(asyncError) {
|
}, function(asyncError) {
|
||||||
// This will be called after all the requests complete
|
// This will be called after all the requests complete
|
||||||
|
|||||||
Reference in New Issue
Block a user