Results 1 to 12 of 12

Thread: Outlet 1 turns on Outlet 2, Outlet 2 turns off x minutes after Outlet 1 turns off?

  1. #1
    Frequent Visitor
    Join Date
    May 2017
    Location
    Colorado Springs, CO
    Posts
    152

    Outlet 1 turns on Outlet 2, Outlet 2 turns off x minutes after Outlet 1 turns off?

    I would like to have my canopy fans turn on when my MH light turns on and then have them turn off 15 minutes after the light turns off.

    I'm using this code to turn the fans off and on with the light, but I need to add the delay function....

    Code:
    Fallback OFF
    Set OFF
    If Output MH_Light = ON Then ON
    Anyone know how to do this?

  2. #2
    Frequent Visitor
    Join Date
    Nov 2016
    Location
    Slidell La
    Posts
    93
    A predetermined time slot that your MH lights go off would be the answer.
    so say your MH turn off at 18:00, add a line stating the time you would like the outlet to be in the on state.
    im new at this as well and hope someone can verify this and show you the proper syntax.

  3. #3
    Frequent Visitor
    Join Date
    May 2017
    Location
    Colorado Springs, CO
    Posts
    152
    Thanks for the reply. I already have the MH light setup to turn on and off at a certain time. I used the configuration wizard for Light, but here is the code that was generated for it:

    Code:
    Fallback OFF
    Set OFF
    If Time 17:00 to 20:00 Then ON
    If Tmp > 81.0 Then OFF
    Min Time 015:00 Then OFF
    I think I need to add something like this to the first code I posted:

    Code:
    Defer 015:00 Then OFF
    I'm just sure how to string it all together.

  4. #4
    Frequent Visitor Justin L's Avatar
    Join Date
    Jan 2013
    Location
    Birmingham, AL
    Posts
    541
    I think what Bluewater was trying to say is you could just set up the fan with to run an extra 15 minutes..IE If Time 17:00 to 20:15 Then ON, but if you change the time your MH runs then you'd need to change the fan code as well.

    I _think_ you can do it with a defer but someone should double-check me because I don't use a ton of defers, but what you're wanting to do is "defer the off state" so you wouldn't check to see if the outlet is ON, you'd check to see if it's OFF

    Set ON
    Fallback OFF
    If Output MH_Light = OFF then OFF
    Defer 015:00 Then OFF

    Make sense? Test that obviously.

  5. #5
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,492
    Fallback OFF
    Set OFF
    If Output MH_Light = ON Then ON
    Defer 015:00 Then OFF
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  6. #6
    Frequent Visitor Justin L's Avatar
    Join Date
    Jan 2013
    Location
    Birmingham, AL
    Posts
    541
    Quote Originally Posted by RussM View Post
    Fallback OFF
    Set OFF
    If Output MH_Light = ON Then ON
    Defer 015:00 Then OFF
    So the defer works on the "Set OFF"? For some reason I thought you needed logic to say "off" not just be the default state of the outlet. Out of curiosity would my code have worked anyway? I need to play around with defer more obviously.

  7. #7
    Frequent Visitor
    Join Date
    May 2017
    Location
    Colorado Springs, CO
    Posts
    152
    So the code that RussM posted above for me did work, Thanks!

  8. #8
    Frequent Visitor
    Join Date
    Nov 2016
    Location
    Slidell La
    Posts
    93
    Yup Russ and JustinL was able to nail down my lack of communications due to being green on this apex world.
    thanks guys for stepping in and showing the way or ways.

  9. #9
    Frequent Visitor
    Join Date
    May 2017
    Location
    Colorado Springs, CO
    Posts
    152
    I have a quick follow on question to this... is there a command that does the opposite of Defer? If I wanted a fan to come on before my lights are turned on, is that possible without hard coding an On on time for the lights?

  10. #10
    Frequent Visitor Justin L's Avatar
    Join Date
    Jan 2013
    Location
    Birmingham, AL
    Posts
    541
    Not really, you'd need to defer your lights based and set the time in your fan. Or create a virtual output with a schedule and change output states based on that.

  11. #11
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,492

    Outlet 1 turns on Outlet 2, Outlet 2 turns off x minutes after Outlet 1 turns off?

    Quote Originally Posted by Etoimos View Post
    If I wanted a fan to come on before my lights are turned on, is that possible without hard coding an On on time for the lights?
    I'm curious - why do you want to do this? It's an unusual request.

    Post your current lighting program please.
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  12. #12
    Frequent Visitor
    Join Date
    May 2017
    Location
    Colorado Springs, CO
    Posts
    152
    Quote Originally Posted by Justin L View Post
    Not really, you'd need to defer your lights based and set the time in your fan. Or create a virtual output with a schedule and change output states based on that.
    That is a good option. Set the times for the fan and them have the lights triggered by the fans instead of the other way around. To accomplish what I'm thinking about, I would need to delay the lights turning on and then delay them turning off, both based on the On time of the fan.


    Quote Originally Posted by RussM View Post
    I'm curious - why do you want to do this? It's an unusual request.

    Post your current lighting program please.
    My MH light heats my tank up a little more than I would like (from 78° to 79.9°) over the course of the day when they are on. I just wanted to see if I ran the fans for some time before turning the light on, if it would slower or lower the temp.

    My lighting program is simply on at 11:00am and off at 8:00pm. Nothing fancy at all as I only have the one light. I have been kicking around the idea of just replacing the MH light with an LED light so I can do sunrise/set and moon lights in addition to a daytime setting.

Similar Threads

  1. Heater outlet turns off when it goes to Auto
    By sunreefer in forum Apex Programming for Heaters and Chillers
    Replies: 3
    Last Post: 10-30-2020, 08:49
  2. Question: How to run an outlet for 30 seconds when another turns on or off
    By nlipner in forum Misc Apex Usage & Programming
    Replies: 3
    Last Post: 06-05-2018, 10:04
  3. Turn outlet on for x time when another outlet turns off
    By Tango2 in forum Misc Apex Usage & Programming
    Replies: 5
    Last Post: 10-12-2015, 19:00
  4. Question: Outlet that turns off and stays off
    By sailfin777 in forum Misc Apex Usage & Programming
    Replies: 5
    Last Post: 05-23-2014, 06:40
  5. program a pump to turn on for xxx minutes after an outlet turns on
    By Tangiers in forum Misc Apex Usage & Programming
    Replies: 5
    Last Post: 07-25-2013, 11:25

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •