Converting ato high to skimmer shutoff?

Do you have a question on how to do something.
Ask in here.

Posts: 158
Joined: Thu Nov 14, 2019 2:51 pm
PostPosted: Thu Oct 08, 2020 5:44 pm
Is it possible in code to take the extra float switch since I'm running just ato low to kill my skimmer if cup gets full or it freaks out? Then create an email alert around that?
User avatar
Posts: 2848
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Fri Oct 09, 2020 4:39 am
You can. It would be if triggered, turn off port X then alert etc etc. there would need to be some failsafe to prevent it from turning back on if the level lowered (unless you wanted that).

Sent from my Pixel 2 using Tapatalk

Posts: 158
Joined: Thu Nov 14, 2019 2:51 pm
PostPosted: Fri Oct 09, 2020 6:37 pm
binder wrote:You can. It would be if triggered, turn off port X then alert etc etc. there would need to be some failsafe to prevent it from turning back on if the level lowered (unless you wanted that).

Sent from my Pixel 2 using Tapatalk


Good point! I'd want to be able to go back in Uapp and turn it back on,but I wouldn't want it to do so until I have had a chance to get home and evaluate the peoblem. What kind of changes to code would I be looking at to make sure that works?

I have a 10 minute delay already on for after wc and feed modes are over as it is. Definitely want it to turn the outlet off if switch is tripped and not come back on until I physically do so.
User avatar
Posts: 2848
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Fri Oct 09, 2020 7:30 pm
Here's some pseudo code of what you might want to do:
check if you can turn the port on or off, if you can, continue below, otherwise just ignore the code entirely
if triggered
- flag that the port will not be toggled automatically
- turn off port X
- send alert
otherwise keep port on and running

so, that could translate to something like:
Code: Select all
boolean canControlSkimmer;
setup() {
  // ...
  canControlSkimmer = true;
  ReefAngel.Relay.On(skimmer);
  // ...
}

loop() {
  // ...
  if (canControlSkimmer) {
    // as soon as it's triggered, kill the power to the skimmer
    if (ReefAngel.HighATO.IsActive()) {
      canControlSkimmer = false;
      ReefAngel.Relay.Off(Skimmer);
      // send alert
    }
  }

  // Reset the skimmer control if the value is set to 1 or change to any value less than 255 (size of a byte)
  if (ReefAngel.CustomVar[0] == 1) {
    canControlSkimmer = true;
    ReefAngel.CustomVar[0] = 0;
    // you could also turn the skimmer back on here too.
  }
  // ...
}

You would want to check that the function calls are correct (I don't recall the exact calls off hand) and you would want to test it out more as well. You will also have to add your own alerting code.
This is also not taking into consideration the water change and feeding modes. Those modes could bypass and override this logic because of how the modes work. I'm not 100% positive though and Roberto would have to chime in on that.

Posts: 158
Joined: Thu Nov 14, 2019 2:51 pm
PostPosted: Mon Oct 26, 2020 7:12 am
binder wrote:Here's some pseudo code of what you might want to do:
check if you can turn the port on or off, if you can, continue below, otherwise just ignore the code entirely
if triggered
- flag that the port will not be toggled automatically
- turn off port X
- send alert
otherwise keep port on and running

so, that could translate to something like:
Code: Select all
boolean canControlSkimmer;
setup() {
  // ...
  canControlSkimmer = true;
  ReefAngel.Relay.On(skimmer);
  // ...
}

loop() {
  // ...
  if (canControlSkimmer) {
    // as soon as it's triggered, kill the power to the skimmer
    if (ReefAngel.HighATO.IsActive()) {
      canControlSkimmer = false;
      ReefAngel.Relay.Off(Skimmer);
      // send alert
    }
  }

  // Reset the skimmer control if the value is set to 1 or change to any value less than 255 (size of a byte)
  if (ReefAngel.CustomVar[0] == 1) {
    canControlSkimmer = true;
    ReefAngel.CustomVar[0] = 0;
    // you could also turn the skimmer back on here too.
  }
  // ...
}

You would want to check that the function calls are correct (I don't recall the exact calls off hand) and you would want to test it out more as well. You will also have to add your own alerting code.
This is also not taking into consideration the water change and feeding modes. Those modes could bypass and override this logic because of how the modes work. I'm not 100% positive though and Roberto would have to chime in on that.


Thanks sir! Sorry for the delay getting back. Ended up in the hospital a couple weeks back ( reef angel control from there rocked!) and kind of just trying to catch up and such. Ill have to give this a look. I have the outlet currently set for skimmer to be a delay of 10 minutes after a water change mode, or when it comes back up from reboot or power outage. Will that get in the way? ill have to go back and look, as its cycling and the skimmer port is over ridden off at the moment, but i think i did feed mode off and delay for 10 minutes coming back on. I mostly want this for traveling while im out of town, so my daughter doesnt end up with a frothy mess from a pissed off skimmer etc. I always empty my cup before i leave, but id feel better being able to get an alert, then call her and have her see what might be up by me turning it back on etc.
User avatar
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Tue Dec 01, 2020 6:38 am
I use a similar setup with an external skimmate locker (a big water jug with a hose and a float switch). It shuts off the skimmer once the locker is full. It will stay off until you turn the skimmer port back on in the uApp. Code is super simple.

Code: Select all
 if (ReefAngel.LowATO.IsActive()) ReefAngel.Relay.On(Skimmer);
  else ReefAngel.Relay.Override(Skimmer, 0);

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 4 guests

cron