Hi all, this is my first attempt at writing a rule and if I get it wrong it could be costly so if someone can check my work I would be greatful to the community.
I live in the high desert and need to keep my irrigation pump from freezing at night when its 75 degrees during the day and 20 degrees at night. I have a engine block heater on the pump impeller housing. When temperatures are <=32 I need the block heater to:
turn on for 30 min - then turn off
then 30 minutes after the heater turns off - if temperatures are still <=32 repeat.
If temps are above 32 then turn off blocker heater and stop the repeat cycle.
Here is the rule I wrote. Will this rule work? Or does someone have a suggestion for a better way of doing it? Or suggestions to reduce hub actions?
My devices and sensors I'm using is a Strips Temp sensor and a zwave controlled outdoor plug.
Couple of thoughts:
I suggest the trigger be something like:
Temp Outside < 34
OR
Temp Outside > 36
I've not used the Stop function so I can't speak to that.
The issue with what you have is, every time the temp changes even 0.1° the rule will run. Might function but will cause a lot of unneeded activity on the Hub.
BTW all triggers are OR'd by RM. There is no other choice.
I chose 34 and 36.
-
I realize the pump freezing will probably lag the outside air temp, but I personally feel a little margin here is a good thing.
-
if the <= temp is the same as the > temp when your sensor is dithering between 32.0 and 32.1 you will be bouncing back and forth between the two actions. Again it will probably function.
Again, I'm not able to say if your repeat and stop function are OK. But I will look to see what other's say.
@earlypondhome I don't believe your repeat is structured correctly. Here's what I would try
Trigger:
Temperature of Temp Outside garden reports <= 32.0
Action:
IF (HeaterOff = false) Exit Rule
Set HeaterOff to false
Repeat every 1:00:00 (stopable)
IF (Temperature of Temp Outside garden > 34.0) THEN
Stop Repeating Actions
Set HeaterOff to true
ELSE
On: Pump block heater
Off: Pump block heater -->delay 0:30:00 (cancelable)
END-IF
END-REP
Variables:
HeaterOff (Boolean; true)
@JohnRob thank you for that feed back.
The more definitive temp trigger makes sense. And I will make that change.
I am not to worried about frequent unneeded activiyt due to reported temperature changes but that is only because the temperature sensor I am using Strip Comfort Sensor is a very infrequent reporter. It will only reports every 15 minutes if there is a 1 degree change otherwise it reports every hour If there is a change and if no change it report 1 time every 4 hours. But I agree, if my sensor was a frequent reporter like other sensors I have this would be an issue!
Thank you!
Rochelle
@pseudonym I really like your rule it makes sense to me, BUT i can't figure out how to recreate it in Rule Machine. Can you or anyone here point me towards what type of action or conditions I should be choosing when writing this rule? I thought it was a conditional rule but I cant find these action to choose to create it...and I'm not familiar with the use of variables in rules.
I did read the documentation and I watched the 2 videos on rule machine but it didnt come close to helping me here. Does someone have a good resource on how to understand this better?
Realize that with trigger = Temp * changed *, you are going to get concurrent re-triggering (new process threads concurrently executing). The other suggestions above for triggers are better, for that reason.
@pseudonym yes that does look like it will be helpful! I will read through and try to recreate and understand it tonight. I greatly appreciate your help!
@672southmain, just want to make sure I understand. You are saying that a rule can be re-triggered even when it is currently running. For some reason I assumed that it would have to wait until the rule ended before it ran again.
That is good to know. So I need the rule to run its routine so long as the condition is true/false with out retriggering. Having a Temp = changed trigger would create new a new start of the rule each time the temp is updated. . But having a Temp < # would not retrigger the rule because the value true/false didnt change even when the sensor reports back with new information.
Did I get that right?
Rochelle
Yep. It takes a while to get your head around the concurrency that happens. That’s why rules have cancel repeating actions and cancel delays that need to be inserted to cancel delays and repeats from other concurrent triggering of the rule. Odd things can happen when you have variables being simultaneously modified by concurrent processes. And, you have no control over the scheduling / order of execution of the different concurrent threads.
Well, except for the fact that, as the temp is crossing the line, there can be some fluctuation. Most temp sensors have hysteresis to handle that.
No, that's not right. If you look at the trigger wording, Temperature of Temp Outside garden reports <= 32.0, the rule will be trigger everytime the temp sensor reports a temperature less than or equal to 32. All reports above 32 will be ignored. It would be nice if the rule would trigger only once when a threshold is crossed but that's not how it works. The boolean variable HeaterOff is used to filter the reports and only execute the rule once when a temp below 32 is reported. HeaterOff will be reset to true when the temperature reports above 34 and the rule will be ready to execute again when <= 32 is reported.
I hope that makes sense.
I might be a pessimist, but I don't think I'd rely on home automation for this.
I kind of agree with velvetfoot, however my "issue" is; there is no way to periodically test if all is still working.
I don't know your setup but perhaps the on/off control has a capability to measure current. If so you could write another RM rule to once a week (or every day if the outside temp is below 45 or so) turn on the heater and verify it is drawing current.
I have a ZWave water shutoff valve. I test it every day for connectivity and once a week I exercise the valve. I use community "Device Activity Check" App to alert me if the daily connection test fails.
@velvetfoot and @JohnRob. I'm an optimist.
This is my back up- make me feel better about it, I did everything I could plan.
I'm balancing and mitigating the cost of losing an expensive new landscape, limited solar battery for heating and the cost of possibly replacing the pump. Loosing the pump is the cheaper of the options. The pump is also right by a 1 acre pond, so there is a water mass that keeps the local temps just over freezing this time of year...usually.
As for checking/tracking if it is working or turning on/ off, i have a hubigraph chart that shows when some thing was on / off that I use for other items that I track are working. I will add this to the chart so I can monitor that it has been working as it should.
AND
All of this will be mute this summer after the new pump house is built.
If someone is relying on this idea as the only option to keep a pump from freezing, I would say don't try this at home.
1 Like