Leak detector to turn off outlet

  • Thread starter Thread starter Emon
  • Start date Start date
  • Tagged users Tagged users None

Emon

Active Member
View Badges
Joined
Apr 29, 2019
Messages
119
Reaction score
90
What state or country do you live in
New York
Rating - 0%
0   0   0
Good evening, I’m trying to hook up a leak detector to turn on an outlet on my apex. I’m having trouble writing the code, any help would b appreciated
 
Are you sure you want to turn it ON? If so, use this code:

Set OFF
If leakname CLOSED Then ON

Just substitute "leakname" with your sensor name. You can rename the sensor if you like, but be aware sensor names are limited to 6 characters.

Typically leak sensors are used to turn off pumps:

Set ON
If leakname CLOSED Then OFF

Keep in mind the sequence of your code matters. The last line that evaluates True will set the output state.

If you're new to the Apex, see my 8-part tutorial series: https://www.reef2reef.com/ams/neptune-apex-programming-tutorials-part-1.685/
 
When u write “then on” , I’m guessing I have to put the outlet name?
 
When u write “then on” , I’m guessing I have to put the outlet name?

No. You need to go into the settings for the outlet (commonly referred to as an Output in Apex terminology) and place the line of code there. Here's an example if you wanted to turn on an output named Drain if the sensor named Leak1 detects water:

Screen Shot 2020-01-15 at 2.44.41 PM.png
 
Thank u very much
 

TOP 10 Trending Threads

WHICH TYPE OF REEF CONTENT MOST OFTEN GETS YOU TO PARTICIPATE?

  • Daniel's daily polls. They're awesome! 😎

    Votes: 9 28.1%
  • A real troubleshooting problem

    Votes: 11 34.4%
  • Build-thread or tank-update posts

    Votes: 6 18.8%
  • Before-and-after progress photos

    Votes: 3 9.4%
  • Beginner questions

    Votes: 10 31.3%
  • Honest success or failure stories

    Votes: 7 21.9%
  • A post, update, or article from my favorite vendor

    Votes: 5 15.6%
  • Detailed how-to or educational discussions

    Votes: 9 28.1%
  • Tank tours and member showcases

    Votes: 5 15.6%
  • Local events, swaps, or meetups

    Votes: 5 15.6%
  • Other (Post in the comments)

    Votes: 7 21.9%
Back
Top
Home
Post thread…
Market
What's new