Fix handling of IP address changes
This commit is contained in:
parent
36a5aece0d
commit
a61e6fd244
@ -291,6 +291,12 @@ void IntegrationPluginKeba::searchNetworkDevices()
|
|||||||
if (existingThing->paramValue(wallboxThingIpAddressParamTypeId).toString() != networkDevice.address().toString()) {
|
if (existingThing->paramValue(wallboxThingIpAddressParamTypeId).toString() != networkDevice.address().toString()) {
|
||||||
qCDebug(dcKebaKeContact()) << "Keba Wallbox IP Address has changed, from" << existingThing->paramValue(wallboxThingIpAddressParamTypeId).toString() << "to" << networkDevice.address().toString();
|
qCDebug(dcKebaKeContact()) << "Keba Wallbox IP Address has changed, from" << existingThing->paramValue(wallboxThingIpAddressParamTypeId).toString() << "to" << networkDevice.address().toString();
|
||||||
existingThing->setParamValue(wallboxThingIpAddressParamTypeId, networkDevice.address().toString());
|
existingThing->setParamValue(wallboxThingIpAddressParamTypeId, networkDevice.address().toString());
|
||||||
|
KeContact *keba = m_kebaDevices.value(existingThing->id());
|
||||||
|
if (keba) {
|
||||||
|
keba->setAddress(QHostAddress(networkDevice.address()));
|
||||||
|
} else {
|
||||||
|
qCWarning(dcKebaKeContact()) << "Could not update IP address, for" << existingThing;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
qCDebug(dcKebaKeContact()) << "Keba Wallbox" << existingThing->name() << "IP address has not changed" << networkDevice.address().toString();
|
qCDebug(dcKebaKeContact()) << "Keba Wallbox" << existingThing->name() << "IP address has not changed" << networkDevice.address().toString();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user