11 hours ago11 hr Here is the program I am running. The IF is true when it rains, and the THEN is executed correctly with the notification sent immediately... but then the same notification repeats anywhere from 2 minutes to 10 minutes later for at least 20 repeats. It does eventually stop but then it will start up again at some random time. How do I stop the repeating?Gen Sump 1 - [ID 0002][Parent 0001][Not Enabled]If'WeatherLink' Daily Rain > 0.250 InchesThenEnable Program 'Gen Sump2'Run Program 'Gen Sump2' (If)Send Notification to 'Brooke Text' content 'Rain for Gen Sump ON'Else- No Actions - (To add one, press 'Action')Note: Gen Sump 2 is a program that turns on a sump pump for a specified length of time and runs until manually disabled. It works well.
11 hours ago11 hr The problem is that your If statement will test true every time the value changes. So even though the rain value stays above 0.250 inches as it increases, the program will fire when it's 0.0251, again at 0.0252, etc. To avoid that, I would use two programs. One that sets another variable as a flag (that the rain is above 0.250 inches), and another program that sends your notification. Like this:If'WeatherLink' Daily Rain > 0.250 InchesThen rain_flag = 1Else rain_flag = 0Ifrain_flag = 1ThenEnable Program 'Gen Sump2'Run Program 'Gen Sump2' (If)Send Notification to 'Brooke Text' content 'Rain for Gen Sump ON'The first program will keep setting the flag to 1 every time the rain value changes, but that doesn't matter. The second program will test true only the first time the flag is set to 1. Edited 11 hours ago11 hr by Guy Lavoie
10 hours ago10 hr Author Thank You GuyI'll give it a try and test it this Thurs when it's supposed to rain.,
9 hours ago9 hr Author Guy,I've never used variables so I'm not familiar with them. Here is what I fumbled through. Not sure how or what I've done with the "$Int" ? I just can't figure how to get simple "rain_flag = 1" using the variable input. I assume this will not work but can you guide me how to correct? Thank YouTest 1 - [ID 000A][Parent 0001]If 'WeatherLink' Daily Rain > 0.250 Inches Then $Int_1_rain_flag = 1 Else $Int_2_rain_flag = 0Test 2 - [ID 000F][Parent 0001]If $Int_1_rain_flag is 1 Then Run Program 'Gen Sump2' (If) Send Notification to 'Brooke Text' content 'Rain for Gen Sump ON' Else - No Actions - (To add one, press 'Action')
9 hours ago9 hr For the purpose here, you need to use a status variable. Go into variables, click on Status at the top. Then add a variable, editing the name to what you want, then click on Save. I like to prefix the name with a "s" for atatus, such as s_rain_flag.You should then be able to select the variable when programming, such as a If variable statement. Let me know if that works.
9 hours ago9 hr Author I can't find "status" at the top. Sorry to be such a pain. The only thing I see is Integer and State. Is state the same as status?
Create an account or sign in to comment