From 4d2b9aeac308189553dd2198b5e07fd9eeb8e542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Wed, 15 Nov 2023 12:07:33 +0100 Subject: [PATCH] Webasto: Make sure EVC04 based wallboxes do not get discovered as Webasto NEXT --- webasto/webastodiscovery.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/webasto/webastodiscovery.cpp b/webasto/webastodiscovery.cpp index 6a1d986..5ee81f9 100644 --- a/webasto/webastodiscovery.cpp +++ b/webasto/webastodiscovery.cpp @@ -143,6 +143,21 @@ void WebastoDiscovery::checkNetworkDevice(const NetworkDeviceInfo &networkDevice // All values good so far, let's assume this is a Webasto NEXT + // Final check if there is a hostname available for this network device, if so it shouls contain the string "NEXT_". + // This is neccessary since Wallboxes from Vestel EVC04 aka. Webasto Unite wallboxes would also match + // the creteria up to here get detected as positiv Webasto NEXT. + + // Example hostname: NEXT-WS10XXXX + + if (!networkDeviceInfo.hostName().isEmpty() && + (!networkDeviceInfo.hostName().contains("NEXT_") || networkDeviceInfo.hostName().contains("VESTEL"))) { + qCDebug(dcWebasto()) << "Discovery: network device has a hostname and it does match kriteria for Webasto next:" << networkDeviceInfo.hostName() << "on" << networkDeviceInfo.address().toString() << "Continue...";; + cleanupConnection(connection); + return; + } + + // Hostname verification also OK, let's assume this is a Webasto NEXT + Result result; result.productName = "Webasto NEXT"; result.type = TypeWebastoNext;