From 045065f7ad6a533f6664df7ee2f01d971ed9fa9b Mon Sep 17 00:00:00 2001 From: Ondrej Pecta Date: Sun, 19 May 2024 13:31:14 +0200 Subject: [PATCH] [somfytahoma] force the gateway discovery if the LAN mode is not working (#16751) Signed-off-by: Ondrej Pecta --- .../internal/handler/SomfyTahomaBridgeHandler.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) { -- 2.47.3