diff --git a/mennekes/amtronecudiscovery.cpp b/mennekes/amtronecudiscovery.cpp index 27c3eaa..fde1c85 100644 --- a/mennekes/amtronecudiscovery.cpp +++ b/mennekes/amtronecudiscovery.cpp @@ -83,6 +83,11 @@ void AmtronECUDiscovery::checkNetworkDevice(const NetworkDeviceInfo &networkDevi cleanupConnection(connection); return; } + if (connection->firmwareVersion() == 0 || connection->model().isEmpty()) { + qCDebug(dcMennekes()) << "Firmware version or model invalid. Skipping" << networkDeviceInfo.address(); + cleanupConnection(connection); + return; + } Result result; result.firmwareVersion = connection->firmwareVersion(); result.model = connection->model(); diff --git a/mennekes/amtronhcc3discovery.cpp b/mennekes/amtronhcc3discovery.cpp index 873e1e9..bd5c7d8 100644 --- a/mennekes/amtronhcc3discovery.cpp +++ b/mennekes/amtronhcc3discovery.cpp @@ -85,6 +85,12 @@ void AmtronHCC3Discovery::checkNetworkDevice(const NetworkDeviceInfo &networkDev cleanupConnection(connection); return; } + if (connection->serialNumber() == 0 || connection->name().isEmpty()) { + qCDebug(dcMennekes()) << "Serial number or name invalid. Skipping" << networkDeviceInfo.address(); + cleanupConnection(connection); + return; + } + AmtronDiscoveryResult result; result.wallboxName = connection->name(); result.serialNumber = connection->serialNumber();