Is your osmolator using its own level sensors to decide when to dispense water?
If so your Apex is best used as a safety backup, cutting power to the outlet when there's a problem.
The code below will only cut power to the outlet if the salinity is so low that your osmolator may have malfunctioned (assuming a set point of 34.)
If it does turn it off due to low salinity indicating overfilling, it won't turn on again for 5 minutes.
Fallback ON
Set ON
If Salt < 33.7 Then OFF
Defer 005:00 Then ON
I'd also add this line to your email/text output, so you'll be notified that something is wrong.
If OutputName = OFF Then ON
To use a Neptune optical sensor, you need an FMM module.
A regular breakout box can be used with a standard float switch or any 2-wire non-powered switch.