Converting ato high to skimmer shutoff?

Do you have a question on how to do something.
Ask in here.
Post Reply
SouthernReefer
Posts: 158
Joined: Thu Nov 14, 2019 2:51 pm

Converting ato high to skimmer shutoff?

Post by SouthernReefer »

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?
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Converting ato high to skimmer shutoff?

Post by binder »

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
SouthernReefer
Posts: 158
Joined: Thu Nov 14, 2019 2:51 pm

Re: Converting ato high to skimmer shutoff?

Post by SouthernReefer »

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.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Converting ato high to skimmer shutoff?

Post by binder »

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.
SouthernReefer
Posts: 158
Joined: Thu Nov 14, 2019 2:51 pm

Re: Converting ato high to skimmer shutoff?

Post by SouthernReefer »

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
cosmith71
Posts: 1437
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City

Re: Converting ato high to skimmer shutoff?

Post by cosmith71 »

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);
Post Reply