mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-21 05:10:56 +00: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) {
|
||||
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) {
|
||||
// This will be called after all the requests complete
|
||||
|
||||
Reference in New Issue
Block a user