diff --git a/sunspec/integrationpluginsunspec.cpp b/sunspec/integrationpluginsunspec.cpp index ba53d11..3d38565 100644 --- a/sunspec/integrationpluginsunspec.cpp +++ b/sunspec/integrationpluginsunspec.cpp @@ -556,11 +556,11 @@ void IntegrationPluginSunSpec::setupConnection(ThingSetupInfo *info) SunSpecConnection *connection = nullptr; if (thing->thingClassId() == solarEdgeConnectionThingClassId) { - connection = new SunSpecConnection(address, port, slaveId, this); - } else { // Note: for some reason, solar edge is using big endian register order instead // of little endian as specified in sunspec and even solar edge documentation connection = new SunSpecConnection(address, port, slaveId, SunSpecDataPoint::ByteOrderBigEndian, this); + } else { + connection = new SunSpecConnection(address, port, slaveId, this); } connection->setTimeout(configValue(sunSpecPluginTimeoutParamTypeId).toUInt()); connection->setNumberOfRetries(configValue(sunSpecPluginNumberOfRetriesParamTypeId).toUInt());