Reenable invalid version check

pull/507/head
Simon Stürz 2021-12-03 12:43:12 +01:00
parent c3f1f41e64
commit 8a2d0d9852
1 changed files with 2 additions and 15 deletions

View File

@ -151,9 +151,8 @@ void IntegrationPluginFronius::setupThing(ThingSetupInfo *info)
// Knwon version with broken JSON API
if (versionResponseMap.value("CompatibilityRange").toString() == "1.6-2") {
qCWarning(dcFronius()) << "The Fronius data logger has a version which is known to have a broken JSON API firmware.";
// FIXME: temporary disable the version check in order to try to make it work nether the less
// info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("The firmware version 1.6-2 of this Fronius data logger has a broken API. Please update your Fronius device."));
// return;
info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("The firmware version 1.6-2 of this Fronius data logger has a broken API. Please update your Fronius device."));
return;
}
FroniusLogger *newLogger = new FroniusLogger(thing, this);
@ -421,18 +420,6 @@ void IntegrationPluginFronius::searchNewThings(FroniusLogger *logger)
}
}
// Note: in case of well known broken API version 1.6-2 the inverter map is broken and contains "1": { ...
if (bodyMap.value("Data").toMap().contains("1")) {
if (!thingExists(inverterThingIdParamTypeId, "1")) {
QString thingName = loggerThing->name() + " Inverter " + "1";
ThingDescriptor descriptor(inverterThingClassId, thingName, "Fronius Solar Inverter", loggerThing->id());
ParamList params;
params.append(Param(inverterThingIdParamTypeId, 1));
descriptor.setParams(params);
thingDescriptors.append(descriptor);
}
}
// parse reply for meter things at the host address
QVariantMap meterMap = bodyMap.value("Data").toMap().value("Meter").toMap();
foreach (const QString &meterId, meterMap.keys()) {