adjust devicestatus upload timings
This commit is contained in:
parent
a1529b3438
commit
c31795d2e6
2 changed files with 2 additions and 2 deletions
|
@ -925,7 +925,7 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
||||||
DeviceStatus deviceStatus = new DeviceStatus();
|
DeviceStatus deviceStatus = new DeviceStatus();
|
||||||
try {
|
try {
|
||||||
LoopPlugin.LastRun lastRun = LoopPlugin.lastRun;
|
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
|
// do not send if result is older than 1 min
|
||||||
APSResult apsResult = lastRun.request;
|
APSResult apsResult = lastRun.request;
|
||||||
apsResult.json().put("timestamp", DateUtil.toISOString(lastRun.lastAPSRun));
|
apsResult.json().put("timestamp", DateUtil.toISOString(lastRun.lastAPSRun));
|
||||||
|
|
|
@ -228,7 +228,7 @@ public class LoopPlugin implements PluginBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
MainApp.bus().post(new EventLoopUpdateGui());
|
MainApp.bus().post(new EventLoopUpdateGui());
|
||||||
MainApp.getConfigBuilder().uploadDeviceStatus(15);
|
MainApp.getConfigBuilder().uploadDeviceStatus(120);
|
||||||
} finally {
|
} finally {
|
||||||
if (Config.logFunctionCalls)
|
if (Config.logFunctionCalls)
|
||||||
log.debug("invoke end");
|
log.debug("invoke end");
|
||||||
|
|
Loading…
Reference in a new issue