Jump to content

Trying to program a switch to cycle


Oliver

Recommended Posts

Posted

I have been using Indigo on a Mac to control my many devices and wanted a stand alone box for a controller. The ISY994i seemed to be what I wanted but now I am having trouble with a couple of programming issues.

 

In this post I have a need to cycle a fan motor on for 30 minutes then off for 30 minutes between sunset and sunrise.

 

I am successful in doing that but it won't stop cycling for the rest of the day.

 

I am using AND statements, one to initially turn it on from sunset to sunrise (next day). Another AND statement to turn it on for thirty minutes after initial 60 minutes sunset on - else off. That works but it seems to ignore the AND statements of sunset to sunrise (next day) so I tried it from sunset to 11 pm and it still kept cycling after the limited AND period.

 

Not sure what else to try.

 

Oliver

Posted

I think this will do what you want:

 

From Sunset to Sunrise (next day)

 

Then

Repeat 30 times

fan on

wait 30 mins

fan off

 

Else

Fan off

 

The Repeat 30 times accounts for up to 15 hours of darkness, but should get short circuited when the sunrise event occurs and runs the else clause to turn the fan off (it it was it was in an on cycle at the time)

Posted

I would modify bsobel's suggestion as follows:

 

From Sunset to Sunrise (next day)

 

Then

Repeat 30 times

fan on

wait 30 mins

fan off

wiat 30 minutes <<<<<<<<< add this extra wait

 

Else

Fan off

Posted

Thanks for the help. It seems to be working with your suggestions. I also caught the needed line as I was looking at the script so I guess I'm beginning to understand the logic a little.

 

Been running for two days as expected.

 

Oliver

Guest
This topic is now closed to further replies.

×
×
  • Create New...