mitch236 Posted April 17, 2010 Posted April 17, 2010 I have a programming question. I have a pool pump which has to run every day for around four or more hours in order to keep it clean and to run the salt generator that keeps my pool's chlorine level correct. This is what I wrote: If From 11:20:00AM To 4:20:00AM (same day) Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Pump' Off I have my pool heater on a seperate Insteon device. I want to be able to run my pool heater at different times based on when my family wants to swim. Problem is that the heater needs the pool pump to be on also. I would want the heater to run for a different and maybe longer time frame than the daily pump program. How would I do this? Say I want to run the heater from 4am to 1pm on Friday. Thanks
mitch236 Posted April 17, 2010 Author Posted April 17, 2010 I came up with this solution, please let me know if this will run properly. First I created this Folder program: Folder Conditions for 'Pool Heater On'Add conditions to limit when programs in this folder are allowed to run. If Status 'Outdoor / Pool / Pool Heater' is On Then Allow the programs in this folder to run. Then inside the folder: If From 3:00:00AM To 4:30:00PM (same day) Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Heater' Off Wait 10 minutes Set 'Outdoor / Pool / Pool Pump' Off I also created the daily folder: Folder Conditions for 'Pool Pump Daily'Add conditions to limit when programs in this folder are allowed to run. If Status 'Outdoor / Pool / Pool Heater' is not On Then Allow the programs in this folder to run. And inside: If From 11:20:00AM To 4:20:00PM (same day) Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Pump' Off So if I turn on the pool heater's device, it should run the first folder. If the heater device is off, then the second folder should run. The good thing is the heater will not run without the pump being on so I used that to my advantage.
mitch236 Posted April 18, 2010 Author Posted April 18, 2010 It seems to be working so I have only one additional question about this topic. When a Folder is true, the program contained within the Folder will run. But what if the program is running while the Folder becomes false? If you read my Else statement in the Heater program, it tells the heater to turn off first, then wait 10 minutes then turn off the pump. Once the heater is off though, the Folder becomes false. Will this cause the last line (or any line after the heater off command) to not run?
Sub-Routine Posted April 18, 2010 Posted April 18, 2010 Hi Mitch, You are correct, when the folder turns false the programs are aborted. You may wish to consider not using folders for these programs, it shouldn't be an issue to have multiple conditions in each program. Do you want the pump to run from 1120 to 1620 everyday whether the heater is on or not? And then be sure the pump comes on when the heater is running outside those hours? Rand It seems to be working so I have only one additional question about this topic. When a Folder is true, the program contained within the Folder will run. But what if the program is running while the Folder becomes false? If you read my Else statement in the Heater program, it tells the heater to turn off first, then wait 10 minutes then turn off the pump. Once the heater is off though, the Folder becomes false. Will this cause the last line (or any line after the heater off command) to not run?
mitch236 Posted April 18, 2010 Author Posted April 18, 2010 What I was trying to do was to have the pump run at least 4 hours a day. On the days that I want to heat the pool, I don't need to run the pump on its daily program since it will run with the heater. I wanted to turn off the heater before the pump so the heater will cool down. I guess I could write programs this way: Daily program: If From 11:20:00AM To 3:20:00PM (same day) And Status 'Outdoor / Pool / Pool Heater' is not On Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Pump' Off Then the heater program: If From 4:30:00AM To 4:30:00PM (same day) And Status 'Outdoor / Pool / Pool Heater' is On Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Heater' Off Wait 10 minutes Set 'Outdoor / Pool / Pool Pump' Off Will that run or will the program abort again?
mitch236 Posted April 18, 2010 Author Posted April 18, 2010 The more I think about it, the more I'm convinced I can't write the program the way I am trying to. I am using a member of the program as a condition of the program and then changing the status of the member before the program ends. I think I need a surrogate device to run the program. Like a KPL button or something similar. Is there a way to create a phantom device in the ISY? If not, I would ask for the ability to create phantom devices as controllers for programs. The device wouldn't necessarily need any load, it would be used to make a statement true or false.
mitch236 Posted April 18, 2010 Author Posted April 18, 2010 For now, I think this will work but it does create some issues. To turn the heater/pump on (since the heater will not turn on without water flow): If From 4:30:00AM To 9:30:00AM (same day) And Status 'Outdoor / Pool / Pool Heater' is On Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Heater' Off To finish cooling the heater after the heater has been turned off: If Status 'Outdoor / Pool / Pool Pump' is On And Time is 9:40:00AM Then Set 'Outdoor / Pool / Pool Pump' Off Else - No Actions - (To add one, press 'Action') I know this will work but it isn't as clean as I'd like.
Sub-Routine Posted April 19, 2010 Posted April 19, 2010 If you always want the pump to run from 11:20 to 3:20 then have a program do that. When the heater wants to turn on use a program to turn on the pump and run it 10 minutes longer than the heater. If you want the pump to run no more than 4 hours a day we will need extra programs to keep track of how long it has run with the heater. This should work but do you want to limit the time when the program runs? Don't you always want the pump on if the heater is on? IfFrom 4:30:00AM To 4:30:00PM (same day) And Status 'Outdoor / Pool / Pool Heater' is On Then Set 'Outdoor / Pool / Pool Pump' On Else Set 'Outdoor / Pool / Pool Heater' Off Wait 10 minutes Set 'Outdoor / Pool / Pool Pump' Off Rand
mitch236 Posted April 19, 2010 Author Posted April 19, 2010 When I turn on the heater, it doesn't actually start heating unless there is water flow, so the pump also has to be on for the heater to activate. When the heater turns off though, I wanted the pump to continue for 10 or so minutes to cool off the components of the heater. So if I turn on the circuit to the heater the night before, it will activate when the pump turns on. But once I turn off the heater, the program aborts and the pump continues. To do what I want, I have to write multiple programs. To activate the heater: If Status 'Outdoor / Pool / Pool Heater' is On And Time is 4:30:00AM Then Set 'Outdoor / Pool / Pool Pump' On Else - No Actions - (To add one, press 'Action') To turn off the heater: If Status 'Outdoor / Pool / Pool Heater' is On And Time is 9:30:00AM Then Set 'Outdoor / Pool / Pool Heater' Off Else - No Actions - (To add one, press 'Action') Then to turn off the pump 10 minutes later: If Status 'Outdoor / Pool / Pool Pump' is On And Time is 9:40:00AM Then Set 'Outdoor / Pool / Pool Pump' Off Else - No Actions - (To add one, press 'Action') This seems complicated. If there were a way to create a phantom device, I could use it to define the state of my program and then the program would run to its end. I think this is a great idea and I will post it on the request forum. How would I write a program to keep track of the pump? I would love to limit the time it runs!
mitch236 Posted April 19, 2010 Author Posted April 19, 2010 Ok, thanks to Michel, I am trying a different approach. I have the following programs, please let me know if they should work. First, I created a program that sets a variable either true or false: If Time is 4:00:00AM Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') The program is disabled by default. I would enable it if I want the heater to turn on. Here is the heater on program: If Program 'Heater Variable' is True And Time is 4:30:00AM Then Set 'Outdoor / Pool / Pool Pump' On Wait 5 minutes Set 'Outdoor / Pool / Pool Heater' On Else Set 'Outdoor / Pool / Pool Heater' Off Wait 15 minutes Set 'Outdoor / Pool / Pool Pump' Off Wait 5 minutes Disable Program 'Heater Variable' So I would enable the Heater Variable program and it should run the heater program and then disable the Heater Variable program at the end. Does this look right? Is there an easier way? I want to be able to activate the pool heater program from my iPhone the day before.
Michel Kohanim Posted April 19, 2010 Posted April 19, 2010 Hi mitch236, I think you may want to use a range (i.e. time is from 4:00 to 4:30) otherwise at 4:01 (and some grace period) your programs becomes false. With kind regards, Michel
mitch236 Posted April 19, 2010 Author Posted April 19, 2010 Well the solution was so simple!! I tested it and it appears to be working! Here is the program: If From 7:30:00AM For 6 hours Then Set 'Outdoor / Pool / Pool Pump' On Wait 5 minutes Set 'Outdoor / Pool / Pool Heater' On Else Set 'Outdoor / Pool / Pool Heater' Off Wait 15 minutes Set 'Outdoor / Pool / Pool Pump' Off Wait 5 minutes Disable Program 'Overnight Heater On' To run the program, I just enable the program from my iPhone (or the admin console). When the program finishes, it disables it so it won't run again until I enable it again!
Recommended Posts