Hello All,
Sorry to be a pain but there are a coule of issues to address in order to improve rsdoran's code.
1) If the controller is down for a Minute when the scheduled time arrives the pump will not start that day.
2) Hour and Minute are used in order to detect start and stop times.
These issues should be addressed together.
A) Convert the Hour/Minute to a number between 0-1439 (the number of minutes in a day - 1)
B) Use Limits to command the devices to operate. Check if the current time is >= to the start time and <= to the stop time.
For example, if you want the pump to start at 9:30AM and stop at 1:12PM you'd compare the current minute of the day with the target times. If it was 12 noon for example those values would be:
9:30AM = 570
1:12PM = 792
12:00PM = 720
If you want to be tricky you can convert the time values to minute of the week and compare those values. This will allow you to configure a device to start on one day of the week and stop on another day of the week.
Good Luck,
(8{)} ( .)
(Yosi)