domotinc-customs Posted April 22, 2016 Posted April 22, 2016 (edited) hi all, I have solar panel to heat the pool. if sunny and warm, the solar panel system will start. when solar panel system start, Insteon is send electricity to the pool pump. (I/O sensor to read that solar panel system want to start and insteon swtich to send electricity to pool pump. that part works (actually, will work, when it will get warm here... lol) my challenge is, I want the pool to run for 8 hours a day. so if pool ran for 5 hours during the day due to sun and warm day, I want the pool to run an extra 3 hours at night. how do I program that? I did a small ISY program that count how many minutes a swtich is ON. that's easy but how do I get a ISY program to run based on an amount of time from a variable? thanks! Edited April 22, 2016 by gonzo__007
bleepblorp Posted April 22, 2016 Posted April 22, 2016 If you are okay with just always running for 8 hours straight you could do this without recording the run time as a variable. You could use the trigger of the solar panel system starting launch a program like this: if solar panel system is on then turn on pump wait 8 hours turn off pump Would that work?
Xathros Posted April 22, 2016 Posted April 22, 2016 (edited) Hi gonzo_007, Keeping your existing program for "Run in the Sun" as is, create a state variable called s.PoolRun. This program sets the daily required runtime of 8 hrs (480 minutes) daily one minute after sunrise. Program: SetPoolRunDaily If Time is Sunrise + 1 Then $s.PoolRun = 480 $s.PoolRun initTo $s.PoolRun Else This program tracks the pump run and decrements the requirement as it is running Program: TrackPoolRun If Status 'PoolPump' is On And $s.PoolRun > 0 Then Wait 1 minute $s.PoolRun -= 1 $s.PoolRun initTo $s.PoolRun Run Program 'TrackPoolRun' Then Path Else The following will run the pool pump from sunset until the requirement is met or a minute before sunrise the next day whichever comes first. Program: RunPoolExtra If Time is from Sunset to Sunrise -1 (Next Day) And $s.PoolRun > 0 Then Set 'PoolPump' On Else Set 'PoolPump' Off Note: These programs were hand written to convey concept and may not exactly match ISY syntax. Hope this helps. -Xathros Edited April 22, 2016 by Xathros
domotinc-customs Posted May 13, 2016 Author Posted May 13, 2016 (edited) new challenge now. sun is out and I realized that after 8 hours of sun, pool turns off. so I want it to be on as long as the solar panels wants it (I/O sensor) then, at night, if pool ran for less than 8 hours, to start the pool to do 8 hours total. in other words, if I have 10 hours of sun and solar panel system wants to run for 10 hours, fine. in that case. do not run at night. but if I only had 2 hours of sun. I want the pool to run for 6 hours at night. I will need your help... im now at 5 program to get it to run and it still does not work... lol Edited May 13, 2016 by gonzo__007
Xathros Posted May 13, 2016 Posted May 13, 2016 Hi gonzo_007, Please repost all programs as they are now and I'll see what needs to change to get what you want. -Xathros
larryllix Posted May 14, 2016 Posted May 14, 2016 (edited) If v5++ is being used, I wrote some accumulated time functions that work well by calcs with the ISY "seconds since midnight" feature. http://forum.universal-devices.com/topic/17366-v5-tracking-fan-cycle-runtime/ This could also give you a daily report of the, length of run, from the sun. Edited May 14, 2016 by larryllix
Recommended Posts