Results 1 to 3 of 3

Thread: Delaying the processing of email alerts until a period of time expires after outlet turned on

  1. #1
    New User
    Join Date
    Jan 2019
    Location
    AB
    Posts
    4

    Delaying the processing of email alerts until a period of time expires after outlet turned on

    I currently have my email alerts contain the following statements to alert me to problems in the calcium reactor:

    <... other stuff ...>
    If pH < 6.5 Then ON
    If pH > 7.0 Then ON

    The idea being if CO2 starts dumping too much into the reactor, or the reactor itself gets a clog or otherwise slow flow, then the pH might drop too low; similarly, if CO2 doesn't inject enough (or runs out) then the pH will raise too high to run properly.

    For the most part, this works fine for steady-state operation. But a recent trip away from home I started getting email and text alerts because the pH dropped too low. (Turns out there was a power failure and the reactor took a while to get going again.) Meanwhile I was getting constant alerts, I was away and couldn't deal with it, so I turned off the CO2 (I figured it was safer to just not have CO2 until I could get home and take a look at it).

    Of course then I started getting emails/text alerts about the pH being too high. Fair enough, I should have added a conditional that the CO2 outlet state itself be checked. (eg., "If CO2 ON AND pH < 6.5 Then ON" etc.) So that part is easily corrected.

    But it occured to me this morning, if I just turn the CO2 back on, and it takes at least an hour for the reactor to get to the pH setpoint, then I'll get email/text alerts until the pH settles.

    I want to suppress these alarms. So I guess I need to look at a virtual outlet, call it say pH_alarm and then make use of either DEFER or MIN within its program to achieve this.

    So change the email alarm itself from:

    If pH < 6.5 Then ON
    If pH > 7.0 Then ON

    To:

    If Output pH_alarm = ON Then ON


    And have the pH_alarm outlet be something like:

    Set OFF
    If pH < 6.5 Then ON
    If pH > 7.0 Then ON
    DEFER 60:0 Then ON


    So I think this will result in pH alarms will always be suppressed until the condition exists for at least an hour. That may be acceptable, but it would mean it would be at least an hour before an alert happens in the case of a legit problem of concern.

    Is there a way to put a conditional in there that looks at whether the CO2 outlet was set to ON or AUTO in the last hour, and if so, then not to go ON until that much time has passed?

    Thanks!

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by delphinus View Post
    I currently have my email alerts contain the following statements to alert me to problems in the calcium reactor:

    <... other stuff ...>
    If pH < 6.5 Then ON
    If pH > 7.0 Then ON

    The idea being if CO2 starts dumping too much into the reactor, or the reactor itself gets a clog or otherwise slow flow, then the pH might drop too low; similarly, if CO2 doesn't inject enough (or runs out) then the pH will raise too high to run properly.

    For the most part, this works fine for steady-state operation. But a recent trip away from home I started getting email and text alerts because the pH dropped too low. (Turns out there was a power failure and the reactor took a while to get going again.) Meanwhile I was getting constant alerts, I was away and couldn't deal with it, so I turned off the CO2 (I figured it was safer to just not have CO2 until I could get home and take a look at it).

    Of course then I started getting emails/text alerts about the pH being too high. Fair enough, I should have added a conditional that the CO2 outlet state itself be checked. (eg., "If CO2 ON AND pH < 6.5 Then ON" etc.) So that part is easily corrected.

    But it occured to me this morning, if I just turn the CO2 back on, and it takes at least an hour for the reactor to get to the pH setpoint, then I'll get email/text alerts until the pH settles.

    I want to suppress these alarms. So I guess I need to look at a virtual outlet, call it say pH_alarm and then make use of either DEFER or MIN within its program to achieve this.

    So change the email alarm itself from:

    If pH < 6.5 Then ON
    If pH > 7.0 Then ON

    To:

    If Output pH_alarm = ON Then ON


    And have the pH_alarm outlet be something like:

    Set OFF
    If pH < 6.5 Then ON
    If pH > 7.0 Then ON
    DEFER 60:0 Then ON


    So I think this will result in pH alarms will always be suppressed until the condition exists for at least an hour. That may be acceptable, but it would mean it would be at least an hour before an alert happens in the case of a legit problem of concern.

    Is there a way to put a conditional in there that looks at whether the CO2 outlet was set to ON or AUTO in the last hour, and if so, then not to go ON until that much time has passed?

    Thanks!
    That is the right approach, though you have a syntax error.

    Sent from my SM-G965U using Tapatalk

  3. #3
    New User
    Join Date
    Jan 2019
    Location
    AB
    Posts
    4
    (Thanks! I just typed those things off the top of my head so not surprised. I'm guessing I'll find the syntax error when I go to enter these into the Apex. )

    So, I think I can accomplish what I'm hoping for if I do something like this (2 new VOs, ph_AlarmEnab and ph_Alarm):

    (The intent is for no pH alerts for 60 minutes after the CO2 is first turned on. Thereafter, the pH needs to be in the alarm conditions for 10 minutes before an alert is sent just in case it's hovering near the boundary but is otherwise not trending in the bad direction.)


    [EMAILALM_I5]
    <... the other stuff as before ...>
    If Output pH_Alarm Then ON


    [pH_AlmEnab]
    Set OFF
    If CO2_3_2 = ON Then ON
    Defer 060:00 Then ON

    [pH_Alarm]
    Set OFF
    If pH < 6.5 Then ON
    Defer 010:00 Then ON
    If pH > 7.0 Then ON
    Defer 010:00 Then ON
    If Output pH_AlmEnab OFF Then OFF


    Any thoughts or suggestions? (One question that comes to my mind is whether I would need the two identical Defer statements in [pH_Alarm]).

Similar Threads

  1. Question: ''ON'' for a period of time
    By patdup in forum Misc Apex Usage & Programming
    Replies: 6
    Last Post: 05-16-2019, 12:35
  2. Program outlet on and off set period of time
    By Balz3352 in forum Misc Apex Usage & Programming
    Replies: 3
    Last Post: 04-01-2019, 10:13
  3. Question: CO2 Shut Off After Time Limit Expires
    By bigjim in forum Misc Aquarium Automation Discussions
    Replies: 5
    Last Post: 12-17-2018, 15:52
  4. Email alerts - if triggered, sends out constant alerts, but only want one
    By BraenDead in forum Misc Apex Usage & Programming
    Replies: 7
    Last Post: 12-01-2014, 10:57

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
  •