[samsungtv] Fix reconnect after first connection to TV is lost (#11487)

* Fix reconnect after first connection to TV is lost.

Fixes #7055

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Reduced log level to TRACE for logging of entered methods several times per second.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
jlaur 2021-11-16 00:01:06 +01:00 committed by GitHub
parent 8c83c27c57
commit 43090b9b29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -375,6 +375,7 @@ public class SamsungTvHandler extends BaseThingHandler implements RegistryListen
logger.debug("Device removed: udn={}", upnpUDN); logger.debug("Device removed: udn={}", upnpUDN);
shutdown(); shutdown();
putOffline(); putOffline();
checkCreateManualConnection();
} }
} }

View File

@ -109,7 +109,7 @@ public class MainTVServerService implements UpnpIOParticipant, SamsungTvService
@Override @Override
public void handleCommand(String channel, Command command) { public void handleCommand(String channel, Command command) {
logger.debug("Received channel: {}, command: {}", channel, command); logger.trace("Received channel: {}, command: {}", channel, command);
if (!started) { if (!started) {
return; return;

View File

@ -174,7 +174,7 @@ public class RemoteControllerService implements SamsungTvService, RemoteControll
supported = new ArrayList<>(supported); supported = new ArrayList<>(supported);
supported.addAll(extraSupportedCommandsWebSocket); supported.addAll(extraSupportedCommandsWebSocket);
} }
logger.debug("getSupportedChannelNames: {}", supported); logger.trace("getSupportedChannelNames: {}", supported);
return supported; return supported;
} }
@ -254,7 +254,7 @@ public class RemoteControllerService implements SamsungTvService, RemoteControll
@Override @Override
public void handleCommand(String channel, Command command) { public void handleCommand(String channel, Command command) {
logger.debug("Received channel: {}, command: {}", channel, command); logger.trace("Received channel: {}, command: {}", channel, command);
if (command == RefreshType.REFRESH) { if (command == RefreshType.REFRESH) {
return; return;
} }