pool: tick
This commit is contained in:
parent
33d79e48f2
commit
2b6652411a
22
pool.js
22
pool.js
@ -16,6 +16,10 @@ let status = {
|
||||
duration: null,
|
||||
schedule: null,
|
||||
|
||||
time: null,
|
||||
uptime: null,
|
||||
|
||||
tick: 0,
|
||||
tick_mqtt: 0,
|
||||
tick_temp: 0,
|
||||
tick_lock: 0,
|
||||
@ -271,4 +275,22 @@ Shelly.addEventHandler(
|
||||
}
|
||||
);
|
||||
|
||||
// Debug...
|
||||
|
||||
Timer.set(
|
||||
60 * 1000,
|
||||
true,
|
||||
function() {
|
||||
status.tick++;
|
||||
Shelly.call (
|
||||
"Sys.GetStatus",
|
||||
{},
|
||||
function (result) {
|
||||
print("[POOL] tick", result.time);
|
||||
status.time = result.time;
|
||||
status.uptime = result.uptime;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user