Programming Gurus - Need Help with Aquacontroller III Switch Code

LetsGetTanked

New member
Here's my issue:

I have an AquaController III and I'm trying to automate my ATO, which gravity feeds my sump. In my storage container are two float switches (see diagram). When the RO water goes below Switch2, I want it to turn on the solenoid, refilling the container. I want it to continue filling until Switch 1 is triggered, which will shutoff the Solenoid. The problem I've run into is that it appears a switch can't do only one process. If the switch is being used, it seems to have to do both the ON and OFF functions. Unless my code is wrong, it won't do only one function or the other.

Here's my programming that doesn't work. Any suggestions on how to program it?

If Switch2 CLOSED Then SOL = ON (when water level drops below this switch, it should turn on the solenoid refilling the container)
If Switch1 OPEN Then SOL = OFF

The problem is that Switch2 is controlling both ON and OFF functions. When the water drops, it will turn on the SOL. However, once the float raises again, the circuit becomes open and shuts off the solenoid. I want this to become null and the water to completely submerge Switch2 until it reaches Switch1. Make sense?
6m2EWV.jpg
 
Edit: Crap my original suggestion was also flawed. If it makes you feel any better I'm a professional developer and the way they force you to use these looped single conditional statements hurts my brain. If nobody else answers I'll try to put more thought into it tomorrow.
 
Last edited:
Haha, I'm glad someone else feels the same way. Would it really be that difficult to allow us to use conditional arguments?

I always wondered if perhaps I could, but I was just missing something...
 
Haha, I'm glad someone else feels the same way. Would it really be that difficult to allow us to use conditional arguments?

I always wondered if perhaps I could, but I was just missing something...

Well, this is where there are often conflicting viewpoints regarding products like this. Neptune is trying to balance flexibility with ease of use and tightly controlling how their product is used. Personally, I'd prefer them to be more open about everything but I can also see it from their viewpoint. So what ends up happening is they decide to write what is essentially their own custom language, and there's a lot of challenge and danger in that space so the language ends up becoming incredibly over-simplified.

All of that said, it would be nice if there was some variation of a real language we could use; something like Python. The SmartThings platform allows developers access to Groovy to write custom devices, applications and behaviors, for example. And the way they control the platform is all of the code must be run through their cloud IDE and they have restrictions on certain types of behavior. But, otherwise, you have full-access to loops, conditionals and variables. And a lightweight stock API. It's nice. I do wish that Neptune would provide some form of deeper-level access to programming the hardware even if it required jumping through hoops to prove that one fully understands the implications and waving them of any responsibility for supporting custom programming.

I think this is where the Vertex Cerebra has a big opportunity, if they can get that thing off the ground and stable. They are using standard hardware (USB) and running Android, which means you can write whatever you want in Java, if you so desire.

Back to your problem... I apologize, but I'm relatively new to Apex and am not sure what the differences between the older Aquacontroller and current programming platform may be? I know that in the current platform you can use Virtual Outlets which I believe may be capable of solving your problem here. Does your controller support that?

What you would do, in that case, is you would essentially create an outlet for the "start" behavior (both switches closed) that turns on a second virtual outlet that is tied to the physical outlet and is set to remain on until the top switch is open again.

Virt Outlet 1:
If Switch2 CLOSED Then VirtOutlet2 = ON

Virt Outlet 2:
If Switch1 OPEN Then OFF

Physical Outlet:
If VirtOutlet2 ON Then ON

I probably have the syntax wrong, but hopefully you get the gist. Essentially what the Virtual Outlets allow you to do is "pass the baton" so that the first condition of Switch2 triggering the ON behavior doesn't continue to interfere with the logic needed to finish the job. HTH!
 
Last edited:
Exactly, that's the one thing that has prevented me from upgrading controllers. The language is so basic and I feel someone out there has to be working on something better. I'm no expert programmer, but I've taken a few low level college courses and don't see why anyone wouldn't be able to write basic loops and conditional statements?

At any rate, I believe my controller does support virtual outlets. I'll try your suggestion this evening and post my results tomorrow. Thanks for the help!
 
Well, this is where there are often conflicting viewpoints regarding products like this. Neptune is trying to balance flexibility with ease of use and tightly controlling how their product is used. Personally, I'd prefer them to be more open about everything but I can also see it from their viewpoint. So what ends up happening is they decide to write what is essentially their own custom language, and there's a lot of challenge and danger in that space so the language ends up becoming incredibly over-simplified.

All of that said, it would be nice if there was some variation of a real language we could use; something like Python. The SmartThings platform allows developers access to Groovy to write custom devices, applications and behaviors, for example. And the way they control the platform is all of the code must be run through their cloud IDE and they have restrictions on certain types of behavior. But, otherwise, you have full-access to loops, conditionals and variables. And a lightweight stock API. It's nice. I do wish that Neptune would provide some form of deeper-level access to programming the hardware even if it required jumping through hoops to prove that one fully understands the implications and waving them of any responsibility for supporting custom programming.

I think this is where the Vertex Cerebra has a big opportunity, if they can get that thing off the ground and stable. They are using standard hardware (USB) and running Android, which means you can write whatever you want in Java, if you so desire.

The Reef Angel uses native Arduino, so there is a controller that already has good support from an engaged community that does not shackle you to a dumb downed language. For the less technical people, they provide a wizard that makes a boilerplate program for all the common features.

Dennis
 
The Reef Angel uses native Arduino, so there is a controller that already has good support from an engaged community that does not shackle you to a dumb downed language. For the less technical people, they provide a wizard that makes a boilerplate program for all the common features.

Dennis

Yes, absolutely... But Reef Angel is a pretty far opposite extreme from Apex, in regards to user-customization required. I mean, I'm perfectly capable of using the Reef Angel (I have built parts of my own controller for fun via Arduino), but there is a point at which you have to balance your own time/expertise with just having something that works. It'd be nice if there was something in the middle, similar to something like SmartThings where you have an easy to use, cloud-based structure that can be customized by advanced users as well.
 
Back
Top