binaryman Posted November 29, 2016 Posted November 29, 2016 My goal for this program is to loop through it until stopped by another program. If the hot tub temperature is greater than a set amount, then wait 5 minutes and check again. Do this anytime the temperature is greater than that amount (or equal to). As soon as it dips below, then to turn the heater on for 10 minutes and check again. Will this program do it or am I missing something? I just get confused when it comes to the wait command at times My program is named 'Hot Tub in use' and looks roughly like: If: Status 'thermostat hot tub' >= 103 (temperature) Then: wait 5 minutes run program 'Hot Tub in use' (if) Else: set 'hot tub relay' on wait 10 minutes set 'hot tub relay' off run program 'Hot Tub in use' (if) Quote
MWareman Posted November 29, 2016 Posted November 29, 2016 Maybe, but probably not. When the temp changes to 99, else will run, turn on the heater and begin the wait. When the temp hits 100, the wait will cancel, the if reevaluate and the else will restart. This will continue until the temp hits 103, when a 5 min wait will start. When 104 hits, the wait will cancel, and the then restart. Etc.... You'll have very hot water! Quote
binaryman Posted November 29, 2016 Author Posted November 29, 2016 Ahh makes sense.... so now I have this... THIS should work... right? (both programs are disabled programs by the way. 'Hot Tub in use' gets it's 'then' statement executed manually by another program upon control activation of a keypadlinc button, and program stopped the same way) ---------------- 'Hot Tub in use' If: Then: wait 5 minutes run program 'Hot Tub in use sub' (if) Else: set 'hot tub relay' on wait 10 minutes set 'hot tub relay' off run program 'Hot Tub in use sub' (if) ---------------- 'Hot Tub in use sub' If: Status 'thermostat hot tub' >= 103 (temperature) Then: run program 'Hot Tub in use' (if) Else: run program 'Hot Tub in use' (then) Quote
oberkc Posted November 29, 2016 Posted November 29, 2016 I tend to agree with MWareman. One thing that could make it work would be to disable the program, then trigger it externally when you want it to start. Disabling the program will avoid having the program trigger itself upon temperature changes. Quote
oberkc Posted November 29, 2016 Posted November 29, 2016 both programs are disabled programs by the way Our posts crossed in the mail. I suspect that your original program would work if disabled. Quote
binaryman Posted November 29, 2016 Author Posted November 29, 2016 ok I wondered. Either way, it should for sure work now with the sub program as is, correct? Quote
MWareman Posted November 30, 2016 Posted November 30, 2016 It should do, yes. As mentioned, the original one should also work if disabled. That prevents the If condition causing a cancel and reevaluate while the wait is processing. Quote
larryllix Posted November 30, 2016 Posted November 30, 2016 I hope you realise that ISY is an event triggered processing engine. You do not need to constantly cycle through testing the temperature. Every time the temperature reading changes, your program will be invoked, triggered and the appropriate Then or Else run, by itself. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.