From e62f3af4c7173145f6f2742e3a88631f5c5fdbb8 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Thu, 15 Aug 2024 15:48:13 +0200 Subject: [PATCH] [freeboxos] Add channels in group xdsl (#17260) Follow-up #17219 Fixes #17073 * Category added * Change ffth and xdsl group labels Signed-off-by: Laurent Garnier --- .../internal/FreeboxOsBindingConstants.java | 6 ++++ .../internal/api/rest/ConnectionManager.java | 6 ++-- .../internal/handler/ServerHandler.java | 9 ++++++ .../OH-INF/i18n/freeboxos.properties | 17 ++++++++-- .../resources/OH-INF/thing/channel-types.xml | 31 +++++++++++++++++++ .../OH-INF/thing/server-channel-groups.xml | 12 ++++--- .../resources/OH-INF/update/instructions.xml | 26 ++++++++++++++++ 7 files changed, 97 insertions(+), 10 deletions(-) diff --git a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/FreeboxOsBindingConstants.java b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/FreeboxOsBindingConstants.java index 1493fcb07b7..9c588c33438 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/FreeboxOsBindingConstants.java +++ b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/FreeboxOsBindingConstants.java @@ -168,6 +168,12 @@ public class FreeboxOsBindingConstants { public static final String SFP_PWR_TX = "sfp-pwr-tx"; public static final String SFP_PWR_RX = "sfp-pwr-rx"; + // xDSL channels ids + public static final String XDSL_READY = "ready"; + public static final String XDSL_STATUS = "status"; + public static final String XDSL_MODULATION = "modulation"; + public static final String XDSL_UPTIME = "uptime"; + // Home channels public static final String KEYFOB_ENABLE = "enable"; public static final String NODE_BATTERY = "battery"; diff --git a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/rest/ConnectionManager.java b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/rest/ConnectionManager.java index 29524c48969..bb73b0b5ec0 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/rest/ConnectionManager.java +++ b/bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/rest/ConnectionManager.java @@ -107,7 +107,7 @@ public class ConnectionManager extends ConfigurableRest + + Switch + + ON when xDSL line connection is synchronized + Switch + + + + + String + + Status of xDSL line connection + + + + + + + + + + + + + + + String + + + + diff --git a/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/server-channel-groups.xml b/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/server-channel-groups.xml index 718522ab008..4d54daf1b5d 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/server-channel-groups.xml +++ b/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/thing/server-channel-groups.xml @@ -53,7 +53,7 @@ - + @@ -72,10 +72,14 @@ - + - - + + + + + Time since last synchronization + diff --git a/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/update/instructions.xml b/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/update/instructions.xml index 6c55043af4c..8de3e5be224 100644 --- a/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/update/instructions.xml +++ b/bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/update/instructions.xml @@ -54,6 +54,19 @@ SFP Power in reception + + freeboxos:xdsl-ready + + + freeboxos:xdsl-status + + + freeboxos:xdsl-modulation + + + freeboxos:uptime + Time since last synchronization + @@ -86,6 +99,19 @@ SFP Power in reception + + freeboxos:xdsl-ready + + + freeboxos:xdsl-status + + + freeboxos:xdsl-modulation + + + freeboxos:uptime + Time since last synchronization +