adjust devicestatus upload timings

This commit is contained in:
Milos Kozak 2017-02-13 17:47:58 +01:00
parent a1529b3438
commit c31795d2e6
2 changed files with 2 additions and 2 deletions

View file

@ -925,7 +925,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
DeviceStatus deviceStatus = new DeviceStatus();
try {
LoopPlugin.LastRun lastRun = LoopPlugin.lastRun;
if (lastRun != null && lastRun.lastAPSRun.getTime() > new Date().getTime() - 60 * 1000L) {
if (lastRun != null && lastRun.lastAPSRun.getTime() > new Date().getTime() - 300 * 1000L) {
// do not send if result is older than 1 min
APSResult apsResult = lastRun.request;
apsResult.json().put("timestamp", DateUtil.toISOString(lastRun.lastAPSRun));

View file

@ -228,7 +228,7 @@ public class LoopPlugin implements PluginBase {
}
MainApp.bus().post(new EventLoopUpdateGui());
MainApp.getConfigBuilder().uploadDeviceStatus(15);
MainApp.getConfigBuilder().uploadDeviceStatus(120);
} finally {
if (Config.logFunctionCalls)
log.debug("invoke end");