WaterLevelATO Timing Out

Expansion modules and attachments

Posts: 93
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Mon Jan 07, 2019 8:05 am
I am using the WaterLevelATO() call to read from the first port of my multi-channel water level expansion and turn on Box2_Port3 when needed. However, this call seems to be randomly causing an ATO timeout, even though ATOExtendedTimeout_read() is returning 120 (verified by also writing it to a custom variable), and the top off is not taking anywhere near that long to complete.

Here is the code:

Code: Select all
if (!ReefAngel.HighATO.IsActive()) ReefAngel.WaterLevelATO(1, Box2_Port3, InternalMemory.ATOExtendedTimeout_read(), InternalMemory.WaterLevelLow_read(), InternalMemory.WaterLevelHigh_read());


InternalMemory.ATOExtendedTimeout_read() is 120
InternalMemory.WaterLevelLow_read() is 98
InternalMemory.WaterLevelHigh_read() is 100

This seems similar to the issue in http://forum.reefangel.com/viewtopic.php?f=3&t=6043 from two years ago, which was never seemly resolved. Does the ATO class still need to be redone?
User avatar
Posts: 5381
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon Jan 07, 2019 10:37 am
I think something still needs to be redone. I've always had the same issue. I'm filling a top of reservoir so my timeout is an hour though. It would always timeout in the first few minutes somewhere, either immediately or shortly after. I've worked around it by clearing the timeout for the first few minutes. Not a great workaround for someone using a traditional ATO.

Posts: 93
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Tue Jan 08, 2019 9:33 am
Thanks for the reply. I actually figured this one out. I was making two calls to WaterLevelATO (one for my tank and one for my quarantine), and since they use a shared variable for time state, it was causing issues.

Return to Addons

Who is online

Users browsing this forum: No registered users and 1 guest