Fixed SAT findings for new SAT 0.11.1 release (#10518)

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
Christoph Weitkamp
2021-04-14 15:11:31 +02:00
committed by GitHub
parent 9e4b67ee09
commit a04cfd3389
28 changed files with 88 additions and 43 deletions

View File

@@ -56,4 +56,4 @@ The following channels are supported by the binding. Note that specific weather
Bridge somfymylink:mylink:mylink1 "myLink Bridge" @ "Office" [ ipAddress="192.168.1.1", systemId="mysystemidhere" ] {
Thing shade shade1 "Living Room" [ targetId="CC114A21.1" ]
}
```
```

View File

@@ -12,7 +12,7 @@
*/
package org.openhab.binding.somfymylink.internal.handler;
import static org.openhab.binding.somfymylink.internal.SomfyMyLinkBindingConstants.*;
import static org.openhab.binding.somfymylink.internal.SomfyMyLinkBindingConstants.CHANNEL_SCENES;
import java.io.BufferedReader;
import java.io.IOException;
@@ -23,7 +23,11 @@ import java.io.Writer;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@@ -179,7 +183,6 @@ public class SomfyMyLinkBridgeHandler extends BaseBridgeHandler {
SomfyMyLinkCommandShadePing command = new SomfyMyLinkCommandShadePing(config.systemId);
sendCommandWithResponse(command, SomfyMyLinkPingResponse.class).get();
updateStatus(ThingStatus.ONLINE);
} catch (SomfyMyLinkException | InterruptedException | ExecutionException e) {
logger.warn("Problem with mylink during heartbeat: {}", e.getMessage());
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getMessage());
@@ -298,7 +301,6 @@ public class SomfyMyLinkBridgeHandler extends BaseBridgeHandler {
Writer out = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.US_ASCII);
BufferedReader in = new BufferedReader(
new InputStreamReader(socket.getInputStream(), StandardCharsets.US_ASCII))) {
// send the command
logger.debug("Sending: {}", json);
out.write(json);