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 <noreply@anthropic.com>master
parent
8ddd388e80
commit
957ab589cb
|
|
@ -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 <dev@etm-schurig.eu> 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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue