Unable to temporarily set the porch light to white and 100% when someone is at the door


#1

1) Give a description of the problem
porch light is not changing to white upon RING motion detection, and not changing back to blue after no motion detected.

2) What is the expected behaviour?
When RING doorbell motion is changes to active, set the porch light to 100% and set color to soft white, until RING doorbell has been inactive for approx 3 minutes, then change back to global variable color (in this case, blue)

3) What is happening/not happening?
see item 2. I’m new to the “repeat do until” loop, so sure I’m doing this all wrong.

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach logs after turning logging level to Full
11/9/2020, 7:33:24 PM +175ms![turn%20on%20the%20porch%20light|447x499]
+0ms ╔Received event [Home].time = 1604972005914 with a delay of -1740ms
+107ms ║RunTime Analysis CS > 24ms > PS > 45ms > PE > 39ms > CE
+110ms ║Runtime (46076 bytes) successfully initialized in 45ms (v0.3.110.20191009) (109ms)
+111ms ║╔Execution stage started
+112ms ║╚Execution stage complete. (1ms)
+113ms ╚Event processed successfully (114ms)
11/9/2020, 7:31:05 PM +182ms
+1ms ╔Received event [Ring Doorbell].motion = inactive with a delay of 76ms
+122ms ║RunTime Analysis CS > 18ms > PS > 59ms > PE > 45ms > CE
+124ms ║Runtime (46072 bytes) successfully initialized in 59ms (v0.3.110.20191009) (122ms)
+125ms ║╔Execution stage started
+134ms ║║Comparison (boolean) false is (boolean) false = true (1ms)
+136ms ║║Condition #49 evaluated true (6ms)
+144ms ║║Comparison (enum) on is (string) on = true (1ms)
+146ms ║║Condition #80 evaluated true (9ms)
+149ms ║║Comparison (enum) inactive changes_to (string) active = false (0ms)
+151ms ║║Cancelling condition #2’s schedules…
+152ms ║║Condition #2 evaluated false (6ms)
+153ms ║║Cancelling condition #1’s schedules…
+154ms ║║Condition group #1 evaluated false (state changed) (24ms)
+161ms ║║Comparison (boolean) false is (boolean) true = false (1ms)
+163ms ║║Condition #71 evaluated false (6ms)
+163ms ║║Condition group #68 evaluated false (state did not change) (7ms)
+166ms ║╚Execution stage complete. (41ms)
+167ms ╚Event processed successfully (167ms)
11/9/2020, 7:30:25 PM +719ms
+1ms ╔Received event [Ring Doorbell].motion = active with a delay of 69ms
+114ms ║RunTime Analysis CS > 18ms > PS > 55ms > PE > 40ms > CE
+117ms ║Runtime (46077 bytes) successfully initialized in 55ms (v0.3.110.20191009) (114ms)
+118ms ║╔Execution stage started
+126ms ║║Comparison (boolean) false is (boolean) false = true (1ms)
+128ms ║║Condition #49 evaluated true (6ms)
+138ms ║║Comparison (enum) on is (string) on = true (1ms)
+139ms ║║Condition #80 evaluated true (10ms)
+143ms ║║Comparison (enum) active changes_to (string) active = true (1ms)
+144ms ║║Cancelling condition #2’s schedules…
+145ms ║║Condition #2 evaluated true (5ms)
+155ms ║║Comparison (enum) off is (string) off = true (1ms)
+156ms ║║Condition #48 evaluated true (10ms)
+157ms ║║Cancelling condition #1’s schedules…
+158ms ║║Condition group #1 evaluated true (state changed) (37ms)
+160ms ║║Cancelling statement #26’s schedules…
+173ms ║║Executed physical command [Front Porch sengled].setColorTemperature([2700]) (9ms)
+174ms ║║Executed [Front Porch sengled].setColorTemperature (10ms)
+186ms ║║Skipped execution of physical command [Front Porch sengled].setLevel([100]) because it would make no change to the device. (8ms)
+187ms ║║Executed [Front Porch sengled].setLevel (9ms)
+190ms ║║Cancelling statement #64’s schedules…
+193ms ║║Executed virtual command wait (0ms)
+195ms ║║Requesting a wake up for Mon, Nov 9 2020 @ 7:33:25 PM CST (in 180.0s)
+200ms ║╚Execution stage complete. (82ms)
+201ms ║Setting up scheduled job for Mon, Nov 9 2020 @ 7:33:25 PM CST (in 179.995s)
+207ms ╚Event processed successfully (207ms)


#2

Since your logic is so similar, I would likely combine both blocks into one. Maybe something like this:

IF Sensor 8's motion changes to active  <-- Trigger
   and Switch 11 is on                  <-- Condition
   and Switch 6 is off                  <-- Condition
Then
   IF variable is false                 <-- Condition
      Then Do stuff
      Else Do other stuff
   END IF
END IF

(notice the last IF block is inside the THEN block)


#3

Your log matches the code written.

7:30:25 = [Ring Doorbell].motion = active
Executed physical command [Front Porch sengled].setColorTemperature([2700])
Setting up scheduled job for 7:33:25 (in 180s)

7:31:05 = [Ring Doorbell].motion = inactive

7:33:24 = Received event [Home].time
(Motion is no longer changing to active, so nothing happens here)


#4

Thanks. I might try that. It’s actually been working as expected since I posted this.