Lutron light inconsistently turning on


#1

1) Give a description of the problem
Lights not always turning on.

2) What is the expected behavior?
If either phone is present, and its an hour before sunset, turn on.

3) What is happening/not happening?
I’m finding the lights dont turn on. I can hit test, the lights dont turn on. The lights are lutron caseta lights. If I toggle the lights one time with my remote (at home), then off, after that, the test button in webcore seems to work as expected - turns on. Its almost as if i have to ‘wake’ the lutron system?

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

5) Attach any logs (From ST IDE and by turning logging level to Full)
10/4/2018, 5:39:59 PM +58ms
+1ms ╔Received event [Home].time = 1538689200000 with a delay of -942ms
+87ms ║Runtime (38363 bytes) successfully initialized in 38ms (v0.3.108.20180906) (84ms)
+89ms ║╔Execution stage started
+539ms ║║Executed virtual command [Living Room Main Lights].toggleLevel (371ms)
+543ms ║╚Execution stage complete. (455ms)
+545ms ║Setting up scheduled job for Fri, Oct 5 2018 @ 12:00:00 AM EDT (in 22800.398s)
+558ms ╚Event processed successfully (558ms)


#2

This is how I would do it:

This keeps the trigger sharp, and the Presence Sensors are acting as conditions.
I have never used the ‘Toggle level’ command before… I would normally use ‘Set level to 50%’

One thing to keep in mind with this approach:
It will NOT toggle the light if you both come home real late.
I would use your “Welcome Home” piston to code for that.


#3

What are you actually trying to have happen? When you arrive home turn on the lights to 50% only between those times? I’m very confused by your piston.


#4

Lights on to 50% only when one or both of the devices are present and it’s between 60 minutes before sunset and midnight.


#5

Are present or changes to present? Those are very different things. For example, if both are present and the time BECOMES 60 minutes to sunset, would you want them to turn on? Or do you only want the piston to trigger if either presence sensor CHANGES TO arrived within the time period?
It’s the difference between a condition and a trigger. You have to discern what you want to be a triggering event and what you just want to be a condition. So, arriving home is a trigger or both a trigger and condition? Is the time only a condition or also a trigger?


#6

I split mine up into two pistons…

One is my “Welcome Home” piston, that is quite complex, but basically does a bunch of stuff when I first arrive home, depending on time etc.

Then I make an additional piston, that checks to see if someone is home around sunset, and simply turns on a few lights, like this:

If you don’t have a “Welcome Home” piston, I can add a few lines of code to the above piston to make it work. (although you will likely be happier with a separate “Welcome Home” piston, because that one will get complex over time)


#7

My intention was if it’s between 60 minutes before sunset and midnight, and either phone comes home (e.g. change to present) then turn on the lights.

Seems to be working right now but I was home during the last few times it transitioned to 60 minutes before sunset. Haven’t had a chance to test a later arrival well after sunset to see if it works.


#8

What does your piston look like now?