Rule Machine broken after hub update?


C7 - 2.5.0.157

Seems something is wrong, just not quite sure what. I have the following rule machine issue. For some unknown reason, though the temperature is between the 2 levels, both conditions show False. Rule has been working fine until I updated from 2.5.0.136 yesterday. I tried creating a new rule but get the same results. Greenhouse smart strip is reporting fine.

Would appreciate if someone would check into this and let me know.

Similar rule on my C8 is working correctly, so maybe just a C7 issue?

Both hubs updated yesterday and both are running 2.5.0.157

Because both conditions are false.

82.3 is neither >= 85 nor <= 80.

82.3 is NOT above 85 or below 80. (which is how your rule is written
@HAL9000 jinx

I think you have your trigger events reversed.

You want the temp >=80 and <=85, which 82.3 is.

I think he has the rule correct. It’s just that the data point 82.3 shows the rule is working rather than not working.

Were it me, I’d simplify the trigger to say simply if the temperature changes and leave it to the conditionals in the action as is.

I looked at it thinking the temp needs to be between 80 and 85.

I agree with your assessment.

So basically what I want is for the switches to turn on when >=85, but turn off when <=80. think I have my rule wrong somehow. Maybe just >85 on and <=85 off would work better.

Correct, but if the C7 follows the rule path…>=85 comes first. Then <=80. I don’t want it to be between 80 and 85. I want it to come on >=85, then off once <=80.

The weird part is that it was working fine until I updated yesterday, and the one on my C8 was still working fine. I did reboot both today just to make sure.

I’m pretty sure it’s something I did. I currently have this process running through a simple automation rule with the trigger at 85. Thanks for the help and suggestions.

Was just commenting that your statement or expection that either condition should be true was flawed.

As written, when the trigger is above or equal to 85 or below or equal to 80, then when it is between the values, NEITHER statement could be true. If it is between, then it can't be above or below.

The rule is evaluating exactly and correctly the trigger conditions provided.

Just follow the suggestion I gave you. Change your trigger to when the temperature changes. Leave your actions exactly as you first posted.

@mavman30

To clarify,

Your rule, as written should work - it was just your perception that the "false" indicators were incorrect.

HOWEVER - it will retrigger everytime your temperature sensor reports above or below the thresholds you have (Most sensors report every couple of minutes), even though it already turned on or off your switch. This will result in numerous unnecessary commands being sent.

This is more or less how I would handle it.

Prevents multiple retriggers for each reporting period where the temp is still at or above 85, and eliminates the need for a trigger for when it falls below. I added a 10 minute duration to the falls below for the instance where it is hovering there. You can shorten or remove the duration.

Another way uses a conditional trigger that only runs if the switch is off (for the above temperature) or On (for the below temperature).

This way, if the switch is already on, it will not trigger until:
The switch is turned off AND the temperature reported is above 85.

If the switch is already off, it will not trigger until:
The switch is turned on AND the temperature reported is below 80

This was as close as I could get…couldn’t make the “ELSE-IF”.

And for the record, in error, I was monitoring the current state of the 2 outlets that were both already on at 82.3 degrees. I was expecting the rule or a reboot to turn them off. My error. If I’d turned off the 2 outlets at that time, we likely wouldn’t be having this conversation. I do thank all for the help!!

So, if they were on at 82.3 degrees, and had not gotten down to 80 degrees, that is expected. Your trigger to turn of was Less than or Equal to 80. 82.3 is not less than or equal to 80.

Not being funny or sarcastic. More about trying to help you see....
Why would the rule turn them off if the conditions in your rule had not been met??
The rule or you had already turned them on. Now, it is waiting for the trigger to do anything else.

Is it at or over 85? - No - So rule does nothing
Is it at or under 80? No - So again, rule does nothing.

As to the reboot, god help us if reboots start turning things on or off without a specific rule set up to do so

I actually have a rule to do some things on reboot. But if all the lights cut off that had been cut on by a motion rule just because the hub rebooted, I would just need to pack my bags and just leave home.

That said, you could write a rule that turns the switch off on reboot if the temperature is between 80 and 85.

The trigger is location event - system start

To get "Else-If", do not click the "Else" at the bottom of the table. Instead, add an action, choose conditional, and Else-If will be one of the options in the dropdown



Else-If is not an option for me.

Was an oversight on my part. Wasn’t thinking…

Got it. Thanks…so many “possibilities” depending on each selection. Gotta know the program better than I do, and have more patience to click on everything to see what options it gives. Hence why I’m here. Very clear instructions. Thank you!!

I think it only shows up after an If that isn't ended. Since your If's are already closed with EndIF's, I think it will not show.

You could delete (use the trash can to the right) on Both "End If" lines, the second "IF" line, and the "Else" line. Then you should be able to see the Else IF and add it. The condition should still be available to select in your conditions table.

Also, your original post didn't have two switches in the actions. If you manually turn on one of the switches the way it is written now, your rule will not trigger.

You could fix this by:
-Making sure to never manually turn on (or off) just one
-Writing a second rule to make sure that if one turns on, the other does (and if one turns off, the other does)
-Making two rules and only using one switch in each
-Changing the conditional on the existing rule to say if "any" are off (or on), as opposed to "all"