From: Ondrej Pecta Date: Sun, 19 May 2024 11:31:14 +0000 (+0200) Subject: [somfytahoma] force the gateway discovery if the LAN mode is not working (#16751) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=045065f7ad6a533f6664df7ee2f01d971ed9fa9b;p=openhab-addons.git [somfytahoma] force the gateway discovery if the LAN mode is not working (#16751) Signed-off-by: Ondrej Pecta --- diff --git a/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/handler/SomfyTahomaBridgeHandler.java b/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/handler/SomfyTahomaBridgeHandler.java index 0b1a79dce1..babfd7ca92 100644 --- a/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/handler/SomfyTahomaBridgeHandler.java +++ b/bundles/org.openhab.binding.somfytahoma/src/main/java/org/openhab/binding/somfytahoma/internal/handler/SomfyTahomaBridgeHandler.java @@ -307,8 +307,15 @@ public class SomfyTahomaBridgeHandler extends BaseBridgeHandler { isDevModeReady() ? "LAN mode" : cloudFallback ? "Cloud mode fallback" : "Cloud mode"); } else { logger.debug("Events id error: {}", id); - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, - "unable to register events"); + if (!thingConfig.isDevMode()) { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, + "unable to register events"); + } else { + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, + "LAN mode is not properly configured"); + logger.debug("Forcing the gateway discovery"); + discoverGateway(); + } } } } catch (JsonSyntaxException e) {