prevent missing pump status in NS

This commit is contained in:
Milos Kozak 2020-07-27 15:21:36 +02:00
parent 007df3aab3
commit b7221aa286
3 changed files with 3 additions and 3 deletions

View file

@ -326,7 +326,7 @@ public abstract class PumpPluginAbstract extends PumpPluginBase implements PumpI
@NonNull @Override
public JSONObject getJSONStatus(Profile profile, String profileName, String version) {
if ((getPumpStatusData().lastConnection + 5 * 60 * 1000L) < System.currentTimeMillis()) {
if ((getPumpStatusData().lastConnection + 60 * 60 * 1000L) < System.currentTimeMillis()) {
return new JSONObject();
}

View file

@ -370,7 +370,7 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
public JSONObject getJSONStatus(Profile profile, String profilename, String version) {
DanaPump pump = danaPump;
long now = System.currentTimeMillis();
if (pump.getLastConnection() + 5 * 60 * 1000L < System.currentTimeMillis()) {
if (pump.getLastConnection() + 60 * 60 * 1000L < System.currentTimeMillis()) {
return new JSONObject();
}
JSONObject pumpjson = new JSONObject();

View file

@ -567,7 +567,7 @@ class DanaRSPlugin @Inject constructor(
override fun getJSONStatus(profile: Profile, profileName: String, version: String): JSONObject {
val now = System.currentTimeMillis()
if (danaPump.lastConnection + 5 * 60 * 1000L < System.currentTimeMillis()) {
if (danaPump.lastConnection + 60 * 60 * 1000L < System.currentTimeMillis()) {
return JSONObject()
}
val pumpJson = JSONObject()