Page 1 of 1
Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 9:37 am
by Sacohen
2 questions.
1st if I don't want a time out on the ATO would I code it like this?
Code: Select all
ReefAngel.WaterLevelATO(ATO_Pump,0,1,100);
I know that it is a safety to have the time out, but I'm going to use it to refill my RO/DI container and that can take several hours to refill.
Also is it possible to have it trigger another port (IE Port8 a light will be plugged in to that port to get my attention) or send me an e-mail when it reaches say 100% as a reminder for me to do something with the water.
Let say I'm filling up my saltwater bin with RO to make new saltwater. I want to know that it is full and I need to add the salt now and start it mixing.
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 9:57 am
by rimai
I've never tried using 0 to disable. I don't think it will work.
Use this instead:
Code: Select all
if (ReefAngel.WaterLevel.GetLevel()<=1) ReefAngel.Relay.On(ATO_Pump);
if (ReefAngel.WaterLevel.GetLevel()>=100) ReefAngel.Relay.Off(ATO_Pump);
Then, simply set a trigger in the portal to alert you when WL is greater than 95 or something.
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 10:31 am
by Sacohen
Thanks, I'll try it when I get to that point in everything.
I forgot about the triggers in the portal or the Andriod app.
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 1:17 pm
by binder
Sacohen wrote:Thanks, I'll try it when I get to that point in everything.
I forgot about the triggers in the portal or the Andriod app.
yeah, use those triggers / notifications. that's what they are there for
Sent from my Nexus 7
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 1:27 pm
by Sacohen
I do use them, but I get a lot of errors unable to connect, so I tend not to pay attention to them all the time.
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 1:32 pm
by lnevo
Use the portal notifications... they don't send you errors like that
As far as the timeout, the code you posted doesn't disable the timeout. We used that as a way to disable the ATO when we wanted to so an ATO Timeout wouldn't get triggered.
Roberto, as far as portal notifications, I was wondering if we could add Bitwise operator checks. That would allow us to alert on Flags, Relay status, etc. with the proper bits. Wouldn't be so intuitive, but maybe a checkbox for advanced setting?

Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 1:39 pm
by Sacohen
So is the best way to disable or avoid a ATO timeout the way Roberto suggested?
Code: Select all
if (ReefAngel.WaterLevel.GetLevel()<=1) ReefAngel.Relay.On(ATO_Pump);
if (ReefAngel.WaterLevel.GetLevel()>=100) ReefAngel.Relay.Off(ATO_Pump);
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 2:26 pm
by lnevo
Honestly, I don't really like that code block... I'm not sure though what you're trying to do...
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 2:31 pm
by lnevo
Re-reading your earlier post... here's my RefillATO function trimmed down a bit...
Code: Select all
// ATO Refill mode. Top off ATO reservoir until it's at 100%
void RefillATO() {
static boolean refillActive=false;
static WiFiAlert refillAlert;
byte level;
if (ReefAngel.Relay.Status(VO_RefillATO)) {
if (level<100) {
ReefAngel.Relay.On(Extension);
refillActive=true;
} else {
ReefAngel.Relay.Override(VO_RefillATO,2);
refillAlert.Send("ATO+Reservoir+is+full.");
}
} else {
ReefAngel.Relay.Off(Extension);
refillActive=false;
}
}
VO_RefillATO is an unused port I use to trigger the process.
Extension is the port I plug my refill pump into.
Re: Waterlevel Expansion code.
Posted: Thu Jan 09, 2014 2:37 pm
by Sacohen
OK. I think I got it.
I'm not really going to get into this portion of things for a bit, I need to move my tank and setup the water change and then this process.
I'm looking at setting up an auto fill of my RODI bin (like here
http://richmondreefers.com/phpbb/viewto ... 21&t=12343) and filling a 20 gallon RO trash can will take several hours so I don't want it to time out before it is full.