Mennekes: Reject wallboxes where the firmware is too old
parent
015e25ee13
commit
9a8377f93a
|
|
@ -389,6 +389,16 @@ void IntegrationPluginMennekes::setupAmtronECUConnection(ThingSetupInfo *info)
|
||||||
}
|
}
|
||||||
|
|
||||||
qCDebug(dcMennekes()) << "Connection init finished successfully" << amtronECUConnection;
|
qCDebug(dcMennekes()) << "Connection init finished successfully" << amtronECUConnection;
|
||||||
|
|
||||||
|
QString minimumVersion = "5.22";
|
||||||
|
if (!ensureAmtronECUVersion(amtronECUConnection, minimumVersion)) {
|
||||||
|
qCWarning(dcMennekes()) << "Firmware version too old:" << QByteArray::fromHex(QByteArray::number(amtronECUConnection->firmwareVersion(), 16)) << "Minimum required:" << minimumVersion;
|
||||||
|
hardwareManager()->networkDeviceDiscovery()->unregisterMonitor(monitor);
|
||||||
|
amtronECUConnection->deleteLater();
|
||||||
|
info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("The firmware version of this wallbox is too old. Please upgrade the firmware to at least version 5.22."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_amtronECUConnections.insert(thing, amtronECUConnection);
|
m_amtronECUConnections.insert(thing, amtronECUConnection);
|
||||||
info->finish(Thing::ThingErrorNoError);
|
info->finish(Thing::ThingErrorNoError);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,23 +9,28 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../integrationpluginmennekes.cpp" line="127"/>
|
<location filename="../integrationpluginmennekes.cpp" line="133"/>
|
||||||
<location filename="../integrationpluginmennekes.cpp" line="177"/>
|
<location filename="../integrationpluginmennekes.cpp" line="183"/>
|
||||||
<source>The MAC address is not known. Please reconfigure the thing.</source>
|
<source>The MAC address is not known. Please reconfigure the thing.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../integrationpluginmennekes.cpp" line="138"/>
|
<location filename="../integrationpluginmennekes.cpp" line="144"/>
|
||||||
<location filename="../integrationpluginmennekes.cpp" line="188"/>
|
<location filename="../integrationpluginmennekes.cpp" line="194"/>
|
||||||
<source>The host address is not known yet. Trying later again.</source>
|
<source>The host address is not known yet. Trying later again.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../integrationpluginmennekes.cpp" line="372"/>
|
<location filename="../integrationpluginmennekes.cpp" line="387"/>
|
||||||
<location filename="../integrationpluginmennekes.cpp" line="497"/>
|
<location filename="../integrationpluginmennekes.cpp" line="515"/>
|
||||||
<source>Error communicating with the wallbox.</source>
|
<source>Error communicating with the wallbox.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../integrationpluginmennekes.cpp" line="398"/>
|
||||||
|
<source>The firmware version of this wallbox is too old. Please upgrade the firmware to at least version 5.22.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Mennekes</name>
|
<name>Mennekes</name>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue