From 2b6652411a5d1d55cbf35fc8d070af74adf0bf05 Mon Sep 17 00:00:00 2001 From: Gilles Grandou Date: Sun, 19 Jun 2022 16:03:52 +0200 Subject: [PATCH] pool: tick --- pool.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pool.js b/pool.js index cf23b12..d943420 100644 --- a/pool.js +++ b/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; + } + ); + } +);