Rule Machine Lights off During Day

I am having a problem with a rule that I am trying to create.

Basically I want all of my outside lights to turn off when the sun should be out, no matter the status of my other modes and rules.

I have it trigger every 30 minuets, and if it is between sunrise and sunset then turn the switches off.

This is what I have so far:

My Problem is for every 30 minuets the lights switch changes, if they are on, they turn off, if they are off they turn on? This is where I am lost. I just want them to turn off every time.

Here is the log information:

Trigger
Front lights change
Certain time sunrise
Certain time sunset
If
Time is between sunrise and sunset
And
Front light switch is on
Then
Turn off front light
Else if
Time is between sunset and sunrise
And
Light is off
Then
turn on
endif

This should turn off if it gets turned on and in on it gets turned off between times. It works perfectly for me and should also trigger on at sunset and off at sunrise.

I don't see any problems with your rule, and it doesn't look like Rule Machine (app:104 in your logs) is turning them on, so I suspect you have some other app/automation that is doing that instead. What does the "In Use By" section for one of the affected lights/switches look like? Are you sure some other automation isn't responsible for this? And since it appears to be Caseta or RA2 (based on your telnet logs), could you have something on the Lutron side configured too that you wouldn't see in Hubitat?

So the rule is because I get home before sunrise sometimes and I have a rule to turn them on when I get home. Once I am home and the sun comes up, I want the lights to turn off. I realize most people don't have schedules that they get home before sunrise, but this house does all the time.

Point number 2, I am running X10 devices with node-red app. So apps:

dev-1 is Mochad-Client
app4 - is the X-10 Node Red-Bridge
app7- is the Driveway Light
app17 - Garage Workbench Light
app24- Back Flood Light

I used these steps to set that up.

maybe the problem is with the node-red?

Not sure why you have the trigger the way you do, but regardless just add some checks.

Do something like

If Time between sunrise and sunset and any light is on, a b c THEN
Turn off the lights
End if

See if this works?

Also, maybe make a virtual switch and use your presence rule to only turn on if that virtual switch is off.

Then your rule above turns on that virtual switch ....

The problem is I have X10 so someone could turn it on or off and the light might not be reading on from hubitat.

So the logic test might not know if the light is on to turn it off.

I found the problem to be the X10 setup I was using.

I fixed it by deleting all of the setup and starting over.

This is how I set it up and it works great now!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.