Why is Fan turning off in the middle of the night

I saw an error in the log but I am not sure what it means. Can anyone shed some light on this?

What other trouble shooting steps should I take?

Just a hunch.

Are you using Alexa? If so, make sure hunches are turned off. Alexa has been know to be “helpful” from time to time.

Something is wrong with your rule. I think I remember an error like that associated with a delay in a nested IF. Looking at your rule, you have an END-IF without an IF. I’m not sure if deleting the END-IF will fix the issue. I would rewrite this rule and see if that solves your problem.

FWIW Alexa Hunches is now EOL thank goodness:

FYI I do have Google integrated with the hub. However it has been for the last four years. I believe the problem is the END-IF. I deleted the deleted the END-IF and I feel confident that will fix my problem. Thank You all for your help. It is always nice to have more eyes on a problem. Sometimes I stair at a problem and my brain just does not see what is right in front of me.

The error in the log is due to multiple instances of this rule running in parallel. The error message might be triggered by a guard on the ENDIF, but removing the ENDIF does not resolve the issue.

You have a nine (9) hour Delay before the “off” command on the fan. During those nine hours, every time the light that triggers the rule is switched off, a new instance of the rule is started and a new nine-hour delay is scheduled. They accumulate. You can check by clicking the circled “i” to go to the rule’s “app status” page and scroll to the bottom to see the list of scheduled jobs.

Replace your Delay action with a Wait for Events (Elapsed Time). Unlike Delay, the Wait action gets cancelled every time the rule is triggered again.

Very nice!

Like I said, it was a hunch. :joy:

hubitrepβ Tester

Okay, I updated both timer delays. Here in Florida, when the seasons change, we often need to adjust the fan speeds throughout the night. It can be quite warm at bedtime, but as the morning hours approach, the temperature gets cooler. Because of this, I have the fan automatically change to a lower speed during the night.

With that in mind, I modified both delays/timers. After making those changes, I started experiencing the issue described above.

The modifications look good to me, however the top arrow is pointing at an action that is disabled, which is why it is it red italics. If you expect this action to actually be executed, you’ll have to uncheck the box in the ‘X’ column on the right.

It’s not clear to me what issue you started experiencing after the change.

  • Are you still seeing errors in the logs?
  • Is the fan still turning off in the middle of the night, as your post title states?

In the logs you shared in the initial post, there were none from “Rule 1908” other than the error. That probably means you don’t have rule logging turned on. Go ahead and turn them on so you can better see what happens when the rule executes:

It might also be helpful to check what is turning the fan off. Go to the device details page, there is an “events” tab that shows you the history for that device and what app produced the event, looks like this:

I think we have it fixed but if it goes off again I will go to the events and check it out. Thank You!