Hubitat Operations with Internet Unavailable - Rule Machine 4 Error

Getting up earlier than normal on a Saturday, I noticed a rule (RM4.0, triggered by a motion sensor) had read True before a set time, and turned on a lamp. On further investigation I noticed I had lost internet connectivity, so the Hubitat would have been working locally. Sunrise was 6:58, but the logic is between 7 and sunrise (i.e. it should not have turned on). On a working day, I leave the house around 6:15am, and the light does not turn on (Internet connection available).

Any thoughts as to why it would do this?

I printed the log of so show this:

You said your rule was for 7am-sunrise? Or sunrise-7am? Those are not the same things, so, I would expect different behavior if you have it set up the first way. The first way would be active for 23 hours and 58 minutes if sunrise was 6:58am. The second way would be active for 2 minutes. You said between 7 and sunrise so I just wanted to clarify.

1 Like

Take a look at your rule and post it for more for help with it. From your logs it looks like you are asking RM to look for the hall light to be on, and if it is, then turn it on. The 7am to Sunrise period also doesn’t make sense to me.


Thanks for both of your replies, I have posted the rule below. The rule worked fine until recently; both the last HE Update and my loss of interconnect connection were unrelated, but occurred close together. To explain the rule, I want the light to come on between 7am and sunrise (i.e. if sunrise is before 7am, I don't want the light to come on). As I type this I realise a couple of things, the rule was written a few months age, and this is the first time that sunrise has come before 7, so I suspect there is an error with the rule. However, I am not clear how HE calculates sunset, i.e. does it take the next sunrise, or only sunrise on the same day, I expect the former, hence the problem. If anyone can recommend a better way to write the rule, please let me know.

First of all, you are not showing the triggers for this rule. That is crucial to understanding how it works. So, please show a full screenshot of the rule.

See, the problem is, you don't have anything stating this:

So, right now, the rule flags as true because the time is between 7am and sunrise, sunrise tomorrow. Let's say sunrise is at 6:45am. The first condition will be true for 23 hours and 45 minutes of the day. From 7am until 6:45 the next morning. That's because you don't stipulate the sunrise has to be after 7am in your rule. The reason this worked before is because sunrise was after 7am and just a few days ago started occurring before 7am. So, your logic in your rule needs to have a condition that sunrise is after 7am. But again, this will all depend on what your triggers are.

Thanks, I started to realise that was the problem when I was writing the last post. The Trigger is "motion sensor changed".
I was considering adding an extra AND to the statement, with Sunrise>7.00am, would this work?

No, that won't work. Triggers are always connected by OR because you can't have two events at the exact same time. I'm still confused why it makes a difference whether sunrise is before 7 or after 7. It would be a lot easier if you have if time was between sunrise and sunrise + 1 hour or something to that effect.

Yes, I have been on RM this morning and I can't get Sunrise>7:00AM. I leave before 7 and don't want the light on, my wife gets up at 7 and if this is before sunrise, I want the light to switch on, that was was requirement. This worked fine until Sunrise slipped below 7am. My thoughts were to update the action to: "If (time between 7am and Sunrise) And Hall Tri-Sensor Active AND Sunrise > 7am" it would work, but I can't seem to get this expression into RM4.
I'll have a go at redoing the Rule with your suggestion, but it will be at the weekend, as I am going to be away from home this week.

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