[linky] Few debug logs added (#11647)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
addb990a5b
commit
e0f72d5a7c
|
@ -120,6 +120,7 @@ public class EnedisHttpApi {
|
||||||
if (authData == null || authData.callbacks.size() < 2 || authData.callbacks.get(0).input.isEmpty()
|
if (authData == null || authData.callbacks.size() < 2 || authData.callbacks.get(0).input.isEmpty()
|
||||||
|| authData.callbacks.get(1).input.isEmpty() || !config.username
|
|| authData.callbacks.get(1).input.isEmpty() || !config.username
|
||||||
.equals(Objects.requireNonNull(authData.callbacks.get(0).input.get(0)).valueAsString())) {
|
.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");
|
throw new LinkyException("Authentication error, the authentication_cookie is probably wrong");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -369,6 +369,7 @@ public class LinkyHandler extends BaseThingHandler {
|
||||||
updateStatus(ThingStatus.ONLINE);
|
updateStatus(ThingStatus.ONLINE);
|
||||||
return consumption;
|
return consumption;
|
||||||
} catch (LinkyException e) {
|
} catch (LinkyException e) {
|
||||||
|
logger.debug("Exception when getting consumption data: {}", e.getMessage(), e);
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, e.getMessage());
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -385,6 +386,7 @@ public class LinkyHandler extends BaseThingHandler {
|
||||||
updateStatus(ThingStatus.ONLINE);
|
updateStatus(ThingStatus.ONLINE);
|
||||||
return consumption;
|
return consumption;
|
||||||
} catch (LinkyException e) {
|
} catch (LinkyException e) {
|
||||||
|
logger.debug("Exception when getting power data: {}", e.getMessage(), e);
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, e.getMessage());
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -401,7 +403,8 @@ public class LinkyHandler extends BaseThingHandler {
|
||||||
if (api != null) {
|
if (api != null) {
|
||||||
try {
|
try {
|
||||||
api.dispose();
|
api.dispose();
|
||||||
} catch (LinkyException ignore) {
|
} catch (LinkyException e) {
|
||||||
|
logger.debug("disconnect: {}", e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue