Reenable invalid version check
This commit is contained in:
parent
c3f1f41e64
commit
8a2d0d9852
@ -151,9 +151,8 @@ void IntegrationPluginFronius::setupThing(ThingSetupInfo *info)
|
|||||||
// Knwon version with broken JSON API
|
// Knwon version with broken JSON API
|
||||||
if (versionResponseMap.value("CompatibilityRange").toString() == "1.6-2") {
|
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.";
|
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."));
|
||||||
// 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;
|
||||||
// return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FroniusLogger *newLogger = new FroniusLogger(thing, this);
|
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
|
// parse reply for meter things at the host address
|
||||||
QVariantMap meterMap = bodyMap.value("Data").toMap().value("Meter").toMap();
|
QVariantMap meterMap = bodyMap.value("Data").toMap().value("Meter").toMap();
|
||||||
foreach (const QString &meterId, meterMap.keys()) {
|
foreach (const QString &meterId, meterMap.keys()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user