I have two dehumidifiers in my basement, both have bad humidistats. For context there is a humidity sensor in the basement and two rules, one to turn the units on when the humidity gets high and one to turn the units off when the humidity is at setpoint. No issues with these rules.
The "shop" dehumidifier will get a general fault and stops running once and a while. To reset the shop dehumidifier you simply remove power for a few seconds and apply power again by physically pulling the plug from the wall and plugging it back in. The dehumidifier remembers its last state and fires back up again, no need to touch any buttons on the dehumidifier. This removing and applying of power is what I am automating.
When the fault occurs Hubitat sees the power consumption go very low on the Shop dehumidifier and triggers my rule. I do not want another instance of this rule running till the first instance completes so I am trying to use the private Boolean. My rule will trigger and run as expected one time but for some reason I can't toggle the private Boolean back so my rule will never run again.
I see the delay end, the shop dehumidifier turn on, the rule retrigger but the private Boolean logic force the rule to exit but never see the Private Boolean turn back on after 30 seconds. Shouldn't the first instance of this rule keep running and only the second instance exit?
After I turn the dehumidifier back on, it needs a few seconds for the fan to start and drive the power consumption over 30, this is where I need to keep the rule from retriggering and allow the first instance to complete. Any other thoughts on how to rewrite this so I get the time delay but do not kill the rule before the private Boolean can be toggled back to True?
Make the test on PB be the Predicate Condition, instead of testing it in the rule. So the rule will only Trigger when it is true. As the first action of the rule, set PB to false. As the last action of the rule (after END-IF) set it to true again with a delay of 30 seconds. So, no matter what it will end up true, so the rule can run again, but the rule can only be triggered once in 30 seconds.
Is there any downside to triggering on the low power reading, if the shop unit is running on low power (less than 30W) and so is the storage dehumidifier, even with the predicate? Just wondering whether, in that situation, it would be regularly assessing the predicate condition if the power reading for the shop unit bounces around under 30W?
Very much an edge case, so probably not worth stressing over, just curious on whether there would be an alternative for that situation.
There isn't really a "regular assessing" of the Predicate Condition. These are independent of the triggers, in fact the triggers don't even exist at all while the Predicate Condition is false. So, if the frequency of being triggered by the power level is of any concern at all, the delay in the rule for setting PB to true can be adjusted higher. In other words, this rule can be limited to only possibly running every so often. Even if the power is being reported once a second, which could be a problem, the structure of the rule limits to how often the rule can be triggered.
I rewrote the rule in RM 5.0 and added the Private Boolean as a predicated condition but still seem to have the same symptom, the switch keeps cycling on and off.
The log looks correct for the rule I have written, but this is not how the rule is behaving, the 30 second delay isn't really happening. If I were to take a movie of the dashboard the switch turns on and off repeatedly about every second. As a test, I stopped the rule and turned on the switch, it takes about 3 seconds for the switch to report back and show about 83 watts on the dashboard.
You need to upgrade to 2.2.8.156. There were lots of bug fixes between the build you are on and the latest. Do that first, and then we'll go from there.