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");
}
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());
}
}
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());
}
}
if (api != null) {
try {
api.dispose();
- } catch (LinkyException ignore) {
+ } catch (LinkyException e) {
+ logger.debug("disconnect: {}", e.getMessage());
}
}
}