Required Expression false .. but it isn't

Don't see any issues except home is not needed in the required expression as u are changing to home.

You should post up some logs from when it doesn't work. There may be a clue in there.

1 Like

Good catch. I have adjusted it now.

Unfortunately I didnā€™t have any logging enabled when it failed today. Iā€™ve since turned it on and will hopefully have something to share in the coming days.

2 Likes

The rule failed again this morning. As is typical now when we first started doing things that should have triggered it I checked the Hubitat app. The App list said ā€œRequired Expression Falseā€ while clicking on the specific rule it showed all conditions were true. I hit ā€œUpdate Ruleā€ and then it triggered on next proper trigger (I turned on our kitchen light).

I have turned on logs yesterday but am unsure which logs specifically I should be posting. In the interest of not posting useless information can someone tell me which log spots I should be grabbing to share? Thereā€™s a lot of different headings on the Hubitat Log section and Iā€™m not sure which ones are relevant to my issues.

1 Like

On your logs page go to the past logs. Then in the filter by app/device dropdown select the rule that is failing. It should then list all of the events, triggers, etc. for that rule.

1 Like

Is this option available now and I just canā€™t see it for some reason? I would love to enable it as all 5 of my Rules that rely on sunset/sunrise fail every single day. After sunrise and sunset every day I must open my Hubitat app and ā€œUpdate ruleā€ after sunrise and again after sunset. Itā€™s the only way they resume working. On the Rules Machine list the apps will incorrectly display ā€œRequired Expression Falseā€ or not say it when they should. If I edit the rule I can see it DOES show proper status but the rule wonā€™t work again properly until I hit ā€œUpdate Ruleā€.

Iā€™m assuming my next and only other option is to forgo Required Expressions altogether and just start having more and more If/Thens. Any other ideas would be greatly appreciated as Iā€™m at my wits end doing this every day. Itā€™s hardly acting as a smart/automated home for me.

I believe Bruce was doing a "what if" to further thinking about this before implementing. He hasn't made any promises yet.

Assuming the performance impact is trivial, I'm not sure why it is necessary to make it an option. Under what circumstances would you NOT want required expressions to be correctly evaluated following a reboot?

From 2.3.4.114:

2 Likes

Thank you. I was trying to do it on my phone and not seeing it while editing existing rules but after viewing your image I just kept clicking through everything on a rule until I found it.

I guess the best practice will be to just enable that option for every rule.

Unfortunately that fix did not solve my problem. All Rule Machine rules that rely on ā€œsunsetā€ or ā€œsunriseā€ as part of the required expression fail to acknowledge when those expressions change state. It fails in either either direction, as in it doesnā€™t go false when it should nor does it go true when it should. Iā€™m at a complete loss here. They worked flawlessly from December through October and then out of nowhere they all started failing. I have no idea how to fix this situation.

100% of the time it displays the correct status when on the page of the rule itself but fail to acknowledge the change on the ā€œAppsā€ page where all rules are listed and also fail to act accordingly.

They immediately update correctly and begin to work if I view a rule and hit the ā€œupdateā€ button or even just click in to the rule and immediately hit ā€œdone. Is there any way I could make a rule that essentially tells all my rules to do that ā€œUpdateā€ function? I canā€™t seem to find it in the rules but Iā€™m also not a power user so maybe thereā€™s a command or method I am missing/misunderstanding. This issue is becoming a really big headache for me and I need to find a fix or alternative. I just simply canā€™t continue to ā€œUpdateā€ 5 rules twice a day at sunset and sunrise.

I guess another question is: can I just downgrade my HE to a firmware from say August, 2022 (a time I know this issue did not exist for me) and just never update it again?

How about posting a screenshot of the rule, and screenshot of the logs for it around the time you say that it fails. The rule you posted above did not involve sunrise or sunset.

Sorry for my slow response. I have not had a chance to look in to it but hopefully the following screenshots will provide some insight.

  1. Is the Rule itself. As you can see with the pink arrows there is a contradiction between 2 spots. At the top it claims the required expression is false, yet at the lower part it is acknowledging the expression is true. The top line is winning out even though it is incorrect. The screenshot was taken around 9:15pm so well after sunset.

  2. The log for the app today, taken same time as above. As you can see the expression never went true when it was supposed to. I can only see today's log. Even when I click "Show more" it will not show me any more logs even though I've had logging on for weeks. Is this normal?

  1. Log file taken moments after the previous screenshots. You can see the exact moment I hit "Update Rule" on the Rule page and the expression now acknowledged it was true. The "Update Rule" always fixes this.

The red text is not updated dynamically, and is really not something you should rely on to know the state of the rule. I don't know what the sequence of UI events was that led to your first screenshot.

As for the logs, you aren't showing what happened at Sunset, but presumably the Required Expression became true as each trigger event fired (as it should) and turned on the light (as it should). Then at 7:36 AM it became false just as it should.

Tomorrow before sunset look at two things on the App Status page (gear icon): The Event Subscriptions (there shouldn't be any, because the Required Expression will be false), and the Scheduled Jobs (there should be one for the Sunset event and one for just after midnight to schedule the next day).

Using the App Status page, export this rule and send it to me.

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