Merge PR #107: Mennekes: Discard unknown discovery results
commit
b4f5e1cca9
|
|
@ -83,6 +83,11 @@ void AmtronECUDiscovery::checkNetworkDevice(const NetworkDeviceInfo &networkDevi
|
||||||
cleanupConnection(connection);
|
cleanupConnection(connection);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (connection->firmwareVersion() == 0 || connection->model().isEmpty()) {
|
||||||
|
qCDebug(dcMennekes()) << "Firmware version or model invalid. Skipping" << networkDeviceInfo.address();
|
||||||
|
cleanupConnection(connection);
|
||||||
|
return;
|
||||||
|
}
|
||||||
Result result;
|
Result result;
|
||||||
result.firmwareVersion = connection->firmwareVersion();
|
result.firmwareVersion = connection->firmwareVersion();
|
||||||
result.model = connection->model();
|
result.model = connection->model();
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,12 @@ void AmtronHCC3Discovery::checkNetworkDevice(const NetworkDeviceInfo &networkDev
|
||||||
cleanupConnection(connection);
|
cleanupConnection(connection);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (connection->serialNumber() == 0 || connection->name().isEmpty()) {
|
||||||
|
qCDebug(dcMennekes()) << "Serial number or name invalid. Skipping" << networkDeviceInfo.address();
|
||||||
|
cleanupConnection(connection);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AmtronDiscoveryResult result;
|
AmtronDiscoveryResult result;
|
||||||
result.wallboxName = connection->name();
|
result.wallboxName = connection->name();
|
||||||
result.serialNumber = connection->serialNumber();
|
result.serialNumber = connection->serialNumber();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue