diff --git a/goecharger/goediscovery.cpp b/goecharger/goediscovery.cpp index b6129c53..d87eed49 100644 --- a/goecharger/goediscovery.cpp +++ b/goecharger/goediscovery.cpp @@ -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; diff --git a/goecharger/integrationplugingoecharger.cpp b/goecharger/integrationplugingoecharger.cpp index 837d51cb..3e716377 100644 --- a/goecharger/integrationplugingoecharger.cpp +++ b/goecharger/integrationplugingoecharger.cpp @@ -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 ¶mT 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; - } }