Results 1 to 15 of 15

Thread: Stand, Light, Door switches programming

  1. #1
    New User
    Join Date
    Oct 2017
    Location
    us, eastern time
    Posts
    5

    Stand, Light, Door switches programming

    Hey guys I just finished building my setup and I am trying to program my apex. I have two magnetic door switches on my stand and I want it to cut my stand light on when I open either of the doors or both, and I want the light off when all doors are closed. I have my switches labeled Door1 and Door2 and my stand light is labeled SumpLED. How do I write the program to make this happen?

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Something along the lines of this will do that. Assuming the switches close when the doors close.

    (Existing code)
    If Door1 OPEN Then ON
    If Door2 OPEN Then ON


    You can also wire them in series and use a single switch input as well. Then you just need one OPEN line.

    You might be an engineer if...You have no life and can prove it mathematically.

  3. #3
    New User
    Join Date
    Oct 2017
    Location
    us, eastern time
    Posts
    5
    Fallback OFF
    Set ON
    If Door OPEN Then ON
    If Door2 OPEN Then ON

    I wrote this code and the light stays on when the doors are open and closed. I also changed the OPEN to CLOSED just in case I had the switches wired backwards and it's doing the same thing.

  4. #4
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    What in your code tells it to be off?

    fallback is only in case of a loss of communication with the base unit.

    so you set it on
    then tell it to be on if the doors are open

    change set on to set off to change the default condition of the outlet. Then the switches will open and the light will come on

  5. #5
    New User
    Join Date
    Oct 2017
    Location
    us, eastern time
    Posts
    5
    I changed it and it is still doing the same thing. On my dashboard all my switches are showing but they never change states. All them say open and are grey instead of orange? I"m guessing this has something to do with it?

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

    Stand, Light, Door switches programming

    The Apex Local and Apex Fusion dashboards to not update instantaneously - both have a refresh interval. The Local dashboard updates more quickly than Fusion, so that would be better to use to see the tiles update while trying to figure out this switch issue. Wait at least 20 seconds to see a switch input tile update.

    Post full details of how you have everything connected. Pics of the BoB connections, of the magnetic switches showing the wires, and of the Inputs page would be great to see.
    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.

  7. #7
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    First, you want Set OFF not Set ON.

    If you are not seeing the switches change state, then you need to investigate the wiring into the breakout box and make sure the magnet is close enough to the reed when you close the door to activate it.

    You might be an engineer if...You have no life and can prove it mathematically.

  8. #8
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Quote Originally Posted by djallen252 View Post
    Fallback OFF
    Set ON
    If Door OPEN Then ON
    If Door2 OPEN Then ON

    I wrote this code and the light stays on when the doors are open and closed. I also changed the OPEN to CLOSED just in case I had the switches wired backwards and it's doing the same thing.
    This should be Set OFF, not Set ON.
    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.

  9. #9
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Ah! Zombie beat me to it!
    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.

  10. #10
    New User
    Join Date
    Oct 2017
    Location
    us, eastern time
    Posts
    5
    Ok guys I feel like an idiot. Somehow the wire from my breakout box got stuffed behind my control panel and never hooked up to the apex. I'm going to fish it through my control panel to the apex then hopefully everything will be fine.

  11. #11
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    Quote Originally Posted by RussM View Post
    Ah! Zombie beat me to it!
    Hey! I got there before both of you!

  12. #12
    Regular Vistor
    Join Date
    Dec 2013
    Location
    Tucson,AZ
    Posts
    46
    Quote Originally Posted by djallen252 View Post
    Hey guys I just finished building my setup and I am trying to program my apex. I have two magnetic door switches on my stand and I want it to cut my stand light on when I open either of the doors or both, and I want the light off when all doors are closed. I have my switches labeled Door1 and Door2 and my stand light is labeled SumpLED. How do I write the program to make this happen?
    It’s actually pretty easy...I just finished making my Breakout Box and I’ve recently been playing around with it. All u need to do is go under the settings and its just a simple IF/THEN statement than u need to slip in there. So something like this:

    IF Switch1 is OPEN Then ON

    Let me know if that works out for you.




    Sent from my iPad using Tapatalk

  13. #13
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by pdisner View Post
    It’s actually pretty easy...I just finished making my Breakout Box and I’ve recently been playing around with it. All u need to do is go under the settings and its just a simple IF/THEN statement than u need to slip in there. So something like this:

    IF Switch1 is OPEN Then ON

    Let me know if that works out for you.




    Sent from my iPad using Tapatalk
    No "is" should be in the statement the syntax is

    If Switchname CLOSED Then ON

    or

    If Switchname OPEN Then ON

    You might be an engineer if...You have no life and can prove it mathematically.

  14. #14
    Regular Vistor
    Join Date
    Dec 2013
    Location
    Tucson,AZ
    Posts
    46

    Ooops!

    Quote Originally Posted by zombie View Post
    No "is" should be in the statement the syntax is

    If Switchname CLOSED Then ON

    or

    If Switchname OPEN Then ON

    You might be an engineer if...You have no life and can prove it mathematically.
    Ooops! Uh-oh...I hope the code wasn't tried, sorry! that would be frustrating and confusing . Well I guess that teaches another lesson right there! Syntax is extremely important. Just one character off and the whole thing is worthless.

  15. #15
    Regular Vistor
    Join Date
    Aug 2017
    Location
    Nova
    Posts
    26
    Thanks


    Sent from my iPhone using Tapatalk

Similar Threads

  1. Help! Programming LED light from Door switch with run time
    By Sentinel in forum Misc Apex Usage & Programming
    Replies: 4
    Last Post: 03-21-2021, 10:45
  2. magnetic door switches?
    By 760mason in forum Misc Apex Usage & Programming
    Replies: 30
    Last Post: 08-13-2015, 19:12
  3. Question: Door switches to turn on sump light
    By Jim Albert in forum Misc Aquarium Automation Discussions
    Replies: 2
    Last Post: 01-19-2015, 05:42
  4. Magnetic Door switches
    By Raptor72 in forum Misc Apex Usage & Programming
    Replies: 26
    Last Post: 10-06-2014, 20:30
  5. Hydra LED dimming, BOB & door switches.
    By Fishytastic in forum AquaBus Modules, Probes, and Breakout Boxes
    Replies: 4
    Last Post: 12-23-2013, 04:37

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
  •