He webcore problem with variables

Hi all
I am having trouble with 2 variables message2 is not getting anything
and runtimeend not changing

Can you post full logs of when it runs incorrectly?

@nh.schottfam
What is strange it is on full but i only get

+48ms ╔Subscribing to devices...
+51ms ║Using Attribute subscription
+137ms ║Device missing from piston. Loading all from parent (83ms)
+172ms ║Using Attribute subscription
+183ms ║Subscribing to Beau's Room Pump 2.power...
+202ms ║Piston controls pump status...
+227ms ╚Finished subscribing (183ms)
+337ms ╔Starting piston... (v0.3.113.20210211_HE)
+339ms ╚Piston successfully started (330ms)

Clear

Full

If there are no other logs, then it sounds like the piston is not running after initialization.

How can I fix that
I also tried
this it runs once then I get
║Using Attribute subscription
+39ms ║Device missing from piston. Loading all from parent (21ms)
+44ms ║Using Attribute subscription
+48ms ║Subscribing to Beau's Room Pump 2.power...


how can I fix this

Looks like you are expecting the variables, i.e. sumpTriggerTime, to be carried forward from multiple runs. In my experience that doesn't happen unless you are using Globals.

I tried set it to 0 to clear before each run that did not help
it like webcore not see the device

Only device I see is Switch 1. What's its steady state, i.e. normal power value?

As to the variables, my point was that you'll set sumpTriggerTime in one pass, but the next pass, when the power drops it won't be available.

it is a zooz zen 15 in my test set up power range id 0 to 8.081
I am using a light to test it will be a pump

Looking at the manual for that device there are a number of ways to set it up for power reporting, can you post a screen shot of the device page so that we can see how it's configured?

here the info

Okay, don't see anything there that should cancel out reporting. If you look at the events for the device, do you see any power change events? (quick screen shot if possible)

Device

webcore from hub logs
app:982021-03-22 14:44:19.597 debugReleased Lock and exiting

app:982021-03-22 14:44:19.577 info ░╔ Event processed successfully (121ms)

app:982021-03-22 14:44:19.573 info ░║╔ Execution stage complete. (87ms)

app:982021-03-22 14:44:19.567 trace░║║ Executed virtual command setState (0ms)

app:982021-03-22 14:44:19.564 debug ║║ Calculating (string)[b,black|Beau's Room Pump 2 last run on 0 for 18708 days,19 hours,44 minutes,and 19 seconds + (string)] >> (string)[b,black|Beau's Room Pump 2 last run on 0 for 18708 days,19 hours,44 minutes,and 19 seconds]

app:982021-03-22 14:44:19.561 debug ║║ Calculating (string)[b,black| + (string)Beau's Room Pump 2 last run on 0 for 18708 days,19 hours,44 minutes,and 19 seconds >> (string)[b,black|Beau's Room Pump 2 last run on 0 for 18708 days,19 hours,44 minutes,and 19 seconds

app:982021-03-22 14:44:19.555 trace░║║ Executed virtual command setVariable (1ms)

app:982021-03-22 14:44:19.550 debug ║║ Calculating (string)Beau's Room Pump 2 last run on 0 for + (string)18708 days,19 hours,44 minutes,and 19 seconds >> (string)Beau's Room Pump 2 last run on 0 for 18708 days,19 hours,44 minutes,and 19 seconds

app:982021-03-22 14:44:19.547 debug ║║ Calculating (string)Beau's Room Pump 2 last run on 0 + (string) for >> (string)Beau's Room Pump 2 last run on 0 for

app:982021-03-22 14:44:19.545 debug ║║ Calculating (string)Beau's Room Pump 2 last run on + (string)0 >> (string)Beau's Room Pump 2 last run on 0

app:982021-03-22 14:44:19.542 debug ║║ Calculating (string)Beau's Room Pump 2 + (string) last run on >> (string)Beau's Room Pump 2 last run on

app:982021-03-22 14:44:19.534 trace░║║ Executed virtual command setVariable (1ms)

app:982021-03-22 14:44:19.527 debug ║║ Calculating (decimal)1.616442259517E12 - (decimal)0.0 >> (decimal)1.616442259517E12

app:982021-03-22 14:44:19.519 debug ║║ Cancelling statement #10's schedules...

app:982021-03-22 14:44:19.516 debug ║║ Condition group #9 evaluated true (state changed) (13ms)

app:982021-03-22 14:44:19.513 debug ║║ Cancelling condition #9's schedules...

app:982021-03-22 14:44:19.510 debug ║║ Condition #12 evaluated true (7ms)

app:982021-03-22 14:44:19.507 debug ║║ Cancelling condition #12's schedules...

app:982021-03-22 14:44:19.504 debug ║║ Comparison (decimal) 0.0 drops_below (integer) 6 = true (1ms)

app:982021-03-22 14:44:19.498 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:44:19.496 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:44:19.493 debug ║║ Comparison (decimal) 0.0 rises_above (integer) 3 = false (0ms)

app:982021-03-22 14:44:19.487 info ░║╚ Execution stage started

app:982021-03-22 14:44:19.484 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:44:19.481 debug ║ RunTime initialize > 25 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 23 6 19)

app:982021-03-22 14:44:19.458 info ░╚ Received event [Beau's Room Pump 2].power = 0.000 with a delay of 39ms,canQueue: true, calledMyself: false

app:982021-03-22 14:44:12.577 debugReleased Lock and exiting

app:982021-03-22 14:44:12.557 info ░╔ Event processed successfully (98ms)

app:982021-03-22 14:44:12.554 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:44:12.549 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:44:12.547 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:44:12.544 debug ║║ Comparison (decimal) 8.081 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:44:12.538 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:44:12.535 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:44:12.532 debug ║║ Comparison (decimal) 8.081 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:44:12.527 info ░║╚ Execution stage started

app:982021-03-22 14:44:12.524 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:44:12.521 debug ║ RunTime initialize > 62 LockT > 1ms > rtDT > 1ms > pistonT > 1ms (first state access 60 5 57)

app:982021-03-22 14:44:12.461 info ░╚ Received event [Beau's Room Pump 2].power = 8.081 with a delay of 34ms,canQueue: true, calledMyself: false

app:982021-03-22 14:44:07.531 debugReleased Lock and exiting

app:982021-03-22 14:44:07.510 info ░╔ Event processed successfully (65ms)

app:982021-03-22 14:44:07.507 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:44:07.502 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:44:07.500 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:44:07.497 debug ║║ Comparison (decimal) 8.109 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:44:07.491 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:44:07.488 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:44:07.485 debug ║║ Comparison (decimal) 8.109 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:44:07.481 info ░║╚ Execution stage started

app:982021-03-22 14:44:07.478 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:44:07.475 debug ║ RunTime initialize > 28 LockT > 1ms > rtDT > 1ms > pistonT > 1ms (first state access 26 6 22)

app:982021-03-22 14:44:07.448 info ░╚ Received event [Beau's Room Pump 2].power = 8.109 with a delay of 41ms,canQueue: true, calledMyself: false

app:982021-03-22 14:44:02.539 debugReleased Lock and exiting

app:982021-03-22 14:44:02.518 info ░╔ Event processed successfully (60ms)

app:982021-03-22 14:44:02.515 info ░║╔ Execution stage complete. (27ms)

app:982021-03-22 14:44:02.511 debug ║║ Condition group #9 evaluated false (state did not change) (8ms)

app:982021-03-22 14:44:02.508 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:44:02.505 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:44:02.499 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:44:02.497 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:44:02.494 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:44:02.488 info ░║╚ Execution stage started

app:982021-03-22 14:44:02.485 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:44:02.482 debug ║ RunTime initialize > 25 LockT > 2ms > rtDT > 1ms > pistonT > 0ms (first state access 22 6 19)

app:982021-03-22 14:44:02.460 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 34ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:57.539 debugReleased Lock and exiting

app:982021-03-22 14:43:57.519 info ░╔ Event processed successfully (64ms)

app:982021-03-22 14:43:57.515 info ░║╔ Execution stage complete. (29ms)

app:982021-03-22 14:43:57.511 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:57.508 debug ║║ Condition #12 evaluated false (7ms)

app:982021-03-22 14:43:57.505 debug ║║ Comparison (decimal) 8.081 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:57.499 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:57.497 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:43:57.494 debug ║║ Comparison (decimal) 8.081 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:57.488 info ░║╚ Execution stage started

app:982021-03-22 14:43:57.485 trace░║ Runtime (7668 bytes) successfully initialized in 0ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:57.482 debug ║ RunTime initialize > 28 LockT > 1ms > rtDT > 0ms > pistonT > 0ms (first state access 27 6 22)

app:982021-03-22 14:43:57.457 info ░╚ Received event [Beau's Room Pump 2].power = 8.081 with a delay of 33ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:52.575 debugReleased Lock and exiting

app:982021-03-22 14:43:52.555 info ░╔ Event processed successfully (89ms)

app:982021-03-22 14:43:52.551 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:43:52.547 debug ║║ Condition group #9 evaluated false (state did not change) (8ms)

app:982021-03-22 14:43:52.545 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:43:52.542 debug ║║ Comparison (decimal) 8.026 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:43:52.536 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:52.533 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:43:52.530 debug ║║ Comparison (decimal) 8.026 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:52.524 info ░║╚ Execution stage started

app:982021-03-22 14:43:52.522 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:52.518 debug ║ RunTime initialize > 53 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 51 5 48)

app:982021-03-22 14:43:52.468 info ░╚ Received event [Beau's Room Pump 2].power = 8.026 with a delay of 32ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:47.537 debugReleased Lock and exiting

app:982021-03-22 14:43:47.516 info ░╔ Event processed successfully (60ms)

app:982021-03-22 14:43:47.512 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:43:47.509 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:47.506 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:43:47.503 debug ║║ Comparison (decimal) 8.109 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:47.497 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:47.494 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:43:47.491 debug ║║ Comparison (decimal) 8.109 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:47.486 info ░║╚ Execution stage started

app:982021-03-22 14:43:47.483 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:47.480 debug ║ RunTime initialize > 24 LockT > 1ms > rtDT > 1ms > pistonT > 1ms (first state access 22 5 19)

app:982021-03-22 14:43:47.458 info ░╚ Received event [Beau's Room Pump 2].power = 8.109 with a delay of 25ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:37.520 debugReleased Lock and exiting

app:982021-03-22 14:43:37.499 info ░╔ Event processed successfully (62ms)

app:982021-03-22 14:43:37.496 info ░║╔ Execution stage complete. (27ms)

app:982021-03-22 14:43:37.492 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:37.489 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:43:37.486 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:37.481 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:37.478 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:43:37.475 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:37.469 info ░║╚ Execution stage started

app:982021-03-22 14:43:37.467 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:37.463 debug ║ RunTime initialize > 27 LockT > 1ms > rtDT > 1ms > pistonT > 1ms (first state access 25 5 22)

app:982021-03-22 14:43:37.439 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 33ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:32.525 debugReleased Lock and exiting

app:982021-03-22 14:43:32.505 info ░╔ Event processed successfully (59ms)

app:982021-03-22 14:43:32.501 info ░║╔ Execution stage complete. (27ms)

app:982021-03-22 14:43:32.497 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:32.494 debug ║║ Condition #12 evaluated false (7ms)

app:982021-03-22 14:43:32.491 debug ║║ Comparison (decimal) 8.109 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:32.485 debug ║║ Condition group #1 evaluated false (state did not change) (8ms)

app:982021-03-22 14:43:32.482 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:43:32.480 debug ║║ Comparison (decimal) 8.109 rises_above (integer) 3 = false (0ms)

app:982021-03-22 14:43:32.474 info ░║╚ Execution stage started

app:982021-03-22 14:43:32.471 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:32.468 debug ║ RunTime initialize > 24 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 22 5 19)

app:982021-03-22 14:43:32.446 info ░╚ Received event [Beau's Room Pump 2].power = 8.109 with a delay of 29ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:27.587 debugReleased Lock and exiting

app:982021-03-22 14:43:27.567 info ░╔ Event processed successfully (114ms)

app:982021-03-22 14:43:27.564 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:43:27.560 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:27.557 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:43:27.554 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:27.548 debug ║║ Condition group #1 evaluated false (state did not change) (8ms)

app:982021-03-22 14:43:27.545 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:43:27.543 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (0ms)

app:982021-03-22 14:43:27.537 info ░║╚ Execution stage started

app:982021-03-22 14:43:27.534 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:27.531 debug ║ RunTime initialize > 78 LockT > 2ms > rtDT > 1ms > pistonT > 0ms (first state access 75 6 72)

app:982021-03-22 14:43:27.455 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 32ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:22.544 debugReleased Lock and exiting

app:982021-03-22 14:43:22.524 info ░╔ Event processed successfully (61ms)

app:982021-03-22 14:43:22.520 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:43:22.517 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:22.514 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:43:22.511 debug ║║ Comparison (decimal) 8.081 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:22.505 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:22.502 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:43:22.500 debug ║║ Comparison (decimal) 8.081 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:22.494 info ░║╚ Execution stage started

app:982021-03-22 14:43:22.491 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:22.487 debug ║ RunTime initialize > 24 LockT > 2ms > rtDT > 1ms > pistonT > 0ms (first state access 21 5 19)

app:982021-03-22 14:43:22.465 info ░╚ Received event [Beau's Room Pump 2].power = 8.081 with a delay of 32ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:17.541 debugReleased Lock and exiting

app:982021-03-22 14:43:17.521 info ░╔ Event processed successfully (60ms)

app:982021-03-22 14:43:17.517 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:43:17.513 debug ║║ Condition group #9 evaluated false (state did not change) (8ms)

app:982021-03-22 14:43:17.511 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:43:17.508 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:43:17.502 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:17.499 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:43:17.496 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:17.490 info ░║╚ Execution stage started

app:982021-03-22 14:43:17.487 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:17.484 debug ║ RunTime initialize > 24 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 22 5 19)

app:982021-03-22 14:43:17.463 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 34ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:12.534 debugReleased Lock and exiting

app:982021-03-22 14:43:12.514 info ░╔ Event processed successfully (62ms)

app:982021-03-22 14:43:12.511 info ░║╔ Execution stage complete. (29ms)

app:982021-03-22 14:43:12.506 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:12.503 debug ║║ Condition #12 evaluated false (7ms)

app:982021-03-22 14:43:12.500 debug ║║ Comparison (decimal) 8.026 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:12.494 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:12.491 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:43:12.489 debug ║║ Comparison (decimal) 8.026 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:43:12.482 info ░║╚ Execution stage started

app:982021-03-22 14:43:12.480 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:12.477 debug ║ RunTime initialize > 25 LockT > 1ms > rtDT > 1ms > pistonT > 1ms (first state access 23 6 19)

app:982021-03-22 14:43:12.455 info ░╚ Received event [Beau's Room Pump 2].power = 8.026 with a delay of 36ms,canQueue: true, calledMyself: false

app:982021-03-22 14:43:02.538 debugReleased Lock and exiting

app:982021-03-22 14:43:02.518 info ░╔ Event processed successfully (63ms)

app:982021-03-22 14:43:02.514 info ░║╔ Execution stage complete. (27ms)

app:982021-03-22 14:43:02.510 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:02.507 debug ║║ Condition #12 evaluated false (7ms)

app:982021-03-22 14:43:02.504 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:43:02.498 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:43:02.496 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:43:02.493 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (0ms)

app:982021-03-22 14:43:02.487 info ░║╚ Execution stage started

app:982021-03-22 14:43:02.484 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:43:02.481 debug ║ RunTime initialize > 27 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 25 5 22)

app:982021-03-22 14:43:02.456 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 33ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:57.531 debugReleased Lock and exiting

app:982021-03-22 14:42:57.511 info ░╔ Event processed successfully (63ms)

app:982021-03-22 14:42:57.507 info ░║╔ Execution stage complete. (30ms)

app:982021-03-22 14:42:57.504 debug ║║ Condition group #9 evaluated false (state did not change) (10ms)

app:982021-03-22 14:42:57.501 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:57.498 debug ║║ Comparison (decimal) 8.109 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:42:57.491 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:57.488 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:42:57.486 debug ║║ Comparison (decimal) 8.109 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:42:57.479 info ░║╚ Execution stage started

app:982021-03-22 14:42:57.476 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:57.473 debug ║ RunTime initialize > 25 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 23 6 19)

app:982021-03-22 14:42:57.451 info ░╚ Received event [Beau's Room Pump 2].power = 8.109 with a delay of 33ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:52.535 debugReleased Lock and exiting

app:982021-03-22 14:42:52.515 info ░╔ Event processed successfully (61ms)

app:982021-03-22 14:42:52.511 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:42:52.507 debug ║║ Condition group #9 evaluated false (state did not change) (8ms)

app:982021-03-22 14:42:52.505 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:52.502 debug ║║ Comparison (decimal) 8.081 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:42:52.496 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:52.493 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:42:52.490 debug ║║ Comparison (decimal) 8.081 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:42:52.484 info ░║╚ Execution stage started

app:982021-03-22 14:42:52.482 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:52.479 debug ║ RunTime initialize > 25 LockT > 2ms > rtDT > 1ms > pistonT > 1ms (first state access 22 6 19)

app:982021-03-22 14:42:52.456 info ░╚ Received event [Beau's Room Pump 2].power = 8.081 with a delay of 33ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:32.535 debugReleased Lock and exiting

app:982021-03-22 14:42:32.515 info ░╔ Event processed successfully (60ms)

app:982021-03-22 14:42:32.511 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:42:32.508 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:32.505 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:32.502 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:42:32.496 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:32.493 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:42:32.490 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:42:32.485 info ░║╚ Execution stage started

app:982021-03-22 14:42:32.482 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:32.479 debug ║ RunTime initialize > 24 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 22 5 19)

app:982021-03-22 14:42:32.457 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 43ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:27.537 debugReleased Lock and exiting

app:982021-03-22 14:42:27.517 info ░╔ Event processed successfully (64ms)

app:982021-03-22 14:42:27.513 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:42:27.509 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:27.506 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:27.504 debug ║║ Comparison (decimal) 8.081 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:42:27.498 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:27.495 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:42:27.492 debug ║║ Comparison (decimal) 8.081 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:42:27.486 info ░║╚ Execution stage started

app:982021-03-22 14:42:27.484 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:27.481 debug ║ RunTime initialize > 28 LockT > 1ms > rtDT > 1ms > pistonT > 1ms (first state access 26 6 22)

app:982021-03-22 14:42:27.455 info ░╚ Received event [Beau's Room Pump 2].power = 8.081 with a delay of 32ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:22.527 debugReleased Lock and exiting

app:982021-03-22 14:42:22.506 info ░╔ Event processed successfully (60ms)

app:982021-03-22 14:42:22.502 info ░║╔ Execution stage complete. (28ms)

app:982021-03-22 14:42:22.499 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:22.496 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:22.493 debug ║║ Comparison (decimal) 8.053 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:42:22.487 debug ║║ Condition group #1 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:22.484 debug ║║ Condition #5 evaluated false (7ms)

app:982021-03-22 14:42:22.481 debug ║║ Comparison (decimal) 8.053 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:42:22.475 info ░║╚ Execution stage started

app:982021-03-22 14:42:22.473 trace░║ Runtime (7668 bytes) successfully initialized in 0ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:22.470 debug ║ RunTime initialize > 24 LockT > 1ms > rtDT > 0ms > pistonT > 0ms (first state access 23 5 19)

app:982021-03-22 14:42:22.448 info ░╚ Received event [Beau's Room Pump 2].power = 8.053 with a delay of 31ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:17.554 debugReleased Lock and exiting

app:982021-03-22 14:42:17.533 info ░╔ Event processed successfully (59ms)

app:982021-03-22 14:42:17.530 info ░║╔ Execution stage complete. (27ms)

app:982021-03-22 14:42:17.526 debug ║║ Condition group #9 evaluated false (state did not change) (9ms)

app:982021-03-22 14:42:17.523 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:17.520 debug ║║ Comparison (decimal) 7.998 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:42:17.514 debug ║║ Condition group #1 evaluated false (state did not change) (8ms)

app:982021-03-22 14:42:17.512 debug ║║ Condition #5 evaluated false (6ms)

app:982021-03-22 14:42:17.509 debug ║║ Comparison (decimal) 7.998 rises_above (integer) 3 = false (0ms)

app:982021-03-22 14:42:17.503 info ░║╚ Execution stage started

app:982021-03-22 14:42:17.500 trace░║ Runtime (7668 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:17.497 debug ║ RunTime initialize > 23 LockT > 1ms > rtDT > 1ms > pistonT > 0ms (first state access 21 4 19)

app:982021-03-22 14:42:17.476 info ░╚ Received event [Beau's Room Pump 2].power = 7.998 with a delay of 33ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:12.545 debugReleased Lock and exiting

app:982021-03-22 14:42:12.525 info ░╔ Event processed successfully (64ms)

app:982021-03-22 14:42:12.521 info ░║╔ Execution stage complete. (32ms)

app:982021-03-22 14:42:12.518 debug ║║ Condition group #9 evaluated false (state did not change) (10ms)

app:982021-03-22 14:42:12.515 debug ║║ Condition #12 evaluated false (6ms)

app:982021-03-22 14:42:12.512 debug ║║ Comparison (decimal) 8.081 drops_below (integer) 6 = false (0ms)

app:982021-03-22 14:42:12.507 debug ║║ Condition group #1 evaluated false (state changed) (13ms)

app:982021-03-22 14:42:12.505 debug ║║ Cancelling condition #1's schedules...

app:982021-03-22 14:42:12.502 debug ║║ Condition #5 evaluated false (8ms)

app:982021-03-22 14:42:12.499 debug ║║ Cancelling condition #5's schedules...

app:982021-03-22 14:42:12.496 debug ║║ Comparison (decimal) 8.081 rises_above (integer) 3 = false (1ms)

app:982021-03-22 14:42:12.490 info ░║╚ Execution stage started

app:982021-03-22 14:42:12.488 trace░║ Runtime (7668 bytes) successfully initialized in 0ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:12.484 debug ║ RunTime initialize > 25 LockT > 1ms > rtDT > 0ms > pistonT > 0ms (first state access 24 5 20)

app:982021-03-22 14:42:12.462 info ░╚ Received event [Beau's Room Pump 2].power = 8.081 with a delay of 29ms,canQueue: true, calledMyself: false

app:982021-03-22 14:42:08.641 debugReleased Lock and exiting

app:982021-03-22 14:42:08.619 info ░╔ Event processed successfully (148ms)

app:982021-03-22 14:42:08.615 info ░║╔ Execution stage complete. (52ms)

app:982021-03-22 14:42:08.611 debug ║║ Condition group #9 evaluated false (state changed) (14ms)

app:982021-03-22 14:42:08.608 debug ║║ Cancelling condition #9's schedules...

app:982021-03-22 14:42:08.605 debug ║║ Condition #12 evaluated false (9ms)

app:982021-03-22 14:42:08.602 debug ║║ Cancelling condition #12's schedules...

app:982021-03-22 14:42:08.599 debug ║║ Comparison (decimal) 8.137 drops_below (integer) 6 = false (1ms)

app:982021-03-22 14:42:08.590 trace░║║ Executed virtual command setVariable (1ms)

app:982021-03-22 14:42:08.584 debug ║║ Cancelling statement #2's schedules...

app:982021-03-22 14:42:08.581 debug ║║ Condition group #1 evaluated true (state changed) (12ms)

app:982021-03-22 14:42:08.579 debug ║║ Cancelling condition #1's schedules...

app:982021-03-22 14:42:08.576 debug ║║ Condition #5 evaluated true (7ms)

app:982021-03-22 14:42:08.573 debug ║║ Cancelling condition #5's schedules...

app:982021-03-22 14:42:08.570 debug ║║ Comparison (decimal) 8.137 rises_above (integer) 3 = true (1ms)

app:982021-03-22 14:42:08.565 info ░║╚ Execution stage started

app:982021-03-22 14:42:08.562 trace░║ Runtime (7667 bytes) successfully initialized in 1ms (v0.3.113.20210211_HE)

app:982021-03-22 14:42:08.558 debug ║ RunTime initialize > 88 LockT > 58ms > rtDT > 1ms > pistonT > 0ms (first state access 29 64 24)

app:982021-03-22 14:42:08.532 info ░╚ Received event [Beau's Room Pump 2].power = 8.137 with a delay of 50ms,canQueue: true, calledMyself: false

--- Live Log Started, waiting for events ---

I would remove all the initialization of variables ie don't set some to 0.

I think you problem is in your statement:

You might create another variable and assign it
$now - sumpTriggerTime

then use that variable in your formatDuration

That along with removing initialization should at least show us what is going on in variables.

I see you are running this on HE. Are you running the latest webcore version there?

So it's getting through the logic, but because the sumpTriggerTime isn't a global, it isn't stored between executions and it defaults to zero; thus you're getting the duration since 01 January 1970. If you change sumpTriggerTime to a global variable you may get something close to what you're looking for.

It should keep the variable between runs (so long as you don't re-initialize it; and don't use parallelism).

So I'm not sure this is the issue. We should see it get the value and hold it so long as you don't clear local variables.

But here the thing is ok if it reset every time but it not even doing that
I try to track how long the pump runs
the idea seems easy but it has not been

Just thinking out loud here. This may not apply at all. But power can fluctuate wildly. Your piston seems to be firing multiple times a second...

Screenshot_2021-07-13 He webcore problem with variables - Get Started - Hubitat
I wonder if slowing it down might offer some clues. Possibly..

Download the Hubitat app