shortened polling interval

This commit is contained in:
Boernsman 2021-02-28 22:18:29 +01:00 committed by Simon Stürz
parent ab26a22d00
commit 93bb41caf9

View File

@ -77,7 +77,7 @@ void IntegrationPluginSma::setupThing(ThingSetupInfo *info)
if (!m_refreshTimer) { if (!m_refreshTimer) {
qCDebug(dcSma()) << "Starting refresh timer"; qCDebug(dcSma()) << "Starting refresh timer";
m_refreshTimer = hardwareManager()->pluginTimerManager()->registerTimer(30); m_refreshTimer = hardwareManager()->pluginTimerManager()->registerTimer(1);
connect(m_refreshTimer, &PluginTimer::timeout, this, &IntegrationPluginSma::onRefreshTimer); connect(m_refreshTimer, &PluginTimer::timeout, this, &IntegrationPluginSma::onRefreshTimer);
} }
@ -118,7 +118,7 @@ void IntegrationPluginSma::postSetupThing(Thing *thing)
SunnyWebBox *sunnyWebBox = m_sunnyWebBoxes.value(thing); SunnyWebBox *sunnyWebBox = m_sunnyWebBoxes.value(thing);
if (!sunnyWebBox) if (!sunnyWebBox)
return; return;
sunnyWebBox->getDevices(); sunnyWebBox->getPlantOverview();
thing->setStateValue(sunnyWebBoxConnectedStateTypeId, true); thing->setStateValue(sunnyWebBoxConnectedStateTypeId, true);
} }
} }