Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linky] Few debug logs added #11647

Merged
merged 1 commit into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public void initialize() throws LinkyException {
if (authData == null || authData.callbacks.size() < 2 || authData.callbacks.get(0).input.isEmpty()
|| authData.callbacks.get(1).input.isEmpty() || !config.username
.equals(Objects.requireNonNull(authData.callbacks.get(0).input.get(0)).valueAsString())) {
logger.debug("auth1 - invalid template for auth data: {}", result.getContentAsString());
throw new LinkyException("Authentication error, the authentication_cookie is probably wrong");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ private List<String> buildReport(LocalDate startDay, LocalDate endDay, @Nullable
updateStatus(ThingStatus.ONLINE);
return consumption;
} catch (LinkyException e) {
logger.debug("Exception when getting consumption data: {}", e.getMessage(), e);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, e.getMessage());
}
}
Expand All @@ -385,6 +386,7 @@ private List<String> buildReport(LocalDate startDay, LocalDate endDay, @Nullable
updateStatus(ThingStatus.ONLINE);
return consumption;
} catch (LinkyException e) {
logger.debug("Exception when getting power data: {}", e.getMessage(), e);
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, e.getMessage());
}
}
Expand All @@ -401,7 +403,8 @@ private void disconnect() {
if (api != null) {
try {
api.dispose();
} catch (LinkyException ignore) {
} catch (LinkyException e) {
logger.debug("disconnect: {}", e.getMessage());
}
}
}
Expand Down