pct88
Member
I am trying to set up code that cycles our curtain motor daily while keeping track of the open/closed status. The cycling provides no feedback of position, so I have to do it with logic.
"It is now dark out" is an input zone connected to an outdoor daylight photocell monitor. "Curtain Cycle U35" is a relay module that operates the motor.
My goal is to have the curtains close 15 minutes before calculated sunset OR when it becomes dark. Between April 15 and Sept. 15 close the curtains at 3pm to block the afternoon sun, and DON'T cycle the motor again at sunset since they will already be closed. Also leave closed if manually closed at another time of day.
I am missing something in my code- the curtains aren't closing at 3pm.
Suggestions for what I did wrong?
Thanks
113. // Only cycle the curtains once per sunset, and not if overidden
114. TIMED 3:00 AM MTWTFSS
THEN It is now dark out OFF
115. TIMED 7:30 AM MTWTF--
TIMED 8:00 AM -----SS
THEN Curtain Cycle U35 ON FOR 30 SECONDS
116. TIMED 15 MINUTES BEFORE SUNSET MTWTFSS
WHEN It is now dark out ON
AND IF It is now dark out OFF
THEN Curtain Cycle U35 ON FOR 30 SECONDS
THEN It is now dark out ON
117. // April 15 to September 15 close at 3 for afternoon sun...
118. TIMED 3:00 PM MTWTFSS
AND IF It is now dark out OFF
AND IF DATE IS GREATER THAN 4/15
AND IF DATE IS LESS THAN 9/15
THEN Curtain Cycle U35 ON FOR 30 SECONDS
THEN It is now dark out ON
"It is now dark out" is an input zone connected to an outdoor daylight photocell monitor. "Curtain Cycle U35" is a relay module that operates the motor.
My goal is to have the curtains close 15 minutes before calculated sunset OR when it becomes dark. Between April 15 and Sept. 15 close the curtains at 3pm to block the afternoon sun, and DON'T cycle the motor again at sunset since they will already be closed. Also leave closed if manually closed at another time of day.
I am missing something in my code- the curtains aren't closing at 3pm.
Suggestions for what I did wrong?
Thanks
113. // Only cycle the curtains once per sunset, and not if overidden
114. TIMED 3:00 AM MTWTFSS
THEN It is now dark out OFF
115. TIMED 7:30 AM MTWTF--
TIMED 8:00 AM -----SS
THEN Curtain Cycle U35 ON FOR 30 SECONDS
116. TIMED 15 MINUTES BEFORE SUNSET MTWTFSS
WHEN It is now dark out ON
AND IF It is now dark out OFF
THEN Curtain Cycle U35 ON FOR 30 SECONDS
THEN It is now dark out ON
117. // April 15 to September 15 close at 3 for afternoon sun...
118. TIMED 3:00 PM MTWTFSS
AND IF It is now dark out OFF
AND IF DATE IS GREATER THAN 4/15
AND IF DATE IS LESS THAN 9/15
THEN Curtain Cycle U35 ON FOR 30 SECONDS
THEN It is now dark out ON