Mode problem, but not with Mode Manager

OK, probably those mode changes at midnight have nothing to do with your rule. Something else in your system is setting the modes at midnight. It's not a hub issue, or we'd be seeing it from every user on the same build. You can rule out that it has to do with that rule by turning on logging. in the rule.

I already did that, and nothing shows at midnight in the rule logs day after day. It logs all other events just fine though. It basically shows the rule running and then suddenly I am in the wrong mode, and the rule runs its periodic poll where it switches back to the correct mode.

I am not sure what else could be doing this, the only thing setting modes is this rule!

Try this: Delete Night and Home mode from your system. Then create it again with a slightly different name. Check all of your automations that use that mode to change them to the new name. For the most part, automations use the mode name -- a couple use the mode id (a unique number per mode), specifically Rule Machine and Thermostat Scheduler. Obviously, this rule would have to be changed also, for the changed mode name.

Caught the lil bugger. First time I have been able to catch it. Stayed up late and I guess I got lucky. :smile:

Why the heck does it think that it is between sunset and 10 PM when the time on the hub and rule shows midnight?

Uh, no it isn't between those times! Naughty hub!
:angry: :lying_face:

The times before and after in the logs don't show it changed or has an incorrect time. Sorry for the small print, but I was trying to catch a lot in a row there.

Summary

The same course of events shows in Hub Events like in a previous post, but here is the matching screen capture to the log in this post.

Summary

1 Like

I am going to guess this has something to do with how the sunset time is calculated. If so I hope @bravenel and team can get it fixed!

Maybe, but only at midnight exactly?

Edit: it could be, but wouldn't sunset time affect more than just that one particular moment in time?

Nothing external coming in that might be changing Mode, like IFTTT ???

Perhaps try and offset the rule so it doesn't run at exactly midnight, or perhaps see if you can disable the rule for say 5 minute either side of midnight, just in case it's something to do with that exact time.

Edit:. Alternatively, if it is possible, store sunset in a variable in the if statement from your last screenshot. It would be interesting to see if sunset is derived once at the beginning of the rule, so perhaps it is comparing sunset from the day before and 9:59pm on the next day. Just a theory... Probably completely wrong.

I'll bet right at midnight sunset is now "yesterday's" sunset...which then makes between sunset and 9:59pm true.

1 Like

You maybe right. I believe Sunrise is set at midnight, Sunset is not; likely set at Sunrise event..

I thought Bruce has said in the past the surise is set at 00:10 not at midnight.

If sunset was not set at midnight I would expect the same behaviour at 12:03am as well.... which I don't think is what is happening.

No, not even installed.

I have tried prime numbers like I mentioned above (7, 13 minutes) and it still seems to somehow hit midnight.

Well I could, but it would be nice to figure out why it is happening. I doubt this is intended behavior.

It is not. Only midnight.

bravenelStaff

May 11

This is true only for the day the setting is first setup. After that, sunrise for the next day is sent at sunrise (sunset for next sent at sunset).

At midnight on the dot, mistakenly, sunset still refers to yesterday's sunset, and 9:59 pm refers to the new days time. So at midnight, that test is true, as you see. The change for sunset time in the hub doesn't happen until 30 seconds after midnight. This was a mistaken change recently made, that we will reverse. Not sure how that slipped in there. It's a platform bug.

We will investigate further.

5 Likes

@bravenel as much as you all have done in the couple of months i've been an HE user, plus ALL the code updates, i can see how a 3 and a 0 could have slipped into a line of code among the millions lof lines there are. I consider this a very impressive thing that you all can say "OPPPS!, we fat fingered something" that shows me that your only human and own up to the mistakes and fix them!! This is something that most people/companies won't do and that is a downfall in my book. So kudos to you all for owning the "boo-boo" and working to fix it! Keep it up and thank you for all you do.

4 Likes

Thanks. Yes, mistakes are made by all of us. This particular one has been fixed, and will be in an upcoming hot fix release.

5 Likes

Thanks!

I knew I wasn't going crazy, at least not this particular time. We will just ignore the other times I was.

:crazy_face:

Glad you guys could track it down and fix it so quickly.

5 Likes

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