go-E: Disable unsupported IPv6 discovery

This commit is contained in:
Simon Stürz 2024-11-18 10:15:05 +01:00
parent a35312b7f2
commit 7763c38795
2 changed files with 3 additions and 4 deletions

View File

@ -256,7 +256,7 @@ void GoeDiscovery::onServiceEntryAdded(const ZeroConfServiceEntry &serviceEntry)
// which spoof the mac address and multipe IP have the same mac address. Using zeroconf and have IP based discovery
// solves this issue
if (isGoeCharger(serviceEntry)) {
if (isGoeCharger(serviceEntry) && serviceEntry.protocol() == QAbstractSocket::IPv4Protocol) {
qCDebug(dcGoECharger()) << "Discovery: Found ZeroConf go-eCharger" << serviceEntry;
GoeDiscovery::Result result;

View File

@ -578,7 +578,7 @@ QHostAddress IntegrationPluginGoECharger::getHostAddress(Thing *thing)
return m_monitors.value(thing)->networkDeviceInfo().address();
foreach (const ZeroConfServiceEntry &serviceEntry, m_serviceBrowser->serviceEntries()) {
if (GoeDiscovery::isGoeCharger(serviceEntry)) {
if (GoeDiscovery::isGoeCharger(serviceEntry) && serviceEntry.protocol() == QAbstractSocket::IPv4Protocol) {
QString serial = serviceEntry.txt("serial");
if (thing->paramValue(goeHomeThingSerialNumberParamTypeId).toString() == serial) {
return serviceEntry.hostAddress();
@ -1619,9 +1619,8 @@ void IntegrationPluginGoECharger::onConfigValueChanged(const ParamTypeId &paramT
void IntegrationPluginGoECharger::onServiceEntryAdded(const ZeroConfServiceEntry &serviceEntry)
{
if (GoeDiscovery::isGoeCharger(serviceEntry)) {
if (GoeDiscovery::isGoeCharger(serviceEntry) && serviceEntry.protocol() == QAbstractSocket::IPv4Protocol) {
qCDebug(dcGoECharger()) << "Found ZeroConf go-eCharger:" << serviceEntry;
}
}