From 957ab589cb3ac16c60db386af396936853198968 Mon Sep 17 00:00:00 2001 From: pakutz79 Date: Wed, 1 Apr 2026 08:37:57 +0200 Subject: [PATCH] Keba: fallback to direct IP in discovery address param When thingParamValueAddress() returns empty (because MAC is known and IP is tracked dynamically), fill the address param with the UDP source IP so the user can see it in the setup UI. Co-Authored-By: Claude Sonnet 4.6 --- debian-qt5/changelog | 6 ++++++ keba/integrationpluginkeba.cpp | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian-qt5/changelog b/debian-qt5/changelog index 34c180f8..7c4a86df 100644 --- a/debian-qt5/changelog +++ b/debian-qt5/changelog @@ -1,3 +1,9 @@ +nymea-plugins (1.14.2+etm3) powersync-stable; urgency=low + + * Keba: show IP address in setup params when thingParamValueAddress is empty (fallback to direct IP) + + -- ETM Schurig Tue, 01 Apr 2026 09:00:00 +0200 + nymea-plugins (1.14.2+etm2) powersync-stable; urgency=high * Keba: fix product code parser for PV-Edition Shutter connector (KC-P30-ESS400U2-E00-PV) diff --git a/keba/integrationpluginkeba.cpp b/keba/integrationpluginkeba.cpp index 75bdd2e8..07bbef4c 100644 --- a/keba/integrationpluginkeba.cpp +++ b/keba/integrationpluginkeba.cpp @@ -113,7 +113,11 @@ void IntegrationPluginKeba::discoverThings(ThingDiscoveryInfo *info) ParamList params; params << Param(m_macAddressParamTypeIds.value(discoveredThingClassId), result.networkDeviceInfo.thingParamValueMacAddress()); params << Param(m_hostNameParamTypeIds.value(discoveredThingClassId), result.networkDeviceInfo.thingParamValueHostName()); - params << Param(m_addressParamTypeIds.value(discoveredThingClassId), result.networkDeviceInfo.thingParamValueAddress()); + // Fallback to direct IP when thingParamValueAddress() is empty (occurs when MAC is known and IP is tracked dynamically) + QString addressValue = result.networkDeviceInfo.thingParamValueAddress(); + if (addressValue.isEmpty()) + addressValue = result.address.toString(); + params << Param(m_addressParamTypeIds.value(discoveredThingClassId), addressValue); params << Param(m_modelParamTypeIds.value(discoveredThingClassId), result.product); params << Param(m_serialNumberParamTypeIds.value(discoveredThingClassId), result.serialNumber); descriptor.setParams(params);