Amperfied: Verify version number durin discovery
parent
ac47803265
commit
8f2aa88000
|
|
@ -85,6 +85,13 @@ void ConnectHomeDiscovery::checkNetworkDevice(const NetworkDeviceInfo &networkDe
|
|||
cleanupConnection(connection);
|
||||
return;
|
||||
}
|
||||
|
||||
if (connection->version() < 0x100 || connection->version() > 0x2ff) {
|
||||
qCInfo(dcAmperfied()) << "Skipping invalid/unsupported AMPERFIED version" << connection->version();
|
||||
cleanupConnection(connection);
|
||||
return;
|
||||
}
|
||||
|
||||
Result result;
|
||||
result.firmwareVersion = connection->version();
|
||||
result.networkDeviceInfo = networkDeviceInfo;
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ IntegrationPluginAmperfied::IntegrationPluginAmperfied()
|
|||
|
||||
void IntegrationPluginAmperfied::discoverThings(ThingDiscoveryInfo *info)
|
||||
{
|
||||
hardwareManager()->modbusRtuResource();
|
||||
|
||||
if (info->thingClassId() == energyControlThingClassId) {
|
||||
EnergyControlDiscovery *discovery = new EnergyControlDiscovery(hardwareManager()->modbusRtuResource(), info);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue