Results 1 to 4 of 4

Thread: Needed: Code help - Alert me if power usage is high during a specific timeframe

  1. #1
    New User
    Join Date
    Apr 2018
    Location
    Ithaca NY
    Posts
    2

    Needed: Code help - Alert me if power usage is high during a specific timeframe

    Hi All,

    I have a Kessil AP700 running my reef. I want to write code to tell me if my light is on in the middle of the night judging from power usage. The light turns off at 10PM and back on at 10:15 am. If it's drawing anything MORE than 30 Watts during this time period I want to know. I've gotten OK with the coding, but have not used time as a parameter. Any help would be appreciated.

    In case you're interested in elaboration: I had a power outage while I was gone on vacation once. When I got home I noticed my lighting schedule had shifted. I assume this is because the AP700 was out cold. Turned back on and just went into a default mode which lit the tank during night hours. I do know if there is a power outage as I get an alert. And next time this happens I will know to check to see how the light is functioning once power is restored. However I would love for there to be a specific alert should the light be drawing more watts than usual during OFF hours so that I can manually shut the light down and alleviate any potential issues. Thanks for any help.

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Create a VO

    LightProb
    Set OFF
    If Output LightName Watts > 30 Then ON
    If Time 22:00 to 10:15 Then OFF

    Email
    If Output LightProb = ON Then ON

    Sent from my SM-G965U using Tapatalk

  3. #3
    New User
    Join Date
    Apr 2018
    Location
    Ithaca NY
    Posts
    2
    Thank you for the reply. I believe that "VO" refers to Virtual Outlet? I'm not sure I understand the fundamentals of a VO. I suppose that the name you want me to create for the VO is "lightprob" which stands for light problem. I am trying to figure out the code. Appears that you are saying that if the outlet the light is plugged into (Kessil is the name I currently use) is pulling more than 30 watts then ON. What does the ON refer to in this case? I assume the next line of code relates directly to the preceeding. So it would say that if the light is pulling these watts between 10pm and 10:15am then turn the light off. Is this correct?

    The email code is written in the same VO? This simply means that if the light is on, then email me? Thank you for the clarification.

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Virtual outlets are just an intermediate programming step. Click the add virtual outlet button in the outlets page to create it.

    Sent from my SM-G965U using Tapatalk

Similar Threads

  1. Help! Can you determine power usage and then issue an alert?
    By tomb18 in forum Misc Apex Usage & Programming
    Replies: 3
    Last Post: 09-25-2020, 20:21
  2. Replies: 3
    Last Post: 03-13-2019, 07:11
  3. Cor 15 Power Usage Seems kind of high
    By jjam in forum COR-15 & COR-20 Pumps
    Replies: 2
    Last Post: 02-27-2018, 12:24
  4. Review My Program Email Alert for specific times of day on specific days of the week
    By feh in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 07-15-2014, 07:44
  5. Email alert for float switch: code needed please
    By Aspec in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 2
    Last Post: 12-09-2013, 05:23

Tags for this Thread

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
  •