Issues with "are now and stays inactive" on latest patch


#1

Hi,

I recently upgraded to the lasted point release of Webcore on HE and since then I have had issues with my motion sensitive light script never turning off the light when the sensor “are now and stays inactive” never triggering.

Any ideas? Known bug? Can I roll back? I’ve installed it using HPM.

Snapshot below:

I turned off the light, the piston goes to the manual state. I open the door, walk in, tripping the contact on the door and the motion sensor. See all that in the log. The piston sets up the timers for 5s after the door shuts and for 10min after the motion stops… all good, and those triggers run, but they dont do anything. The light stays on and the piston state stays in “turned on by motion”

17/02/2022, 13:08:08 +308ms
+5ms	╔Received event [Guide].time = 1645067288261 with a delay of 47ms, canQueue: true, calledMyself: false
+60ms	╚Event processed successfully (55ms)
17/02/2022, 12:58:08 +192ms
+3ms	╔Received event [Garage-motion].motion = inactive with a delay of 27ms, canQueue: true, calledMyself: false
+138ms	║Setting up scheduled job for Thu, Feb 17 2022 @ 1:08:08 PM AEST (in 600012ms)
+141ms	╚Event processed successfully (138ms)
17/02/2022, 12:58:06 +433ms
+3ms	╔Received event [Garage Inside Door].contact = closed with a delay of 17ms, canQueue: true, calledMyself: false
+81ms	╚Event processed successfully (79ms)
17/02/2022, 12:58:02 +197ms
+3ms	╔Received event [Garage-motion].motion = active with a delay of 28ms, canQueue: true, calledMyself: false
+86ms	╚Event processed successfully (83ms)
17/02/2022, 12:57:58 +721ms
+4ms	╔Received event [Garage Inside Door].contact = open with a delay of 24ms, canQueue: true, calledMyself: false
+94ms	║Setting up scheduled job for Thu, Feb 17 2022 @ 1:07:58 PM AEST (in 600012ms)
+97ms	╚Event processed successfully (93ms)

#2

So show full logs here

Lets not do this in two forums


#3
17/02/2022, 14:26:18 +704ms
+31ms	╔Received event [Guide].time = 1645071978655 with a delay of 49ms, canQueue: true, calledMyself: false
+43ms	║RunTime initialize > 43 LockT > 1ms > r9T > 3ms > pistonT > 2ms (first state access 39 32 11)
+46ms	║Runtime (9240 bytes) initialized in 3ms (v0.3.114.20220203_HE)
+54ms	║╔Execution stage started
+69ms	║║Cancelling condition #14's schedules...
+70ms	║║Condition #14 evaluated true (1ms)
+72ms	║║Condition group #11 evaluated false (state did not change (5ms)
+73ms	║║Condition group #10 evaluated false (state did not change (7ms)
+82ms	║║Condition #20 evaluated false (5ms)
+83ms	║║Condition group #19 evaluated false (state did not change (7ms)
+92ms	║╚Execution stage complete. (39ms)
+97ms	╚Event processed successfully (67ms)
17/02/2022, 14:16:18 +568ms
+3ms	╔Received event [Garage-motion].motion = inactive with a delay of 24ms, canQueue: true, calledMyself: false
+16ms	║RunTime initialize > 16 LockT > 0ms > r9T > 4ms > pistonT > 2ms (first state access 12 4 12)
+19ms	║Runtime (9232 bytes) initialized in 4ms (v0.3.114.20220203_HE)
+21ms	║╔Execution stage started
+31ms	║║Comparison (enum) on is (string) off = false (1ms)
+32ms	║║Condition #2 evaluated false (8ms)
+37ms	║║Comparison (enum) inactive changes_to (string) active = false (0ms)
+39ms	║║Cancelling condition #4's schedules...
+40ms	║║Condition #4 evaluated false (6ms)
+48ms	║║Condition #5 evaluated false (6ms)
+49ms	║║Cancelling condition #3's schedules...
+51ms	║║Condition group #3 evaluated false (state changed (17ms)
+52ms	║║Condition group #1 evaluated false (state did not change (28ms)
+62ms	║║Comparison (enum) stays (string) closed = false (1ms)
+64ms	║║Comparison (enum) closed stays (string) closed = true (1ms)
+67ms	║║Cancelling any timed trigger schedule stays result false cancel any timers for condition 12
+68ms	║║Cancelling statement #12's schedules...null
+69ms	║║Condition #12 evaluated false (15ms)
+75ms	║║Comparison (boolean) true is (boolean) true = true (2ms)
+76ms	║║Condition #13 evaluated true (5ms)
+83ms	║║Comparison (enum) inactive stays (string) inactive = true (1ms)
+86ms	║║Adding a timed trigger schedule stays result true scheduling timer for condition 14
+88ms	║║Condition #14 evaluated false (12ms)
+90ms	║║Condition group #11 evaluated false (state did not change (35ms)
+91ms	║║Condition group #10 evaluated false (state did not change (37ms)
+99ms	║║Condition #20 evaluated false (5ms)
+100ms	║║Condition group #19 evaluated false (state did not change (7ms)
+108ms	║╚Execution stage complete. (88ms)
+129ms	║Setting up scheduled job for Thu, Feb 17 2022 @ 2:26:18 PM AEST (in 600005ms)
+133ms	╚Event processed successfully (130ms)
17/02/2022, 14:16:09 +303ms
+2ms	╔Received event [Garage-motion].motion = active with a delay of 85ms, canQueue: false, calledMyself: true
+7ms	║RunTime initialize > 7 LockT > 0ms > r9T > 3ms > pistonT > 1ms (first state access 4 3 4)
+10ms	║Runtime (9215 bytes) initialized in 3ms (v0.3.114.20220203_HE)
+11ms	║╔Execution stage started
+20ms	║║Comparison (enum) on is (string) off = false (1ms)
+21ms	║║Condition #2 evaluated false (7ms)

#4

These logs seem cut off.

ie the motion active event where is the rest of the run?

You have a tracking triggers at line 46 (stays) and line 63 (changes), but you have an exit above them that they may not always track the changes…

You likely need to show a screen shot of the piston with a trace on, but I don’t see how two triggers are going to be true at the same time as in the if at line 46.

It might be better to say what are you trying to do, and / or try to code using condition comparisons rather than trigger comparisons (at least for line 46).

Also

See the tips on writing pistons with only condition comparisons and the exploring motion pistons (pt1 and pt2).


#5

I’ve split the triggers out now, and it seems to be behaving.

I’ve had this code, largely as-is on my ST setup and more recently on HE working fine, it definitely seemed to break with the 20220203 patch. But maybe I’m mistaken.

Anyways, as for what it is doing, its this - Yet another take on motion sensitive lights

Though thats an earlier iteration from some time ago - that also happens to have split out triggers.