Light color temps based on time


#1

1) Give a description of the problem
(Piston below is not behaving like it should)

2) What is the expected behaviour?
(Bathroom lighting should be bright during the day and dim at night)

3) What is happening/not happening?
(Piston is not firing)

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

)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

11/30/2020, 11:02:32 AM +162ms
+0ms â•”Received event [2060 Brughs Mill Rd].time = 1606752153361 with a delay of -1199ms
+127ms â•‘RunTime Analysis CS &gt; 64ms &gt; PS &gt; 4ms &gt; PE &gt; 59ms &gt; CE
+130ms â•‘Runtime (41052 bytes) successfully initialized in 4ms (v0.3.110.20191009) (129ms)
+131ms â•‘â•”Execution stage started
+162ms â•‘â•‘Cancelling condition #30's schedules...
+163ms â•‘â•‘Condition #30 evaluated true (2ms)
+164ms â•‘â•‘Cancelling condition #29's schedules...
+165ms â•‘â•‘Condition group #29 evaluated true (state changed) (4ms)
+167ms â•‘â•‘Cancelling statement #31's schedules...
+184ms â•‘â•‘Skipped execution of physical command [Bathroom Sink 1].off([]) because it would make no change to the device. (12ms)
+185ms â•‘â•‘Executed [Bathroom Sink 1].off (14ms)
+202ms â•‘â•‘Skipped execution of physical command [Bathroom Sink 2].off([]) because it would make no change to the device. (14ms)
+203ms â•‘â•‘Executed [Bathroom Sink 2].off (16ms)
+239ms â•‘â•‘Skipped execution of physical command [Bathroom Sink 3].off([]) because it would make no change to the device. (32ms)
+240ms â•‘â•‘Executed [Bathroom Sink 3].off (34ms)
+253ms â•‘â•‘Skipped execution of physical command [Shower Light].off([]) because it would make no change to the device. (9ms)
+253ms â•‘â•‘Executed [Shower Light].off (11ms)
+256ms â•‘â•šExecution stage complete. (125ms)
+257ms â•šEvent processed successfully (257ms)

#2

Your log shows what happens two minutes after the motion changed to inactive.
(IE: It turned off four lights)
Well, it tried to turn them all off, but your hub was reporting them already off at the time, so webCoRE did not re-send the command again.


Another element that stands out to me is your empty Condition #5 (line 20).

You left it blank, so I don’t know how the logic could go past that point.


Personally, I would use this structure:

IF Motion changes to active
Then
    IF Time is between sunrise and sunset
    Then 
        Set lights to daytime levels
    Else 
        Set lights to nighttime levels
    END IF
END IF

IF Motion stays inactive for 120 sec
Then
    Turn off lights
END IF

Pro Tip:

I don’t normally recommend using ELSE blocks for new users, but in this strict format, it works well.


#3

Thanks for the quick reply. The expressions daytime levels and nighttime levels…Is that something I need to configure or is that built into the back end of WebCoRE?

I will give what you said a test to see if that resolves it. The lights aren’t coming on to begin with even after motion is detected so I’m stuck right from the jump.

Thanks again, I’ll give it a test.


#4

It is built-in.

  • Add a new statement
  • Add an IF
  • Add a condition, and then:

pic


#5

Thanks. I think I’ve got it nailed down thanks to your help.