if (acceptProcessing != null) {
acceptProcessing.run();
}
- logger.trace("Result code={}, body={}", v.getResponseCode(), v.getBody());
+ if (v.getResponseCode() != java.net.HttpURLConnection.HTTP_OK) {
+ logger.warn("Sending command {} to channel {} failed: {} - {}", originalCommand, channelUID,
+ v.getResponseCode(), v.getBody());
+ } else {
+ logger.trace("Result code={}, body={}", v.getResponseCode(), v.getBody());
+ }
}).exceptionally(e -> {
- logger.debug("Sending command {} to channel {} failed: {} - {}", originalCommand, channelUID, e.getClass(),
+ logger.warn("Sending command {} to channel {} failed: {} - {}", originalCommand, channelUID, e.getClass(),
e.getMessage());
return null;
});
public enum ResourceType {
GROUPS("groups", "action"),
LIGHTS("lights", "state"),
- SENSORS("sensors", ""),
+ SENSORS("sensors", "config"),
UNKNOWN("", "");
private static final Map<String, ResourceType> MAPPING = Arrays.stream(ResourceType.values())