Results 1 to 7 of 7

Thread: Simple programming help

  1. #1
    Regular Vistor
    Join Date
    Jan 2018
    Location
    Victoria, BC
    Posts
    43

    Simple programming help

    Trying to run an air pump off an outlet during the night.

    Start at 22:30 after lights out.
    Stop at 09:30 in the morning before lights on.

    Simple code I thought would work and does start the air Pump no problem but does not stop at the desired time.
    *Note this is repeatable at any time, not just when start/end are on different days. You could put in 09:30 to 09:31 and it will not stop.

    If Time 23:30 to 09:30 Then ON

    Then I tried to break out the commands to this.

    If Time 23:30 Then On
    If Time 09:30 Then Off


    But with this second code set it throws errors when uploading to my Apex. It seems that the time statement must have a To and a end time entered.

    So I think I have it working now with this but its not clean code since the duration doesn't work. maybe just my OCD :P

    If Time 23:30 to 09:30 Then ON
    If Time 09:31 to 23:29 Then OFF


    My question is why is the one liner not working?

  2. #2
    Frequent Visitor Todd's Avatar
    Join Date
    Jan 2013
    Location
    Huntsville, AL
    Posts
    583
    If you want it to match exactly lights out use the following:

    Set ON
    If Output {lights outlet name} = ON Then OFF

    Also, the pump may not draw enough current to operate certain outlets properly. On an EB8, outlets 4 & 8 are usually used in such cases.

  3. #3
    Regular Vistor
    Join Date
    Jan 2018
    Location
    Victoria, BC
    Posts
    43
    Quote Originally Posted by Todd View Post
    If you want it to match exactly lights out use the following:

    Set ON
    If Output {lights outlet name} = ON Then OFF

    Also, the pump may not draw enough current to operate certain outlets properly. On an EB8, outlets 4 & 8 are usually used in such cases.
    It just so happens to be plugged in to outlet 8.

    I am using the AI Hydra 26 lights that came with the Reefer 250 Deluxe so I'm not controlling them via Apex. That would be a good option if I were though.

    Thanks,

  4. #4
    Frequent Visitor Todd's Avatar
    Join Date
    Jan 2013
    Location
    Huntsville, AL
    Posts
    583
    Ok, then do the following:

    Set ON
    If Time 09:30 to 23:29 Then OFF

  5. #5
    Regular Vistor
    Join Date
    Jan 2018
    Location
    Victoria, BC
    Posts
    43
    Quote Originally Posted by Todd View Post
    Ok, then do the following:

    Set ON
    If Time 09:30 to 23:29 Then OFF
    Ah, so simple!

    Tell it to be on all the time EXCEPT for the day light hours.

    Thanks Tod

  6. #6
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    Did you have anything to turn the outlet off?

    your one liner looks right but you would need a set off statement to give it a default condition to resort to when the if time was not turning it on

  7. #7
    Regular Vistor
    Join Date
    Jan 2018
    Location
    Victoria, BC
    Posts
    43
    Quote Originally Posted by Frogfish View Post
    Did you have anything to turn the outlet off?

    your one liner looks right but you would need a set off statement to give it a default condition to resort to when the if time was not turning it on
    I didn't before no, that's basically what I was missing.

    There's 2 ways you could do it I suppose.

    Option 1:

    Set ON
    If Time 09:30 to 23:30 Then OFF

    - On normally but turn it OFF at 09:30 and leave it off until 23:30

    Option 2:

    Set Off
    If Time 23:30 to 09:30 Then On


    - Off Normally but turn it ON at 21:30 and then off at 09:30

    I'll stick with Option 1.

Similar Threads

  1. Help with simple programming
    By Fishinwall in forum Misc Apex Usage & Programming
    Replies: 4
    Last Post: 07-09-2017, 10:39
  2. Question: Simple Filter Programming
    By Only2Tanks in forum Apex Classic/Apex Lite/Apex Jr
    Replies: 1
    Last Post: 07-21-2015, 07:09
  3. Question: Simple programming question
    By Robmog in forum Apex Classic Dashboard
    Replies: 2
    Last Post: 03-14-2015, 16:09
  4. simple ATO programming
    By mtaswt in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 4
    Last Post: 02-04-2015, 09:22
  5. Simple programming query
    By rvdbarnes in forum Misc Apex Usage & Programming
    Replies: 9
    Last Post: 12-23-2013, 08:44

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
  •